diff --git a/catapult-sdk/src/model/ModelSchemaBuilder.js b/catapult-sdk/src/model/ModelSchemaBuilder.js index 38d2ca6a6..e8d24eeb9 100644 --- a/catapult-sdk/src/model/ModelSchemaBuilder.js +++ b/catapult-sdk/src/model/ModelSchemaBuilder.js @@ -169,6 +169,7 @@ class ModelSchemaBuilder { account: { type: ModelType.object, schemaName: 'account' } }, account: { + version: ModelType.uint16, address: ModelType.binary, addressHeight: ModelType.uint64, publicKey: ModelType.binary, diff --git a/catapult-sdk/src/plugins/lockHash.js b/catapult-sdk/src/plugins/lockHash.js index ba1aa7d8a..9beaa484f 100644 --- a/catapult-sdk/src/plugins/lockHash.js +++ b/catapult-sdk/src/plugins/lockHash.js @@ -37,6 +37,7 @@ const lockHashPlugin = { lock: { type: ModelType.object, schemaName: 'hashLockInfo.lock' } }); builder.addSchema('hashLockInfo.lock', { + version: ModelType.uint16, ownerAddress: ModelType.binary, mosaicId: ModelType.uint64HexIdentifier, amount: ModelType.uint64, diff --git a/catapult-sdk/src/plugins/lockSecret.js b/catapult-sdk/src/plugins/lockSecret.js index 8cd58ee33..aa18dc314 100644 --- a/catapult-sdk/src/plugins/lockSecret.js +++ b/catapult-sdk/src/plugins/lockSecret.js @@ -37,6 +37,7 @@ const lockSecretPlugin = { lock: { type: ModelType.object, schemaName: 'secretLockInfo.lock' } }); builder.addSchema('secretLockInfo.lock', { + version: ModelType.uint16, ownerAddress: ModelType.binary, mosaicId: ModelType.uint64HexIdentifier, amount: ModelType.uint64, diff --git a/catapult-sdk/src/plugins/metadata.js b/catapult-sdk/src/plugins/metadata.js index 560fa4e79..d735061df 100644 --- a/catapult-sdk/src/plugins/metadata.js +++ b/catapult-sdk/src/plugins/metadata.js @@ -65,6 +65,7 @@ const metadataPlugin = { }); builder.addSchema('metadataEntry', { + version: ModelType.uint16, compositeHash: ModelType.binary, sourceAddress: ModelType.binary, targetAddress: ModelType.binary, diff --git a/catapult-sdk/src/plugins/mosaic.js b/catapult-sdk/src/plugins/mosaic.js index 10d207fa2..86cba196d 100644 --- a/catapult-sdk/src/plugins/mosaic.js +++ b/catapult-sdk/src/plugins/mosaic.js @@ -49,6 +49,7 @@ const mosaicPlugin = { }); builder.addSchema('mosaicDescriptor.mosaic', { + version: ModelType.uint16, id: ModelType.uint64HexIdentifier, supply: ModelType.uint64, startHeight: ModelType.uint64, diff --git a/catapult-sdk/src/plugins/multisig.js b/catapult-sdk/src/plugins/multisig.js index 90ea9f04f..1ac7a739f 100644 --- a/catapult-sdk/src/plugins/multisig.js +++ b/catapult-sdk/src/plugins/multisig.js @@ -44,6 +44,7 @@ const multisigPlugin = { multisig: { type: ModelType.object, schemaName: 'multisigEntry.multisig' } }); builder.addSchema('multisigEntry.multisig', { + version: ModelType.uint16, accountAddress: ModelType.binary, minApproval: ModelType.int, minRemoval: ModelType.int, diff --git a/catapult-sdk/src/plugins/namespace.js b/catapult-sdk/src/plugins/namespace.js index 1412058df..69800efb4 100644 --- a/catapult-sdk/src/plugins/namespace.js +++ b/catapult-sdk/src/plugins/namespace.js @@ -81,6 +81,7 @@ const namespacePlugin = { }); builder.addSchema('namespaceDescriptor.namespace', { + version: ModelType.uint16, registrationType: ModelType.uint8, depth: ModelType.uint8, level0: ModelType.uint64HexIdentifier, diff --git a/catapult-sdk/src/plugins/restrictions.js b/catapult-sdk/src/plugins/restrictions.js index 40286e056..8797de020 100644 --- a/catapult-sdk/src/plugins/restrictions.js +++ b/catapult-sdk/src/plugins/restrictions.js @@ -125,6 +125,7 @@ const restrictionsPlugin = { accountRestrictions: { type: ModelType.object, schemaName: 'accountRestriction.restrictions' } }); builder.addSchema('accountRestriction.restrictions', { + version: ModelType.uint16, address: ModelType.binary, restrictions: { type: ModelType.array, @@ -169,6 +170,7 @@ const restrictionsPlugin = { mosaicRestrictionEntry: { type: ModelType.object, schemaName: 'mosaicRestrictions.entry' } }); builder.addSchema('mosaicRestrictions.entry', { + version: ModelType.uint16, compositeHash: ModelType.binary, entryType: ModelType.uint32, mosaicId: ModelType.uint64HexIdentifier, diff --git a/catapult-sdk/test/plugins/lockHash_spec.js b/catapult-sdk/test/plugins/lockHash_spec.js index e7d34e80e..e93dd70e2 100644 --- a/catapult-sdk/test/plugins/lockHash_spec.js +++ b/catapult-sdk/test/plugins/lockHash_spec.js @@ -49,8 +49,8 @@ describe('lock hash plugin', () => { // - hash lock infos assertSchema(modelSchema.hashLockInfo, 2, 'id', 'lock'); - assertSchema(modelSchema['hashLockInfo.lock'], 6, - 'ownerAddress', 'mosaicId', 'amount', 'endHeight', 'status', 'hash'); + assertSchema(modelSchema['hashLockInfo.lock'], 7, + 'version', 'ownerAddress', 'mosaicId', 'amount', 'endHeight', 'status', 'hash'); // - hash lock transaction const transactionSchemaSize = Object.keys(modelSchema.transaction).length; diff --git a/catapult-sdk/test/plugins/lockSecret_spec.js b/catapult-sdk/test/plugins/lockSecret_spec.js index 077e687fa..85e7bc15b 100644 --- a/catapult-sdk/test/plugins/lockSecret_spec.js +++ b/catapult-sdk/test/plugins/lockSecret_spec.js @@ -52,8 +52,8 @@ describe('lock secret plugin', () => { assertSchema(modelSchema.secretLockInfo, 2, 'id', 'lock'); // - secret lock infos - assertSchema(modelSchema['secretLockInfo.lock'], 9, - 'ownerAddress', 'mosaicId', 'amount', 'endHeight', 'secret', + assertSchema(modelSchema['secretLockInfo.lock'], 10, + 'version', 'ownerAddress', 'mosaicId', 'amount', 'endHeight', 'secret', 'status', 'hashAlgorithm', 'recipientAddress', 'compositeHash'); // - secret lock transactions diff --git a/catapult-sdk/test/plugins/metadata_spec.js b/catapult-sdk/test/plugins/metadata_spec.js index d7c096d1b..8cf238f7f 100644 --- a/catapult-sdk/test/plugins/metadata_spec.js +++ b/catapult-sdk/test/plugins/metadata_spec.js @@ -74,8 +74,9 @@ describe('metadata plugin', () => { expect(modelSchema.metadata).to.contain.all.keys(['metadataEntry', 'id']); // - metadataEntry - expect(Object.keys(modelSchema.metadataEntry).length).to.equal(8); + expect(Object.keys(modelSchema.metadataEntry).length).to.equal(9); expect(modelSchema.metadataEntry).to.contain.all.keys([ + 'version', 'compositeHash', 'sourceAddress', 'targetAddress', diff --git a/catapult-sdk/test/plugins/mosaic_spec.js b/catapult-sdk/test/plugins/mosaic_spec.js index cfed5920f..987c575e4 100644 --- a/catapult-sdk/test/plugins/mosaic_spec.js +++ b/catapult-sdk/test/plugins/mosaic_spec.js @@ -67,9 +67,9 @@ describe('mosaic plugin', () => { expect(modelSchema.mosaicDescriptor).to.contain.all.keys(['id', 'mosaic']); // - mosaic descriptor mosaic - expect(Object.keys(modelSchema['mosaicDescriptor.mosaic']).length).to.equal(8); + expect(Object.keys(modelSchema['mosaicDescriptor.mosaic']).length).to.equal(9); expect(modelSchema['mosaicDescriptor.mosaic']).to.contain.all.keys([ - 'id', 'supply', 'startHeight', 'ownerAddress', 'revision', 'flags', 'divisibility', 'duration' + 'version', 'id', 'supply', 'startHeight', 'ownerAddress', 'revision', 'flags', 'divisibility', 'duration' ]); }); }); diff --git a/catapult-sdk/test/plugins/multisig_spec.js b/catapult-sdk/test/plugins/multisig_spec.js index 7cf8073d9..1233056db 100644 --- a/catapult-sdk/test/plugins/multisig_spec.js +++ b/catapult-sdk/test/plugins/multisig_spec.js @@ -62,9 +62,10 @@ describe('multisig plugin', () => { expect(Object.keys(modelSchema.multisigEntry).length).to.equal(1); expect(modelSchema.multisigEntry).to.contain.all.keys(['multisig']); - expect(Object.keys(modelSchema['multisigEntry.multisig']).length).to.equal(5); + expect(Object.keys(modelSchema['multisigEntry.multisig']).length).to.equal(6); expect(modelSchema['multisigEntry.multisig']) - .to.contain.all.keys(['accountAddress', 'minApproval', 'minRemoval', 'multisigAddresses', 'cosignatoryAddresses']); + .to.contain.all.keys(['version', 'accountAddress', 'minApproval', + 'minRemoval', 'multisigAddresses', 'cosignatoryAddresses']); // - multisig graph expect(Object.keys(modelSchema.multisigGraph).length).to.equal(2); diff --git a/catapult-sdk/test/plugins/namespace_spec.js b/catapult-sdk/test/plugins/namespace_spec.js index 2673c6380..954bc1010 100644 --- a/catapult-sdk/test/plugins/namespace_spec.js +++ b/catapult-sdk/test/plugins/namespace_spec.js @@ -88,9 +88,10 @@ describe('namespace plugin', () => { expect(modelSchema['namespaceDescriptor.meta']).to.contain.all.keys(['active', 'index']); // - namespaceDescriptor.namespace - expect(Object.keys(modelSchema['namespaceDescriptor.namespace']).length).to.equal(10); + expect(Object.keys(modelSchema['namespaceDescriptor.namespace']).length).to.equal(11); expect(modelSchema['namespaceDescriptor.namespace']).to.contain.all.keys([ - 'registrationType', 'depth', 'level0', 'level1', 'level2', 'alias', 'parentId', 'ownerAddress', 'startHeight', 'endHeight' + 'version', 'registrationType', 'depth', 'level0', 'level1', 'level2', + 'alias', 'parentId', 'ownerAddress', 'startHeight', 'endHeight' ]); // - namespaceDescriptor.alias.mosaic diff --git a/catapult-sdk/test/plugins/restrictions_spec.js b/catapult-sdk/test/plugins/restrictions_spec.js index 3c3493e94..a947be7ad 100644 --- a/catapult-sdk/test/plugins/restrictions_spec.js +++ b/catapult-sdk/test/plugins/restrictions_spec.js @@ -76,7 +76,7 @@ describe('restrictions plugin', () => { // - accountRestrictionAddress expect(Object.keys(modelSchema.accountRestrictionAddress).length).to.equal(Object.keys(modelSchema.transaction).length + 3); expect(modelSchema.accountRestrictionAddress).to.contain.all.keys([ - 'restrictionFlags', 'restrictionAdditions', 'restrictionDeletions' + 'version', 'restrictionFlags', 'restrictionAdditions', 'restrictionDeletions' ]); // - accountRestrictionMosaic @@ -96,8 +96,8 @@ describe('restrictions plugin', () => { expect(modelSchema.accountRestrictions).to.contain.all.keys(['accountRestrictions']); // - accountRestriction.restrictions - expect(Object.keys(modelSchema['accountRestriction.restrictions']).length).to.equal(2); - expect(modelSchema['accountRestriction.restrictions']).to.contain.all.keys(['address', 'restrictions']); + expect(Object.keys(modelSchema['accountRestriction.restrictions']).length).to.equal(3); + expect(modelSchema['accountRestriction.restrictions']).to.contain.all.keys(['version', 'address', 'restrictions']); // - accountRestriction address, mosaic, and operation restrictions accountRestrictionSchemas.forEach(schema => { @@ -155,9 +155,9 @@ describe('restrictions plugin', () => { expect(modelSchema.mosaicRestrictions).to.contain.all.keys(['id', 'mosaicRestrictionEntry']); // - mosaicRestriction.entry - expect(Object.keys(modelSchema['mosaicRestrictions.entry']).length).to.equal(5); + expect(Object.keys(modelSchema['mosaicRestrictions.entry']).length).to.equal(6); expect(modelSchema['mosaicRestrictions.entry']).to.contain.all.keys([ - 'compositeHash', 'entryType', 'mosaicId', 'targetAddress', 'restrictions' + 'version', 'compositeHash', 'entryType', 'mosaicId', 'targetAddress', 'restrictions' ]); // - mosaicRestrictions.entry.restrictions diff --git a/rest/package.json b/rest/package.json index 49fc506ed..47111ab00 100644 --- a/rest/package.json +++ b/rest/package.json @@ -46,7 +46,7 @@ "nodemon": "^2.0.6", "rimraf": "^2.6.3", "sinon": "^7.3.2", - "symbol-bootstrap": "0.3.0-alpha-202011220136" + "symbol-bootstrap": "0.3.0-alpha-202011301515" }, "dependencies": { "catapult-sdk": "link:../catapult-sdk", diff --git a/rest/yarn.lock b/rest/yarn.lock index fe830a2dd..3445b3068 100644 --- a/rest/yarn.lock +++ b/rest/yarn.lock @@ -5900,10 +5900,10 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -symbol-bootstrap@0.3.0-alpha-202011220136: - version "0.3.0-alpha-202011220136" - resolved "https://registry.yarnpkg.com/symbol-bootstrap/-/symbol-bootstrap-0.3.0-alpha-202011220136.tgz#a0cb7bc42f325aafaf5409ec7cb6d28c55c97dc8" - integrity sha512-XBmpAlZzMezqogoN7xpsqSNrO6qX3fwTg9d+Sfj73f6yBUb9gjsltuzoECAIvaOoNQyb9577+BBL/6SUWvGRHA== +symbol-bootstrap@0.3.0-alpha-202011301515: + version "0.3.0-alpha-202011301515" + resolved "https://registry.yarnpkg.com/symbol-bootstrap/-/symbol-bootstrap-0.3.0-alpha-202011301515.tgz#737c6b9556afba4f087d6ac5ba6bbabbd4922a0f" + integrity sha512-FBWXSrMrQE3BOUmIYMgVCI+RLlwVg6eh5aJ+HHhKNuuts+Glpid9xE12J+MxDLEzFEx9N/qvUVT/tLx2fO9+vQ== dependencies: "@oclif/command" "^1.7.0" "@oclif/config" "^1.16.0"