diff --git a/e2e/infrastructure/AccountHttp.spec.ts b/e2e/infrastructure/AccountHttp.spec.ts index ba9afe6c6f..3a698b906b 100644 --- a/e2e/infrastructure/AccountHttp.spec.ts +++ b/e2e/infrastructure/AccountHttp.spec.ts @@ -14,11 +14,13 @@ * limitations under the License. */ -import {deepEqual} from 'assert'; import {assert, expect} from 'chai'; import {AccountHttp} from '../../src/infrastructure/AccountHttp'; -import { Listener, TransactionHttp } from '../../src/infrastructure/infrastructure'; -import { RestrictionHttp } from '../../src/infrastructure/RestrictionHttp'; +import { Listener } from '../../src/infrastructure/Listener'; +import { MultisigHttp } from '../../src/infrastructure/MultisigHttp'; +import { NamespaceHttp } from '../../src/infrastructure/NamespaceHttp'; +import { RestrictionAccountHttp } from '../../src/infrastructure/RestrictionAccountHttp'; +import { TransactionHttp } from '../../src/infrastructure/TransactionHttp'; import { Account } from '../../src/model/account/Account'; import {Address} from '../../src/model/account/Address'; import {PublicAccount} from '../../src/model/account/PublicAccount'; @@ -27,16 +29,10 @@ import { PlainMessage } from '../../src/model/message/PlainMessage'; import { NetworkCurrencyMosaic } from '../../src/model/mosaic/NetworkCurrencyMosaic'; import { AliasAction } from '../../src/model/namespace/AliasAction'; import { NamespaceId } from '../../src/model/namespace/NamespaceId'; -import { AccountRestrictionModificationAction } from '../../src/model/restriction/AccountRestrictionModificationAction'; -import { AccountRestrictionFlags } from '../../src/model/restriction/AccountRestrictionType'; -import { AccountRestrictionModification } from '../../src/model/transaction/AccountRestrictionModification'; -import { AccountRestrictionTransaction } from '../../src/model/transaction/AccountRestrictionTransaction'; import { AddressAliasTransaction } from '../../src/model/transaction/AddressAliasTransaction'; import { AggregateTransaction } from '../../src/model/transaction/AggregateTransaction'; -import { CosignatoryModificationAction } from '../../src/model/transaction/CosignatoryModificationAction'; import { Deadline } from '../../src/model/transaction/Deadline'; import { MultisigAccountModificationTransaction } from '../../src/model/transaction/MultisigAccountModificationTransaction'; -import { MultisigCosignatoryModification } from '../../src/model/transaction/MultisigCosignatoryModification'; import { NamespaceRegistrationTransaction } from '../../src/model/transaction/NamespaceRegistrationTransaction'; import { TransferTransaction } from '../../src/model/transaction/TransferTransaction'; import { UInt64 } from '../../src/model/UInt64'; @@ -53,7 +49,9 @@ describe('AccountHttp', () => { let accountPublicKey: string; let publicAccount: PublicAccount; let accountHttp: AccountHttp; - let restrictionHttp: RestrictionHttp; + let multisigHttp: MultisigHttp; + let namespaceHttp: NamespaceHttp; + let restrictionHttp: RestrictionAccountHttp; let transactionHttp: TransactionHttp; let namespaceId: NamespaceId; let generationHash: string; @@ -80,7 +78,9 @@ describe('AccountHttp', () => { generationHash = json.generationHash; accountHttp = new AccountHttp(json.apiUrl); transactionHttp = new TransactionHttp(json.apiUrl); - restrictionHttp = new RestrictionHttp(json.apiUrl); + restrictionHttp = new RestrictionAccountHttp(json.apiUrl); + multisigHttp = new MultisigHttp(json.apiUrl); + namespaceHttp = new NamespaceHttp(json.apiUrl); done(); }); }); @@ -256,7 +256,7 @@ describe('AccountHttp', () => { describe('getMultisigAccountGraphInfo', () => { it('should call getMultisigAccountGraphInfo successfully', (done) => { setTimeout(() => { - accountHttp.getMultisigAccountGraphInfo(multisigAccount.publicAccount.address).subscribe((multisigAccountGraphInfo) => { + multisigHttp.getMultisigAccountGraphInfo(multisigAccount.publicAccount.address).subscribe((multisigAccountGraphInfo) => { expect(multisigAccountGraphInfo.multisigAccounts.get(0)![0]. account.publicKey).to.be.equal(multisigAccount.publicKey); done(); @@ -267,7 +267,7 @@ describe('AccountHttp', () => { describe('getMultisigAccountInfo', () => { it('should call getMultisigAccountInfo successfully', (done) => { setTimeout(() => { - accountHttp.getMultisigAccountInfo(multisigAccount.publicAccount.address).subscribe((multisigAccountInfo) => { + multisigHttp.getMultisigAccountInfo(multisigAccount.publicAccount.address).subscribe((multisigAccountInfo) => { expect(multisigAccountInfo.account.publicKey).to.be.equal(multisigAccount.publicKey); done(); }); @@ -277,7 +277,7 @@ describe('AccountHttp', () => { describe('outgoingTransactions', () => { it('should call outgoingTransactions successfully', (done) => { - accountHttp.outgoingTransactions(publicAccount.address).subscribe((transactions) => { + accountHttp.getAccountOutgoingTransactions(publicAccount.address).subscribe((transactions) => { expect(transactions.length).to.be.greaterThan(0); done(); }); @@ -286,7 +286,7 @@ describe('AccountHttp', () => { describe('aggregateBondedTransactions', () => { it('should call aggregateBondedTransactions successfully', (done) => { - accountHttp.aggregateBondedTransactions(publicAccount.address).subscribe(() => { + accountHttp.getAccountPartialTransactions(publicAccount.address).subscribe(() => { done(); }, (error) => { console.log('Error:', error); @@ -297,7 +297,7 @@ describe('AccountHttp', () => { describe('transactions', () => { it('should call transactions successfully', (done) => { - accountHttp.transactions(publicAccount.address).subscribe((transactions) => { + accountHttp.getAccountTransactions(publicAccount.address).subscribe((transactions) => { expect(transactions.length).to.be.greaterThan(0); done(); }); @@ -306,7 +306,7 @@ describe('AccountHttp', () => { describe('unconfirmedTransactions', () => { it('should call unconfirmedTransactions successfully', (done) => { - accountHttp.unconfirmedTransactions(publicAccount.address).subscribe((transactions) => { + accountHttp.getAccountUnconfirmedTransactions(publicAccount.address).subscribe((transactions) => { expect(transactions.length).to.be.equal(0); done(); }); @@ -315,7 +315,7 @@ describe('AccountHttp', () => { describe('getAddressNames', () => { it('should call getAddressNames successfully', (done) => { - accountHttp.getAccountsNames([accountAddress]).subscribe((addressNames) => { + namespaceHttp.getAccountsNames([accountAddress]).subscribe((addressNames) => { expect(addressNames.length).to.be.greaterThan(0); done(); }); diff --git a/e2e/infrastructure/BlockHttp.spec.ts b/e2e/infrastructure/BlockHttp.spec.ts index ec795a12ec..e4893caf16 100644 --- a/e2e/infrastructure/BlockHttp.spec.ts +++ b/e2e/infrastructure/BlockHttp.spec.ts @@ -15,8 +15,9 @@ */ import {assert, expect} from 'chai'; +import { mergeMap } from 'rxjs/operators'; import {BlockHttp} from '../../src/infrastructure/BlockHttp'; -import { Listener, TransactionHttp } from '../../src/infrastructure/infrastructure'; +import { Listener, ReceiptHttp, TransactionHttp } from '../../src/infrastructure/infrastructure'; import {QueryParams} from '../../src/infrastructure/QueryParams'; import { Account } from '../../src/model/account/Account'; import { NetworkType } from '../../src/model/blockchain/NetworkType'; @@ -24,12 +25,14 @@ import { PlainMessage } from '../../src/model/message/PlainMessage'; import { NetworkCurrencyMosaic } from '../../src/model/mosaic/NetworkCurrencyMosaic'; import { Deadline } from '../../src/model/transaction/Deadline'; import { Transaction } from '../../src/model/transaction/Transaction'; +import { TransactionInfo } from '../../src/model/transaction/TransactionInfo'; import { TransferTransaction } from '../../src/model/transaction/TransferTransaction'; describe('BlockHttp', () => { let account: Account; let account2: Account; let blockHttp: BlockHttp; + let receiptHttp: ReceiptHttp; let transactionHttp: TransactionHttp; let blockReceiptHash = ''; let blockTransactionHash = ''; @@ -48,6 +51,7 @@ describe('BlockHttp', () => { account2 = Account.createFromPrivateKey(json.testAccount2.privateKey, NetworkType.MIJIN_TEST); blockHttp = new BlockHttp(json.apiUrl); transactionHttp = new TransactionHttp(json.apiUrl); + receiptHttp = new ReceiptHttp(json.apiUrl); generationHash = json.generationHash; done(); }); @@ -80,8 +84,7 @@ describe('BlockHttp', () => { const signedTransaction = transferTransaction.signWith(account, generationHash); listener.confirmed(account.address).subscribe((transaction: Transaction) => { - - chainHeight = transaction.transactionInfo!.height.lower; + chainHeight = transaction.transactionInfo!.height.toString(); done(); }); listener.status(account.address).subscribe((error) => { @@ -95,7 +98,7 @@ describe('BlockHttp', () => { describe('getBlockByHeight', () => { it('should return block info given height', (done) => { - blockHttp.getBlockByHeight(1) + blockHttp.getBlockByHeight('1') .subscribe((blockInfo) => { blockReceiptHash = blockInfo.blockReceiptsHash; blockTransactionHash = blockInfo.blockTransactionsHash; @@ -113,7 +116,7 @@ describe('BlockHttp', () => { let firstId: string; it('should return block transactions data given height', (done) => { - blockHttp.getBlockTransactions(1) + blockHttp.getBlockTransactions('1') .subscribe((transactions) => { nextId = transactions[0].transactionInfo!.id; firstId = transactions[1].transactionInfo!.id; @@ -123,7 +126,7 @@ describe('BlockHttp', () => { }); it('should return block transactions data given height with paginated transactionId', (done) => { - blockHttp.getBlockTransactions(1, new QueryParams(10, nextId)) + blockHttp.getBlockTransactions('1', new QueryParams(10, nextId)) .subscribe((transactions) => { expect(transactions[0].transactionInfo!.id).to.be.equal(firstId); expect(transactions.length).to.be.greaterThan(0); @@ -143,17 +146,28 @@ describe('BlockHttp', () => { }); describe('getMerkleReceipts', () => { it('should return Merkle Receipts', (done) => { - blockHttp.getMerkleReceipts(chainHeight, blockReceiptHash) - .subscribe((merkleReceipts) => { - expect(merkleReceipts.merklePath).not.to.be.null; - done(); - }); + receiptHttp.getBlockReceipts(chainHeight).pipe( + mergeMap((_) => { + return receiptHttp.getMerkleReceipts(chainHeight, _.transactionStatements[0].generateHash()); + })) + .subscribe((merkleReceipts) => { + expect(merkleReceipts.merklePath).not.to.be.null; + done(); + }); }); }); describe('getMerkleTransaction', () => { it('should return Merkle Transaction', (done) => { - blockHttp.getMerkleTransaction(chainHeight, blockTransactionHash) - .subscribe((merkleTransactionss) => { + blockHttp.getBlockTransactions(chainHeight).pipe( + mergeMap((_) => { + const hash = (_[0].transactionInfo as TransactionInfo).hash; + if (hash) { + return blockHttp.getMerkleTransaction(chainHeight, hash); + } + // If reaching this line, something is not right + throw new Error('Tansacation hash is undefined'); + })) + .subscribe((merkleTransactionss) => { expect(merkleTransactionss.merklePath).not.to.be.null; done(); }); @@ -162,7 +176,7 @@ describe('BlockHttp', () => { describe('getBlockReceipts', () => { it('should return block receipts', (done) => { - blockHttp.getBlockReceipts(chainHeight) + receiptHttp.getBlockReceipts(chainHeight) .subscribe((statement) => { expect(statement.transactionStatements).not.to.be.null; expect(statement.transactionStatements.length).to.be.greaterThan(0); diff --git a/e2e/infrastructure/Listener.spec.ts b/e2e/infrastructure/Listener.spec.ts index adf2e9f33d..8d431e8782 100644 --- a/e2e/infrastructure/Listener.spec.ts +++ b/e2e/infrastructure/Listener.spec.ts @@ -286,7 +286,7 @@ describe('Listener', () => { done(); }); listener.aggregateBondedAdded(cosignAccount1.address).subscribe(() => { - accountHttp.aggregateBondedTransactions(cosignAccount1.publicAccount.address).subscribe((transactions) => { + accountHttp.getAccountPartialTransactions(cosignAccount1.publicAccount.address).subscribe((transactions) => { const transactionToCosign = transactions[0]; TransactionUtils.cosignTransaction(transactionToCosign, cosignAccount2, transactionHttp); }); @@ -326,7 +326,7 @@ describe('Listener', () => { done(); }); listener.aggregateBondedAdded(cosignAccount1.address).subscribe(() => { - accountHttp.aggregateBondedTransactions(cosignAccount1.publicAccount.address).subscribe((transactions) => { + accountHttp.getAccountPartialTransactions(cosignAccount1.publicAccount.address).subscribe((transactions) => { const transactionToCosign = transactions[0]; TransactionUtils.cosignTransaction(transactionToCosign, cosignAccount2, transactionHttp); }); diff --git a/e2e/infrastructure/MetadataHttp.spec.ts b/e2e/infrastructure/MetadataHttp.spec.ts index 06c4665614..d2dc25d1b9 100644 --- a/e2e/infrastructure/MetadataHttp.spec.ts +++ b/e2e/infrastructure/MetadataHttp.spec.ts @@ -278,7 +278,7 @@ describe('MetadataHttp', () => { expect(metadata[0].metadataEntry.targetPublicKey).to.be.equal(account.publicKey); expect(metadata[0].metadataEntry.targetId).to.be.undefined; expect(metadata[0].metadataEntry.value).to.be.equal('Test account meta value'); - expect(metadata[0].metadataEntry.valueSize).to.be.equal(23); + expect(metadata[0].metadataEntry.value.length).to.be.equal(23); done(); }); }); @@ -294,7 +294,7 @@ describe('MetadataHttp', () => { expect(metadata[0].metadataEntry.targetPublicKey).to.be.equal(account.publicKey); expect(metadata[0].metadataEntry.targetId).to.be.undefined; expect(metadata[0].metadataEntry.value).to.be.equal('Test account meta value'); - expect(metadata[0].metadataEntry.valueSize).to.be.equal(23); + expect(metadata[0].metadataEntry.value.length).to.be.equal(23); done(); }); }); @@ -309,7 +309,7 @@ describe('MetadataHttp', () => { expect(metadata.metadataEntry.targetPublicKey).to.be.equal(account.publicKey); expect(metadata.metadataEntry.targetId).to.be.undefined; expect(metadata.metadataEntry.value).to.be.equal('Test account meta value'); - expect(metadata.metadataEntry.valueSize).to.be.equal(23); + expect(metadata.metadataEntry.value.length).to.be.equal(23); done(); }); }); @@ -325,7 +325,7 @@ describe('MetadataHttp', () => { expect(metadata[0].metadataEntry.targetPublicKey).to.be.equal(account.publicKey); expect((metadata[0].metadataEntry.targetId as MosaicId).toHex()).to.be.equal(mosaicId.toHex()); expect(metadata[0].metadataEntry.value).to.be.equal('Test mosaic meta value'); - expect(metadata[0].metadataEntry.valueSize).to.be.equal(22); + expect(metadata[0].metadataEntry.value.length).to.be.equal(22); done(); }); }); @@ -341,7 +341,7 @@ describe('MetadataHttp', () => { expect(metadata[0].metadataEntry.targetPublicKey).to.be.equal(account.publicKey); expect((metadata[0].metadataEntry.targetId as MosaicId).toHex()).to.be.equal(mosaicId.toHex()); expect(metadata[0].metadataEntry.value).to.be.equal('Test mosaic meta value'); - expect(metadata[0].metadataEntry.valueSize).to.be.equal(22); + expect(metadata[0].metadataEntry.value.length).to.be.equal(22); done(); }); }); @@ -356,7 +356,7 @@ describe('MetadataHttp', () => { expect(metadata.metadataEntry.targetPublicKey).to.be.equal(account.publicKey); expect((metadata.metadataEntry.targetId as MosaicId).toHex()).to.be.equal(mosaicId.toHex()); expect(metadata.metadataEntry.value).to.be.equal('Test mosaic meta value'); - expect(metadata.metadataEntry.valueSize).to.be.equal(22); + expect(metadata.metadataEntry.value.length).to.be.equal(22); done(); }); }); @@ -372,7 +372,7 @@ describe('MetadataHttp', () => { expect(metadata[0].metadataEntry.targetPublicKey).to.be.equal(account.publicKey); expect((metadata[0].metadataEntry.targetId as NamespaceId).toHex()).to.be.equal(namespaceId.toHex()); expect(metadata[0].metadataEntry.value).to.be.equal('Test namespace meta value'); - expect(metadata[0].metadataEntry.valueSize).to.be.equal(25); + expect(metadata[0].metadataEntry.value.length).to.be.equal(25); done(); }); }); @@ -388,7 +388,7 @@ describe('MetadataHttp', () => { expect(metadata[0].metadataEntry.targetPublicKey).to.be.equal(account.publicKey); expect((metadata[0].metadataEntry.targetId as NamespaceId).toHex()).to.be.equal(namespaceId.toHex()); expect(metadata[0].metadataEntry.value).to.be.equal('Test namespace meta value'); - expect(metadata[0].metadataEntry.valueSize).to.be.equal(25); + expect(metadata[0].metadataEntry.value.length).to.be.equal(25); done(); }); }); @@ -403,7 +403,7 @@ describe('MetadataHttp', () => { expect(metadata.metadataEntry.targetPublicKey).to.be.equal(account.publicKey); expect((metadata.metadataEntry.targetId as NamespaceId).toHex()).to.be.equal(namespaceId.toHex()); expect(metadata.metadataEntry.value).to.be.equal('Test namespace meta value'); - expect(metadata.metadataEntry.valueSize).to.be.equal(25); + expect(metadata.metadataEntry.value.length).to.be.equal(25); done(); }); }); diff --git a/e2e/infrastructure/MosaicHttp.spec.ts b/e2e/infrastructure/MosaicHttp.spec.ts index 33afaecc6b..c6140a2678 100644 --- a/e2e/infrastructure/MosaicHttp.spec.ts +++ b/e2e/infrastructure/MosaicHttp.spec.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import {assert, expect} from 'chai'; -import { Listener, TransactionHttp } from '../../src/infrastructure/infrastructure'; +import { Listener, NamespaceHttp, TransactionHttp } from '../../src/infrastructure/infrastructure'; import {MosaicHttp} from '../../src/infrastructure/MosaicHttp'; import { Account } from '../../src/model/account/Account'; import { NetworkType } from '../../src/model/blockchain/NetworkType'; @@ -36,6 +36,7 @@ describe('MosaicHttp', () => { let config; let namespaceId: NamespaceId; let transactionHttp: TransactionHttp; + let namespaceHttp: NamespaceHttp; let generationHash: string; before((done) => { const path = require('path'); @@ -48,6 +49,7 @@ describe('MosaicHttp', () => { account = Account.createFromPrivateKey(json.testAccount.privateKey, NetworkType.MIJIN_TEST); mosaicHttp = new MosaicHttp(json.apiUrl); transactionHttp = new TransactionHttp(json.apiUrl); + namespaceHttp = new NamespaceHttp(json.apiUrl); generationHash = json.generationHash; done(); }); @@ -182,13 +184,33 @@ describe('MosaicHttp', () => { describe('getMosaicsNames', () => { it('should call getMosaicsNames successfully', (done) => { - mosaicHttp.getMosaicsNames([mosaicId]).subscribe((mosaicNames) => { + namespaceHttp.getMosaicsNames([mosaicId]).subscribe((mosaicNames) => { expect(mosaicNames.length).to.be.greaterThan(0); done(); }); }); }); + describe('getMosaicsFromAccount', () => { + it('should call getMosaicsFromAccount successfully', (done) => { + mosaicHttp.getMosaicsFromAccount(account.address).subscribe((mosaics) => { + expect(mosaics.length).to.be.greaterThan(0); + expect(mosaics.find((m) => m.id.toHex() === mosaicId.toHex()) !== undefined).to.be.true; + done(); + }); + }); + }); + + describe('getMosaicsFromAccounts', () => { + it('should call getMosaicsFromAccounts successfully', (done) => { + mosaicHttp.getMosaicsFromAccounts([account.address]).subscribe((mosaics) => { + expect(mosaics.length).to.be.greaterThan(0); + expect(mosaics.find((m) => m.id.toHex() === mosaicId.toHex()) !== undefined).to.be.true; + done(); + }); + }); + }); + /** * ========================= * House Keeping diff --git a/e2e/infrastructure/RestrictionHttp.spec.ts b/e2e/infrastructure/RestrictionHttp.spec.ts index 3c0b796f9b..e165b346fd 100644 --- a/e2e/infrastructure/RestrictionHttp.spec.ts +++ b/e2e/infrastructure/RestrictionHttp.spec.ts @@ -17,8 +17,10 @@ import {deepEqual} from 'assert'; import {assert, expect} from 'chai'; import {AccountHttp} from '../../src/infrastructure/AccountHttp'; -import { Listener, TransactionHttp } from '../../src/infrastructure/infrastructure'; -import { RestrictionHttp } from '../../src/infrastructure/RestrictionHttp'; +import { Listener } from '../../src/infrastructure/infrastructure'; +import { RestrictionAccountHttp } from '../../src/infrastructure/RestrictionAccountHttp'; +import { RestrictionMosaicHttp } from '../../src/infrastructure/RestrictionMosaicHttp'; +import { TransactionHttp } from '../../src/infrastructure/TransactionHttp'; import { Account } from '../../src/model/account/Account'; import {Address} from '../../src/model/account/Address'; import {PublicAccount} from '../../src/model/account/PublicAccount'; @@ -26,11 +28,9 @@ import {NetworkType} from '../../src/model/blockchain/NetworkType'; import { MosaicFlags } from '../../src/model/mosaic/MosaicFlags'; import { MosaicId } from '../../src/model/mosaic/MosaicId'; import { MosaicNonce } from '../../src/model/mosaic/MosaicNonce'; -import { AccountRestrictionModificationAction } from '../../src/model/restriction/AccountRestrictionModificationAction'; import { AccountRestrictionFlags } from '../../src/model/restriction/AccountRestrictionType'; import { MosaicRestrictionEntryType } from '../../src/model/restriction/MosaicRestrictionEntryType'; import { MosaicRestrictionType } from '../../src/model/restriction/MosaicRestrictionType'; -import { AccountRestrictionModification } from '../../src/model/transaction/AccountRestrictionModification'; import { AccountRestrictionTransaction } from '../../src/model/transaction/AccountRestrictionTransaction'; import { AggregateTransaction } from '../../src/model/transaction/AggregateTransaction'; import { Deadline } from '../../src/model/transaction/Deadline'; @@ -51,7 +51,8 @@ describe('RestrictionHttp', () => { let accountPublicKey: string; let publicAccount: PublicAccount; let accountHttp: AccountHttp; - let restrictionHttp: RestrictionHttp; + let restrictionMosaicHttp: RestrictionMosaicHttp; + let restrictionAccountHttp: RestrictionAccountHttp; let transactionHttp: TransactionHttp; let mosaicId: MosaicId; let referenceMosaicId: MosaicId; @@ -79,7 +80,8 @@ describe('RestrictionHttp', () => { generationHash = json.generationHash; accountHttp = new AccountHttp(json.apiUrl); transactionHttp = new TransactionHttp(json.apiUrl); - restrictionHttp = new RestrictionHttp(json.apiUrl); + restrictionMosaicHttp = new RestrictionMosaicHttp(json.apiUrl); + restrictionAccountHttp = new RestrictionAccountHttp(json.apiUrl); done(); }); }); @@ -305,7 +307,7 @@ describe('RestrictionHttp', () => { describe('getAccountRestrictions', () => { it('should call getAccountRestrictions successfully', (done) => { setTimeout(() => { - restrictionHttp.getAccountRestrictions(accountAddress).subscribe((accountRestrictions) => { + restrictionAccountHttp.getAccountRestrictions(accountAddress).subscribe((accountRestrictions) => { expect(accountRestrictions.length).to.be.greaterThan(0); done(); }); @@ -316,7 +318,7 @@ describe('RestrictionHttp', () => { describe('getAccountRestrictionsFromAccounts', () => { it('should call getAccountRestrictionsFromAccounts successfully', (done) => { setTimeout(() => { - restrictionHttp.getAccountRestrictionsFromAccounts([accountAddress]).subscribe((accountRestrictions) => { + restrictionAccountHttp.getAccountRestrictionsFromAccounts([accountAddress]).subscribe((accountRestrictions) => { deepEqual(accountRestrictions[0]!.address, accountAddress); done(); }); @@ -327,7 +329,7 @@ describe('RestrictionHttp', () => { describe('getMosaicAddressRestriction', () => { it('should call getMosaicAddressRestriction successfully', (done) => { setTimeout(() => { - restrictionHttp.getMosaicAddressRestriction(mosaicId, account3.address).subscribe((mosaicRestriction) => { + restrictionMosaicHttp.getMosaicAddressRestriction(mosaicId, account3.address).subscribe((mosaicRestriction) => { deepEqual(mosaicRestriction.mosaicId.toHex(), mosaicId.toHex()); deepEqual(mosaicRestriction.entryType, MosaicRestrictionEntryType.ADDRESS); deepEqual(mosaicRestriction.targetAddress.plain(), account3.address.plain()); @@ -341,7 +343,7 @@ describe('RestrictionHttp', () => { describe('getMosaicAddressRestrictions', () => { it('should call getMosaicAddressRestrictions successfully', (done) => { setTimeout(() => { - restrictionHttp.getMosaicAddressRestrictions(mosaicId, [account3.address]).subscribe((mosaicRestriction) => { + restrictionMosaicHttp.getMosaicAddressRestrictions(mosaicId, [account3.address]).subscribe((mosaicRestriction) => { deepEqual(mosaicRestriction[0].mosaicId.toHex(), mosaicId.toHex()); deepEqual(mosaicRestriction[0].entryType, MosaicRestrictionEntryType.ADDRESS); deepEqual(mosaicRestriction[0].targetAddress.plain(), account3.address.plain()); @@ -355,7 +357,7 @@ describe('RestrictionHttp', () => { describe('getMosaicGlobalRestriction', () => { it('should call getMosaicGlobalRestriction successfully', (done) => { setTimeout(() => { - restrictionHttp.getMosaicGlobalRestriction(mosaicId).subscribe((mosaicRestriction) => { + restrictionMosaicHttp.getMosaicGlobalRestriction(mosaicId).subscribe((mosaicRestriction) => { deepEqual(mosaicRestriction.mosaicId.toHex(), mosaicId.toHex()); deepEqual(mosaicRestriction.entryType, MosaicRestrictionEntryType.GLOBAL); deepEqual(mosaicRestriction.restrictions.get(UInt64.fromUint(60641).toString())!.referenceMosaicId.toHex(), @@ -373,7 +375,7 @@ describe('RestrictionHttp', () => { describe('getMosaicGlobalRestrictions', () => { it('should call getMosaicGlobalRestrictions successfully', (done) => { setTimeout(() => { - restrictionHttp.getMosaicGlobalRestrictions([mosaicId]).subscribe((mosaicRestriction) => { + restrictionMosaicHttp.getMosaicGlobalRestrictions([mosaicId]).subscribe((mosaicRestriction) => { deepEqual(mosaicRestriction[0].mosaicId.toHex(), mosaicId.toHex()); deepEqual(mosaicRestriction[0].entryType, MosaicRestrictionEntryType.GLOBAL); deepEqual(mosaicRestriction[0].restrictions.get(UInt64.fromUint(60641).toString())!.referenceMosaicId.toHex(), diff --git a/e2e/infrastructure/TransactionHttp.spec.ts b/e2e/infrastructure/TransactionHttp.spec.ts index fb8bfb8e10..ed6f0af930 100644 --- a/e2e/infrastructure/TransactionHttp.spec.ts +++ b/e2e/infrastructure/TransactionHttp.spec.ts @@ -2115,7 +2115,7 @@ describe('TransactionHttp', () => { describe('transactions', () => { it('should call transactions successfully', (done) => { - accountHttp.transactions(account.publicAccount.address).subscribe((transactions) => { + accountHttp.getAccountTransactions(account.publicAccount.address).subscribe((transactions) => { const transaction = transactions[0]; transactionId = transaction.transactionInfo!.id; transactionHash = transaction.transactionInfo!.hash; diff --git a/e2e/infrastructure/transaction/CreateTransactionFromDTO.spec.ts b/e2e/infrastructure/transaction/CreateTransactionFromDTO.spec.ts index 76e5d21dbd..e976235d46 100644 --- a/e2e/infrastructure/transaction/CreateTransactionFromDTO.spec.ts +++ b/e2e/infrastructure/transaction/CreateTransactionFromDTO.spec.ts @@ -36,7 +36,8 @@ describe('CreateTransactionFromDTO', () => { // tslint:disable-next-line:max-line-length signature: '7442156D839A3AC900BC0299E8701ECDABA674DCF91283223450953B005DE72C538EA54236F5E089530074CE78067CD3325CF53750B9118154C08B20A5CDC00D', signerPublicKey: '2FC3872A792933617D70E02AFF8FBDE152821A0DF0CA5FB04CB56FC3D21C8863', - version: 36865, + version: 1, + network: 144, type: 16724, maxFee: '0', deadline: '1000', @@ -72,7 +73,8 @@ describe('CreateTransactionFromDTO', () => { // tslint:disable-next-line:max-line-length signature: '7442156D839A3AC900BC0299E8701ECDABA674DCF91283223450953B005DE72C538EA54236F5E089530074CE78067CD3325CF53750B9118154C08B20A5CDC00D', signerPublicKey: '2FC3872A792933617D70E02AFF8FBDE152821A0DF0CA5FB04CB56FC3D21C8863', - version: 36865, + version: 1, + network: 144, type: 16724, maxFee: '0', deadline: '1000', @@ -136,12 +138,14 @@ describe('CreateTransactionFromDTO', () => { recipientAddress: '9050B9837EFAB4BBE8A4B9BB32D812F9885C00D8FC1650E142', signerPublicKey: 'B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF', type: 16724, - version: 36865, + version: 1, + network: 144, }, }, ], type: 16705, - version: 36865, + version: 1, + network: 144, }, }; @@ -173,7 +177,8 @@ describe('CreateTransactionFromDTO', () => { '2F6EE63025FEEBCED3293B622AF8581334D0BDAB7541A9E7411E7EE4EF0BC5D0E', signerPublicKey: 'B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF', type: 16718, - version: 36865, + version: 1, + network: 144, }, }; @@ -220,12 +225,14 @@ describe('CreateTransactionFromDTO', () => { registrationType: 0, signerPublicKey: 'B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF', type: 16718, - version: 36865, + version: 1, + network: 144, }, }, ], type: 16705, - version: 36865, + version: 1, + network: 144, }, }; @@ -259,7 +266,8 @@ describe('CreateTransactionFromDTO', () => { 'E02F6EE63025FEEBCED3293B622AF8581334D0BDAB7541A9E7411E7EE4EF0BC5D0E', signerPublicKey: 'B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF', type: 16718, - version: 36865, + version: 1, + network: 144, }, }; const transferTransaction = CreateTransactionFromDTO(registerNamespaceTransactionDTO); @@ -305,12 +313,14 @@ describe('CreateTransactionFromDTO', () => { parentId: '85BBEA6CC462B244', signerPublicKey: 'B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF', type: 16718, - version: 36865, + version: 1, + network: 144, }, }, ], type: 16705, - version: 36865, + version: 1, + network: 144, }, }; @@ -345,7 +355,8 @@ describe('CreateTransactionFromDTO', () => { 'EBCED3293B622AF8581334D0BDAB7541A9E7411E7EE4EF0BC5D0E', signerPublicKey: 'B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF', type: 16717, - version: 36865, + version: 1, + network: 144, }, }; @@ -393,12 +404,14 @@ describe('CreateTransactionFromDTO', () => { duration: '1000', signerPublicKey: 'B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF', type: 16717, - version: 36865, + version: 1, + network: 144, }, }, ], type: 16705, - version: 36865, + version: 1, + network: 144, }, }; @@ -430,7 +443,8 @@ describe('CreateTransactionFromDTO', () => { '2F6EE63025FEEBCED3293B622AF8581334D0BDAB7541A9E7411E7EE4EF0BC5D0E', signerPublicKey: 'B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF', type: 16973, - version: 36865, + version: 1, + network: 144, }, }; @@ -476,12 +490,14 @@ describe('CreateTransactionFromDTO', () => { mosaicId: '85BBEA6CC462B244', signerPublicKey: 'B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF', type: 16973, - version: 36865, + version: 1, + network: 144, }, }, ], type: 16705, - version: 36865, + version: 1, + network: 144, }, }; @@ -508,17 +524,14 @@ describe('CreateTransactionFromDTO', () => { maxFee: '0', minApprovalDelta: 1, minRemovalDelta: 1, - modifications: [ - { - cosignatoryPublicKey: '76C1622C7FB58986E500228E8FFB30C606CAAFC1CD78E770E82C73DAB7BD7C9F', - modificationAction: 0, - }, - ], + publicKeyAdditions: ['76C1622C7FB58986E500228E8FFB30C606CAAFC1CD78E770E82C73DAB7BD7C9F'], + publicKeyDeletions: [], signature: '553E696EB4A54E43A11D180EBA57E4B89D0048C9DD2604A9E0608120018B9E0' + '2F6EE63025FEEBCED3293B622AF8581334D0BDAB7541A9E7411E7EE4EF0BC5D0E', signerPublicKey: 'B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF', type: 16725, - version: 36865, + version: 1, + network: 144, }, }; @@ -562,21 +575,18 @@ describe('CreateTransactionFromDTO', () => { transaction: { minApprovalDelta: 1, minRemovalDelta: 1, - modifications: [ - { - cosignatoryPublicKey: '589B73FBC22063E9AE6FBAC67CB9C6EA865EF556E5' + - 'FB8B7310D45F77C1250B97', - modificationAction: 0, - }, - ], + publicKeyAdditions: ['589B73FBC22063E9AE6FBAC67CB9C6EA865EF556E5FB8B7310D45F77C1250B97'], + publicKeyDeletions: [], signerPublicKey: 'B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF', type: 16725, - version: 36865, + version: 1, + network: 144, }, }, ], type: 16705, - version: 36865, + version: 1, + network: 144, }, }; diff --git a/e2e/infrastructure/transaction/ValidateTransaction.ts b/e2e/infrastructure/transaction/ValidateTransaction.ts index 8f488cac23..09bf1cd4ba 100644 --- a/e2e/infrastructure/transaction/ValidateTransaction.ts +++ b/e2e/infrastructure/transaction/ValidateTransaction.ts @@ -43,9 +43,9 @@ const ValidateTransaction = { expect(transaction.signer.publicKey) .to.be.equal(transactionDTO.transaction.signerPublicKey); expect(transaction.networkType) - .to.be.equal(parseInt(transactionDTO.transaction.version.toString(16).substr(0, 2), 16)); + .to.be.equal(transactionDTO.transaction.network); expect(transaction.version) - .to.be.equal(parseInt(transactionDTO.transaction.version.toString(16).substr(2, 2), 16)); + .to.be.equal(transactionDTO.transaction.version); expect(transaction.type) .to.be.equal(transactionDTO.transaction.type); deepEqual(transaction.maxFee, @@ -82,9 +82,9 @@ const ValidateTransaction = { expect(aggregateTransaction.signer.publicKey) .to.be.equal(aggregateTransactionDTO.transaction.signerPublicKey); expect(aggregateTransaction.networkType) - .to.be.equal(parseInt(aggregateTransactionDTO.transaction.version.toString(16).substr(0, 2), 16)); + .to.be.equal(aggregateTransactionDTO.transaction.network); expect(aggregateTransaction.version) - .to.be.equal(parseInt(aggregateTransactionDTO.transaction.version.toString(16).substr(2, 2), 16)); + .to.be.equal(aggregateTransactionDTO.transaction.version); expect(aggregateTransaction.type) .to.be.equal(aggregateTransactionDTO.transaction.type); deepEqual(aggregateTransaction.maxFee, @@ -122,13 +122,8 @@ const ValidateTransaction = { .to.be.equal(modifyMultisigAccountTransactionDTO.transaction.minApprovalDelta); expect(modifyMultisigAccountTransaction.minRemovalDelta) .to.be.equal(modifyMultisigAccountTransactionDTO.transaction.minRemovalDelta); - - deepEqual(modifyMultisigAccountTransaction.modifications[0], new MultisigCosignatoryModification( - modifyMultisigAccountTransactionDTO.transaction.modifications[0].modificationAction, - PublicAccount.createFromPublicKey(modifyMultisigAccountTransactionDTO.transaction.modifications[0].cosignatoryPublicKey, - NetworkType.MIJIN_TEST), - ), - ); + expect(modifyMultisigAccountTransaction.publicKeyAdditions.length).to.be.equal(1); + expect(modifyMultisigAccountTransaction.publicKeyDeletions.length).to.be.equal(0); }, validateNamespaceCreationTx: (registerNamespaceTransaction, registerNamespaceTransactionDTO) => { expect(registerNamespaceTransaction.registrationType) diff --git a/e2e/service/MosaicRestrictionTransactionService.spec.ts b/e2e/service/MosaicRestrictionTransactionService.spec.ts index fbf830a3f2..7df4d59c53 100644 --- a/e2e/service/MosaicRestrictionTransactionService.spec.ts +++ b/e2e/service/MosaicRestrictionTransactionService.spec.ts @@ -1,7 +1,7 @@ import { assert, expect } from 'chai'; import { KeyGenerator } from '../../src/core/format/KeyGenerator'; import { Listener } from '../../src/infrastructure/Listener'; -import { RestrictionHttp } from '../../src/infrastructure/RestrictionHttp'; +import { RestrictionMosaicHttp } from '../../src/infrastructure/RestrictionMosaicHttp'; import { TransactionHttp } from '../../src/infrastructure/TransactionHttp'; import { Account } from '../../src/model/account/Account'; import { NetworkType } from '../../src/model/blockchain/NetworkType'; @@ -23,7 +23,7 @@ describe('MosaicRestrictionTransactionService', () => { const key = KeyGenerator.generateUInt64Key('TestKey'); let targetAccount: Account; let account: Account; - let restrictionHttp: RestrictionHttp; + let restrictionHttp: RestrictionMosaicHttp; let transactionHttp: TransactionHttp; let mosaicId: MosaicId; let config; @@ -40,7 +40,7 @@ describe('MosaicRestrictionTransactionService', () => { account = Account.createFromPrivateKey(json.testAccount.privateKey, NetworkType.MIJIN_TEST); targetAccount = Account.createFromPrivateKey(json.testAccount3.privateKey, NetworkType.MIJIN_TEST); generationHash = json.generationHash; - restrictionHttp = new RestrictionHttp(json.apiUrl); + restrictionHttp = new RestrictionMosaicHttp(json.apiUrl); transactionHttp = new TransactionHttp(json.apiUrl); done(); }); diff --git a/src/infrastructure/AccountHttp.ts b/src/infrastructure/AccountHttp.ts index 467eca76c2..c8df976268 100644 --- a/src/infrastructure/AccountHttp.ts +++ b/src/infrastructure/AccountHttp.ts @@ -14,34 +14,19 @@ * limitations under the License. */ -import { ClientResponse } from 'http'; import {from as observableFrom, Observable, throwError} from 'rxjs'; -import {catchError, map, mergeMap} from 'rxjs/operators'; -import { DtoMapping } from '../core/utils/DtoMapping'; +import {catchError, map} from 'rxjs/operators'; import {AccountInfo} from '../model/account/AccountInfo'; -import { AccountNames } from '../model/account/AccountNames'; import { ActivityBucket } from '../model/account/ActivityBucket'; import {Address} from '../model/account/Address'; -import {MultisigAccountGraphInfo} from '../model/account/MultisigAccountGraphInfo'; -import {MultisigAccountInfo} from '../model/account/MultisigAccountInfo'; -import {PublicAccount} from '../model/account/PublicAccount'; import {Mosaic} from '../model/mosaic/Mosaic'; import {MosaicId} from '../model/mosaic/MosaicId'; -import { NamespaceId } from '../model/namespace/NamespaceId'; -import { NamespaceName } from '../model/namespace/NamespaceName'; -import { AccountRestrictionsInfo } from '../model/restriction/AccountRestrictionsInfo'; import {AggregateTransaction} from '../model/transaction/AggregateTransaction'; import {Transaction} from '../model/transaction/Transaction'; import { UInt64 } from '../model/UInt64'; import {AccountRepository} from './AccountRepository'; import { AccountInfoDTO, - AccountNamesDTO, - AccountRestrictionsInfoDTO, - AccountRoutesApi, - MosaicDTO, - MultisigAccountGraphInfoDTO, - MultisigAccountInfoDTO, - TransactionInfoDTO } from './api'; + AccountRoutesApi } from './api'; import {Http} from './Http'; import {NetworkHttp} from './NetworkHttp'; import {QueryParams} from './QueryParams'; @@ -77,16 +62,14 @@ export class AccountHttp extends Http implements AccountRepository { */ public getAccountInfo(address: Address): Observable { return observableFrom(this.accountRoutesApi.getAccountInfo(address.plain())).pipe( - map((response: { response: ClientResponse; body: AccountInfoDTO; }) => { - const accountInfoDTO = response.body; - return new AccountInfo( - Address.createFromEncoded(accountInfoDTO.account.address), - UInt64.fromNumericString(accountInfoDTO.account.addressHeight), - accountInfoDTO.account.publicKey, - UInt64.fromNumericString(accountInfoDTO.account.publicKeyHeight), - accountInfoDTO.account.accountType.valueOf(), - accountInfoDTO.account.linkedAccountKey, - accountInfoDTO.account.activityBuckets.map((bucket) => { + map(({body}) => new AccountInfo( + Address.createFromEncoded(body.account.address), + UInt64.fromNumericString(body.account.addressHeight), + body.account.publicKey, + UInt64.fromNumericString(body.account.publicKeyHeight), + body.account.accountType.valueOf(), + body.account.linkedAccountKey, + body.account.activityBuckets.map((bucket) => { return new ActivityBucket( bucket.startHeight, bucket.totalFeesPaid, @@ -94,14 +77,13 @@ export class AccountHttp extends Http implements AccountRepository { bucket.rawScore, ); }), - accountInfoDTO.account.mosaics.map((mosaicDTO) => new Mosaic( + body.account.mosaics.map((mosaicDTO) => new Mosaic( new MosaicId(mosaicDTO.id), UInt64.fromNumericString(mosaicDTO.amount), )), - UInt64.fromNumericString(accountInfoDTO.account.importance), - UInt64.fromNumericString(accountInfoDTO.account.importanceHeight), - ); - }), + UInt64.fromNumericString(body.account.importance), + UInt64.fromNumericString(body.account.importanceHeight), + )), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -117,9 +99,7 @@ export class AccountHttp extends Http implements AccountRepository { }; return observableFrom( this.accountRoutesApi.getAccountsInfo(accountIdsBody)).pipe( - map((response: { response: ClientResponse; body: AccountInfoDTO[]; }) => { - const accountsInfoMetaDataDTO = response.body; - return accountsInfoMetaDataDTO.map((accountInfoDTO: AccountInfoDTO) => { + map(({body}) => body.map((accountInfoDTO: AccountInfoDTO) => { return new AccountInfo( Address.createFromEncoded(accountInfoDTO.account.address), UInt64.fromNumericString(accountInfoDTO.account.addressHeight), @@ -143,89 +123,10 @@ export class AccountHttp extends Http implements AccountRepository { UInt64.fromNumericString(accountInfoDTO.account.importanceHeight), ); - }); - }), - catchError((error) => throwError(this.errorHandling(error))), - ); - } - - public getAccountsNames(addresses: Address[]): Observable { - const accountIdsBody = { - addresses: addresses.map((address) => address.plain()), - }; - return observableFrom( - this.accountRoutesApi.getAccountsNames(accountIdsBody)).pipe( - map((response: { response: ClientResponse; body: any; }) => { - const accountNames = response.body.accountNames; - return accountNames.map((accountName) => { - return new AccountNames( - Address.createFromEncoded(accountName.address), - accountName.names.map((name) => { - return new NamespaceName(new NamespaceId(name), name); - }), - ); - }); - }), + })), catchError((error) => throwError(this.errorHandling(error))), ); } - /** - * Gets a MultisigAccountInfo for an account. - * @param address - * Address can be created rawAddress or publicKey - * @returns Observable - */ - public getMultisigAccountInfo(address: Address): Observable { - return this.getNetworkTypeObservable().pipe( - mergeMap((networkType) => observableFrom( - this.accountRoutesApi.getAccountMultisig(address.plain())) - .pipe(map((response: { response: ClientResponse; body: MultisigAccountInfoDTO; }) => { - const multisigAccountInfoDTO = response.body; - return new MultisigAccountInfo( - PublicAccount.createFromPublicKey(multisigAccountInfoDTO.multisig.accountPublicKey, networkType), - multisigAccountInfoDTO.multisig.minApproval, - multisigAccountInfoDTO.multisig.minRemoval, - multisigAccountInfoDTO.multisig.cosignatoryPublicKeys - .map((cosigner) => PublicAccount.createFromPublicKey(cosigner, networkType)), - multisigAccountInfoDTO.multisig.multisigPublicKeys - .map((multisigAccount) => PublicAccount.createFromPublicKey(multisigAccount, networkType)), - ); - }), - catchError((error) => throwError(this.errorHandling(error))), - ))); - } - - /** - * Gets a MultisigAccountGraphInfo for an account. - * @param address - * Address can be created rawAddress or publicKey - * @returns Observable - */ - public getMultisigAccountGraphInfo(address: Address): Observable { - return this.getNetworkTypeObservable().pipe( - mergeMap((networkType) => observableFrom( - this.accountRoutesApi.getAccountMultisigGraph(address.plain())) - .pipe(map((response: { response: ClientResponse; body: MultisigAccountGraphInfoDTO[]; }) => { - const multisigAccountGraphInfosDTO = response.body; - const multisigAccounts = new Map(); - multisigAccountGraphInfosDTO.map((multisigAccountGraphInfoDTO) => { - multisigAccounts.set(multisigAccountGraphInfoDTO.level, - multisigAccountGraphInfoDTO.multisigEntries.map((multisigAccountInfoDTO) => { - return new MultisigAccountInfo( - PublicAccount.createFromPublicKey(multisigAccountInfoDTO.multisig.accountPublicKey, networkType), - multisigAccountInfoDTO.multisig.minApproval, - multisigAccountInfoDTO.multisig.minRemoval, - multisigAccountInfoDTO.multisig.cosignatoryPublicKeys - .map((cosigner) => PublicAccount.createFromPublicKey(cosigner, networkType)), - multisigAccountInfoDTO.multisig.multisigPublicKeys - .map((multisigAccountDTO) => - PublicAccount.createFromPublicKey(multisigAccountDTO, networkType))); - }), - ); - }); - return new MultisigAccountGraphInfo(multisigAccounts); - }), - catchError((error) => throwError(this.errorHandling(error))), - ))); - } /** * Gets an array of confirmed transactions for which an account is signer or receiver. @@ -233,18 +134,15 @@ export class AccountHttp extends Http implements AccountRepository { * @param queryParams - (Optional) Query params * @returns Observable */ - public transactions(address: Address, queryParams?: QueryParams): Observable { + public getAccountTransactions(address: Address, queryParams?: QueryParams): Observable { return observableFrom( - this.accountRoutesApi.transactions(address.plain(), + this.accountRoutesApi.getAccountTransactions(address.plain(), this.queryParams(queryParams).pageSize, this.queryParams(queryParams).id, this.queryParams(queryParams).order)).pipe( - map((response: { response: ClientResponse; body: TransactionInfoDTO[]; }) => { - const transactionsDTO = response.body; - return transactionsDTO.map((transactionDTO) => { + map(({body}) => body.map((transactionDTO) => { return CreateTransactionFromDTO(transactionDTO); - }); - }), + })), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -256,19 +154,16 @@ export class AccountHttp extends Http implements AccountRepository { * @param queryParams - (Optional) Query params * @returns Observable */ - public incomingTransactions(address: Address, queryParams?: QueryParams): Observable { + public getAccountIncomingTransactions(address: Address, queryParams?: QueryParams): Observable { return observableFrom( - this.accountRoutesApi.incomingTransactions(address.plain(), - this.queryParams(queryParams).pageSize, - this.queryParams(queryParams).id, - this.queryParams(queryParams).order)).pipe( - map((response: { response: ClientResponse; body: TransactionInfoDTO[]; }) => { - const transactionsDTO = response.body; - return transactionsDTO.map((transactionDTO) => { - return CreateTransactionFromDTO(transactionDTO); - }); - }), - catchError((error) => throwError(this.errorHandling(error))), + this.accountRoutesApi.getAccountIncomingTransactions(address.plain(), + this.queryParams(queryParams).pageSize, + this.queryParams(queryParams).id, + this.queryParams(queryParams).order)).pipe( + map(({body}) => body.map((transactionDTO) => { + return CreateTransactionFromDTO(transactionDTO); + })), + catchError((error) => throwError(this.errorHandling(error))), ); } @@ -279,20 +174,17 @@ export class AccountHttp extends Http implements AccountRepository { * @param queryParams - (Optional) Query params * @returns Observable */ - public outgoingTransactions(address: Address, queryParams?: QueryParams): Observable { + public getAccountOutgoingTransactions(address: Address, queryParams?: QueryParams): Observable { return observableFrom( - this.accountRoutesApi.outgoingTransactions(address.plain(), - this.queryParams(queryParams).pageSize, - this.queryParams(queryParams).id, - this.queryParams(queryParams).order)).pipe( - map((response: { response: ClientResponse; body: TransactionInfoDTO[]; }) => { - const transactionsDTO = response.body; - return transactionsDTO.map((transactionDTO) => { - return CreateTransactionFromDTO(transactionDTO); - }); - }), - catchError((error) => throwError(this.errorHandling(error))), - ); + this.accountRoutesApi.getAccountOutgoingTransactions(address.plain(), + this.queryParams(queryParams).pageSize, + this.queryParams(queryParams).id, + this.queryParams(queryParams).order)).pipe( + map(({body}) => body.map((transactionDTO) => { + return CreateTransactionFromDTO(transactionDTO); + })), + catchError((error) => throwError(this.errorHandling(error))), + ); } /** @@ -303,20 +195,17 @@ export class AccountHttp extends Http implements AccountRepository { * @param queryParams - (Optional) Query params * @returns Observable */ - public unconfirmedTransactions(address: Address, queryParams?: QueryParams): Observable { + public getAccountUnconfirmedTransactions(address: Address, queryParams?: QueryParams): Observable { return observableFrom( - this.accountRoutesApi.unconfirmedTransactions(address.plain(), - this.queryParams(queryParams).pageSize, - this.queryParams(queryParams).id, - this.queryParams(queryParams).order)).pipe( - map((response: { response: ClientResponse; body: TransactionInfoDTO[]; }) => { - const transactionsDTO = response.body; - return transactionsDTO.map((transactionDTO) => { - return CreateTransactionFromDTO(transactionDTO); - }); - }), - catchError((error) => throwError(this.errorHandling(error))), - ); + this.accountRoutesApi.getAccountUnconfirmedTransactions(address.plain(), + this.queryParams(queryParams).pageSize, + this.queryParams(queryParams).id, + this.queryParams(queryParams).order)).pipe( + map(({body}) => body.map((transactionDTO) => { + return CreateTransactionFromDTO(transactionDTO); + })), + catchError((error) => throwError(this.errorHandling(error))), + ); } /** @@ -326,19 +215,16 @@ export class AccountHttp extends Http implements AccountRepository { * @param queryParams - (Optional) Query params * @returns Observable */ - public aggregateBondedTransactions(address: Address, queryParams?: QueryParams): Observable { + public getAccountPartialTransactions(address: Address, queryParams?: QueryParams): Observable { return observableFrom( - this.accountRoutesApi.partialTransactions(address.plain(), - this.queryParams(queryParams).pageSize, - this.queryParams(queryParams).id, - this.queryParams(queryParams).order)).pipe( - map((response: { response: ClientResponse; body: TransactionInfoDTO[]; }) => { - const transactionsDTO = response.body; - return transactionsDTO.map((transactionDTO) => { - return CreateTransactionFromDTO(transactionDTO) as AggregateTransaction; - }); - }), - catchError((error) => throwError(this.errorHandling(error))), - ); + this.accountRoutesApi.getAccountPartialTransactions(address.plain(), + this.queryParams(queryParams).pageSize, + this.queryParams(queryParams).id, + this.queryParams(queryParams).order)).pipe( + map(({body}) => body.map((transactionDTO) => { + return CreateTransactionFromDTO(transactionDTO) as AggregateTransaction; + })), + catchError((error) => throwError(this.errorHandling(error))), + ); } } diff --git a/src/infrastructure/AccountRepository.ts b/src/infrastructure/AccountRepository.ts index 149466150f..3e2ee11701 100644 --- a/src/infrastructure/AccountRepository.ts +++ b/src/infrastructure/AccountRepository.ts @@ -16,10 +16,7 @@ import {Observable} from 'rxjs'; import {AccountInfo} from '../model/account/AccountInfo'; -import { AccountNames } from '../model/account/AccountNames'; import {Address} from '../model/account/Address'; -import {MultisigAccountGraphInfo} from '../model/account/MultisigAccountGraphInfo'; -import {MultisigAccountInfo} from '../model/account/MultisigAccountInfo'; import {AggregateTransaction} from '../model/transaction/AggregateTransaction'; import {Transaction} from '../model/transaction/Transaction'; import {QueryParams} from './QueryParams'; @@ -45,36 +42,13 @@ export interface AccountRepository { */ getAccountsInfo(addresses: Address[]): Observable; - /** - * Get readable names for a set of accountIds. - * Returns friendly names for accounts. - * @param accountIds List of Address - * Address can be created rawAddress or publicKey - * @return Observable - */ - getAccountsNames(accountIds: Address[]): Observable; - - /** - * Gets a MultisigAccountInfo for an account. - * @param address - * Address can be created rawAddress or publicKey - * @returns Observable - */ - getMultisigAccountInfo(address: Address): Observable; - - /** - * Gets a MultisigAccountGraphInfo for an account. - * @param address - * Address can be created rawAddress or publicKey - * @returns Observable - */ - getMultisigAccountGraphInfo(address: Address): Observable; - /** * Gets an array of confirmed transactions for which an account is signer or receiver. * @param address - * Address can be created rawAddress or publicKey * @param queryParams - (Optional) Query params * @returns Observable */ - transactions(address: Address, - queryParams?: QueryParams): Observable; + getAccountTransactions(address: Address, queryParams?: QueryParams): Observable; /** * Gets an array of transactions for which an account is the recipient of a transaction. @@ -83,8 +57,7 @@ export interface AccountRepository { * @param queryParams - (Optional) Query params * @returns Observable */ - incomingTransactions(address: Address, - queryParams?: QueryParams): Observable; + getAccountIncomingTransactions(address: Address, queryParams?: QueryParams): Observable; /** * Gets an array of transactions for which an account is the sender a transaction. @@ -93,8 +66,7 @@ export interface AccountRepository { * @param queryParams - (Optional) Query params * @returns Observable */ - outgoingTransactions(address: Address, - queryParams?: QueryParams): Observable; + getAccountOutgoingTransactions(address: Address, queryParams?: QueryParams): Observable; /** * Gets the array of transactions for which an account is the sender or receiver and which have not yet been included in a block. @@ -104,8 +76,7 @@ export interface AccountRepository { * @param queryParams - (Optional) Query params * @returns Observable */ - unconfirmedTransactions(address: Address, - queryParams?: QueryParams): Observable; + getAccountUnconfirmedTransactions(address: Address, queryParams?: QueryParams): Observable; /** * Gets an array of transactions for which an account is the sender or has sign the transaction. @@ -114,6 +85,5 @@ export interface AccountRepository { * @param queryParams - (Optional) Query params * @returns Observable */ - aggregateBondedTransactions(address: Address, - queryParams?: QueryParams): Observable; + getAccountPartialTransactions(address: Address, queryParams?: QueryParams): Observable; } diff --git a/src/infrastructure/BlockHttp.ts b/src/infrastructure/BlockHttp.ts index c01b14a7c6..c9293e137d 100644 --- a/src/infrastructure/BlockHttp.ts +++ b/src/infrastructure/BlockHttp.ts @@ -14,26 +14,19 @@ * limitations under the License. */ -import { ClientResponse } from 'http'; import {from as observableFrom, Observable, throwError} from 'rxjs'; -import {catchError, map, mergeMap} from 'rxjs/operators'; +import {catchError, map} from 'rxjs/operators'; import {PublicAccount} from '../model/account/PublicAccount'; import {BlockInfo} from '../model/blockchain/BlockInfo'; import { MerklePathItem } from '../model/blockchain/MerklePathItem'; import { MerkleProofInfo } from '../model/blockchain/MerkleProofInfo'; -import { Statement } from '../model/receipt/Statement'; import {Transaction} from '../model/transaction/Transaction'; import {UInt64} from '../model/UInt64'; -import { BlockInfoDTO, - BlockRoutesApi, - MerkleProofInfoDTO, - StatementsDTO, - TransactionInfoDTO } from './api'; +import { BlockRoutesApi } from './api'; import {BlockRepository} from './BlockRepository'; import {Http} from './Http'; import { NetworkHttp } from './NetworkHttp'; import {QueryParams} from './QueryParams'; -import { CreateStatementFromDTO } from './receipt/CreateReceiptFromDTO'; import {CreateTransactionFromDTO, extractBeneficiary} from './transaction/CreateTransactionFromDTO'; /** @@ -78,10 +71,10 @@ export class BlockHttp extends Http implements BlockRepository { * @param height - Block height * @returns Observable */ - public getBlockByHeight(height: number): Observable { + public getBlockByHeight(height: string): Observable { return observableFrom(this.blockRoutesApi.getBlockByHeight(height)).pipe( - map((response: { response: ClientResponse; body: BlockInfoDTO; } ) => { - const blockDTO = response.body; + map(({body}) => { + const blockDTO = body; const networkType = parseInt((blockDTO.block.version as number).toString(16).substr(0, 2), 16); return new BlockInfo( blockDTO.meta.hash, @@ -114,19 +107,16 @@ export class BlockHttp extends Http implements BlockRepository { * @param queryParams - (Optional) Query params * @returns Observable */ - public getBlockTransactions(height: number, + public getBlockTransactions(height: string, queryParams?: QueryParams): Observable { return observableFrom( this.blockRoutesApi.getBlockTransactions(height, this.queryParams(queryParams).pageSize, this.queryParams(queryParams).id, this.queryParams(queryParams).order)) - .pipe(map((response: { response: ClientResponse; body: TransactionInfoDTO[]; }) => { - const transactionsDTO = response.body; - return transactionsDTO.map((transactionDTO) => { + .pipe(map(({body}) => body.map((transactionDTO) => { return CreateTransactionFromDTO(transactionDTO); - }); - }), + })), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -137,12 +127,10 @@ export class BlockHttp extends Http implements BlockRepository { * @param limit - Number of blocks returned. Limit value only available in 25, 50. 75 and 100. (default 25) * @returns Observable */ - public getBlocksByHeightWithLimit(height: number, limit: LimitType = LimitType.N_25): Observable { + public getBlocksByHeightWithLimit(height: string, limit: LimitType = LimitType.N_25): Observable { return observableFrom( this.blockRoutesApi.getBlocksByHeightWithLimit(height, limit)).pipe( - map((response: { response: ClientResponse; body: BlockInfoDTO[]; }) => { - const blocksDTO = response.body; - return blocksDTO.map((blockDTO) => { + map(({body}) => body.map((blockDTO) => { const networkType = parseInt((blockDTO.block.version as number).toString(16).substr(0, 2), 16); return new BlockInfo( blockDTO.meta.hash, @@ -164,32 +152,7 @@ export class BlockHttp extends Http implements BlockRepository { blockDTO.block.stateHash, extractBeneficiary(blockDTO, networkType), ); - }); - }), - catchError((error) => throwError(this.errorHandling(error))), - ); - } - - /** - * Get the merkle path for a given a receipt statement hash and block - * Returns the merkle path for a [receipt statement or resolution](https://nemtech.github.io/concepts/receipt.html) - * linked to a block. The path is the complementary data needed to calculate the merkle root. - * A client can compare if the calculated root equals the one recorded in the block header, - * verifying that the receipt was linked with the block. - * @param height The height of the block. - * @param hash The hash of the receipt statement or resolution. - * @return Observable - */ - public getMerkleReceipts(height: number, hash: string): Observable { - return observableFrom( - this.blockRoutesApi.getMerkleReceipts(height, hash)).pipe( - map((response: { response: ClientResponse; body: MerkleProofInfoDTO; } ) => { - const merkleProofReceipt = response.body; - return new MerkleProofInfo( - merkleProofReceipt.merklePath!.map( - (payload) => new MerklePathItem(payload.position, payload.hash)), - ); - }), + })), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -204,37 +167,13 @@ export class BlockHttp extends Http implements BlockRepository { * @param hash The hash of the transaction. * @return Observable */ - public getMerkleTransaction(height: number, hash: string): Observable { + public getMerkleTransaction(height: string, hash: string): Observable { return observableFrom( - this.blockRoutesApi.getMerkleReceipts(height, hash)).pipe( - map((response: { response: ClientResponse; body: MerkleProofInfoDTO; } ) => { - const merkleProofTransaction = response.body; - return new MerkleProofInfo( - merkleProofTransaction.merklePath!.map( - (payload) => new MerklePathItem(payload.position, payload.hash)), - ); - }), + this.blockRoutesApi.getMerkleTransaction(height, hash)).pipe( + map(({body}) => new MerkleProofInfo( + body.merklePath!.map((payload) => new MerklePathItem(payload.position, payload.hash)), + )), catchError((error) => throwError(this.errorHandling(error))), ); } - - /** - * Gets an array receipts for a block height. - * @param height - Block height from which will be the first block in the array - * @param queryParams - (Optional) Query params - * @returns Observable - */ - public getBlockReceipts(height: number): Observable { - return this.getNetworkTypeObservable().pipe( - mergeMap((networkType) => observableFrom( - this.blockRoutesApi.getBlockReceipts(height)).pipe( - map((response: { response: ClientResponse; body: StatementsDTO; }) => { - const receiptDTO = response.body; - return CreateStatementFromDTO(receiptDTO, networkType); - }), - catchError((error) => throwError(this.errorHandling(error))), - ), - ), - ); - } } diff --git a/src/infrastructure/BlockRepository.ts b/src/infrastructure/BlockRepository.ts index 9b4f4556cd..cd606ef22a 100644 --- a/src/infrastructure/BlockRepository.ts +++ b/src/infrastructure/BlockRepository.ts @@ -33,7 +33,7 @@ export interface BlockRepository { * @param height - Block height * @returns Observable */ - getBlockByHeight(height: number): Observable; + getBlockByHeight(height: string): Observable; /** * Gets array of transactions included in a block for a block height @@ -41,7 +41,7 @@ export interface BlockRepository { * @param queryParams - (Optional) Query params * @returns Observable */ - getBlockTransactions(height: number, + getBlockTransactions(height: string, queryParams?: QueryParams): Observable; /** @@ -51,19 +51,7 @@ export interface BlockRepository { * @returns Observable */ - getBlocksByHeightWithLimit(height: number, limit: number): Observable; - - /** - * Get the merkle path for a given a receipt statement hash and block - * Returns the merkle path for a [receipt statement or resolution](https://nemtech.github.io/concepts/receipt.html) - * linked to a block. The path is the complementary data needed to calculate the merkle root. - * A client can compare if the calculated root equals the one recorded in the block header, - * verifying that the receipt was linked with the block. - * @param height The height of the block. - * @param hash The hash of the receipt statement or resolution. - * @return Observable - */ - getMerkleReceipts(height: number, hash: string): Observable; + getBlocksByHeightWithLimit(height: string, limit: number): Observable; /** * Get the merkle path for a given a transaction and block @@ -75,13 +63,5 @@ export interface BlockRepository { * @param hash The hash of the transaction. * @return Observable */ - getMerkleTransaction(height: number, hash: string): Observable; - - /** - * Get receipts from a block - * Returns the receipts linked to a block. - * @param {Number} height The height of the block. - * @return Observable - */ - getBlockReceipts(height: number): Observable; + getMerkleTransaction(height: string, hash: string): Observable; } diff --git a/src/infrastructure/ChainHttp.ts b/src/infrastructure/ChainHttp.ts index a5664a42e6..e07c9a23d0 100644 --- a/src/infrastructure/ChainHttp.ts +++ b/src/infrastructure/ChainHttp.ts @@ -14,16 +14,13 @@ * limitations under the License. */ -import { ClientResponse } from 'http'; import {from as observableFrom, Observable, throwError} from 'rxjs'; import {catchError, map} from 'rxjs/operators'; import {BlockchainScore} from '../model/blockchain/BlockchainScore'; import {UInt64} from '../model/UInt64'; -import { ChainRoutesApi, - HeightInfoDTO } from './api'; +import { ChainRoutesApi } from './api'; import { ChainRepository } from './ChainRepository'; import {Http} from './Http'; -import { ChainScoreDTO } from './model/chainScoreDTO'; /** * Chian http repository. @@ -51,11 +48,8 @@ export class ChainHttp extends Http implements ChainRepository { * @returns Observable */ public getBlockchainHeight(): Observable { - return observableFrom(this.chainRoutesApi.getBlockchainHeight()).pipe( - map((response: { response: ClientResponse; body: HeightInfoDTO; } ) => { - const heightDTO = response.body; - return UInt64.fromNumericString(heightDTO.height); - }), + return observableFrom(this.chainRoutesApi.getChainHeight()).pipe( + map(({body}) => UInt64.fromNumericString(body.height)), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -66,13 +60,10 @@ export class ChainHttp extends Http implements ChainRepository { */ public getChainScore(): Observable { return observableFrom(this.chainRoutesApi.getChainScore()).pipe( - map((response: { response: ClientResponse; body: ChainScoreDTO; } ) => { - const blockchainScoreDTO = response.body; - return new BlockchainScore( - UInt64.fromNumericString(blockchainScoreDTO.scoreLow), - UInt64.fromNumericString(blockchainScoreDTO.scoreHigh), - ); - }), + map(({body}) => new BlockchainScore( + UInt64.fromNumericString(body.scoreLow), + UInt64.fromNumericString(body.scoreHigh), + )), catchError((error) => throwError(this.errorHandling(error))), ); } diff --git a/src/infrastructure/DiagnosticHttp.ts b/src/infrastructure/DiagnosticHttp.ts index 0af049602a..212aa87547 100644 --- a/src/infrastructure/DiagnosticHttp.ts +++ b/src/infrastructure/DiagnosticHttp.ts @@ -14,12 +14,11 @@ * limitations under the License. */ -import { ClientResponse } from 'http'; import {from as observableFrom, Observable, throwError} from 'rxjs'; import {catchError, map} from 'rxjs/operators'; import {BlockchainStorageInfo} from '../model/blockchain/BlockchainStorageInfo'; import { ServerInfo } from '../model/diagnostic/ServerInfo'; -import { DiagnosticRoutesApi, ServerDTO, StorageInfoDTO } from './api'; +import { DiagnosticRoutesApi } from './api'; import {DiagnosticRepository} from './DiagnosticRepository'; import {Http} from './Http'; @@ -51,14 +50,11 @@ export class DiagnosticHttp extends Http implements DiagnosticRepository { public getDiagnosticStorage(): Observable { return observableFrom( this.diagnosticRoutesApi.getDiagnosticStorage()).pipe( - map((response: { response: ClientResponse; body: StorageInfoDTO; } ) => { - const blockchainStorageInfoDTO = response.body; - return new BlockchainStorageInfo( - blockchainStorageInfoDTO.numBlocks, - blockchainStorageInfoDTO.numTransactions, - blockchainStorageInfoDTO.numAccounts, - ); - }), + map(({body}) => new BlockchainStorageInfo( + body.numBlocks, + body.numTransactions, + body.numAccounts, + )), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -70,11 +66,7 @@ export class DiagnosticHttp extends Http implements DiagnosticRepository { public getServerInfo(): Observable { return observableFrom( this.diagnosticRoutesApi.getServerInfo()).pipe( - map((response: { response: ClientResponse; body: ServerDTO; } ) => { - const serverDTO = response.body; - return new ServerInfo(serverDTO.serverInfo.restVersion, - serverDTO.serverInfo.sdkVersion); - }), + map(({body}) => new ServerInfo(body.serverInfo.restVersion, body.serverInfo.sdkVersion)), catchError((error) => throwError(this.errorHandling(error))), ); } diff --git a/src/infrastructure/Listener.ts b/src/infrastructure/Listener.ts index d1a3d7691d..582ef69ed2 100644 --- a/src/infrastructure/Listener.ts +++ b/src/infrastructure/Listener.ts @@ -142,7 +142,6 @@ export class Listener { message: CreateTransactionFromDTO(message), }); } else if (message.block) { - const networkType = parseInt(message.block.version.toString(16).substr(0, 2), 16); this.messageSubject.next({ channelName: ListenerChannelName.block, message: new BlockInfo( message.meta.hash, @@ -150,9 +149,9 @@ export class Listener { message.meta.totalFee ? UInt64.fromNumericString(message.meta.totalFee) : new UInt64([0, 0]), message.meta.numTransactions, message.block.signature, - PublicAccount.createFromPublicKey(message.block.signerPublicKey, networkType), - networkType, - parseInt(message.block.version.toString(16).substr(2, 2), 16), // Tx version + PublicAccount.createFromPublicKey(message.block.signerPublicKey, message.block.network), + message.block.network, + message.block.version, message.block.type, UInt64.fromNumericString(message.block.height), UInt64.fromNumericString(message.block.timestamp), @@ -162,7 +161,7 @@ export class Listener { message.block.blockTransactionsHash, message.block.blockReceiptsHash, message.block.stateHash, - extractBeneficiary(message, networkType), // passing `message` as `blockDTO` + extractBeneficiary(message, message.block.network), // passing `message` as `blockDTO` ), }); } else if (message.status) { diff --git a/src/infrastructure/MetadataHttp.ts b/src/infrastructure/MetadataHttp.ts index b0cf337628..25a73fbb1a 100644 --- a/src/infrastructure/MetadataHttp.ts +++ b/src/infrastructure/MetadataHttp.ts @@ -14,7 +14,6 @@ * limitations under the License. */ -import { ClientResponse } from 'http'; import {from as observableFrom, Observable, throwError} from 'rxjs'; import {catchError, map} from 'rxjs/operators'; import { Convert } from '../core/format/Convert'; @@ -25,7 +24,7 @@ import { MetadataType } from '../model/metadata/MetadataType'; import {MosaicId} from '../model/mosaic/MosaicId'; import {NamespaceId} from '../model/namespace/NamespaceId'; import {UInt64} from '../model/UInt64'; -import { MetadataDTO, MetadataEntriesDTO, MetadataRoutesApi } from './api'; +import { MetadataDTO, MetadataRoutesApi } from './api'; import {Http} from './Http'; import { MetadataRepository } from './MetadataRepository'; import {NetworkHttp} from './NetworkHttp'; @@ -66,12 +65,9 @@ export class MetadataHttp extends Http implements MetadataRepository { this.queryParams(queryParams).pageSize, this.queryParams(queryParams).id, this.queryParams(queryParams).order)).pipe( - map((response: { response: ClientResponse; body: MetadataEntriesDTO; }) => { - const metadataEntriesDTO = response.body; - return metadataEntriesDTO.metadataEntries.map((metadataEntry) => { + map(({body}) => body.metadataEntries.map((metadataEntry) => { return this.buildMetadata(metadataEntry); - }); - }), + })), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -85,12 +81,9 @@ export class MetadataHttp extends Http implements MetadataRepository { getAccountMetadataByKey(address: Address, key: string): Observable { return observableFrom( this.metadataRoutesApi.getAccountMetadataByKey(address.plain(), key)).pipe( - map((response: { response: ClientResponse; body: MetadataEntriesDTO; }) => { - const metadataEntriesDTO = response.body; - return metadataEntriesDTO.metadataEntries.map((metadataEntry) => { + map(({body}) => body.metadataEntries.map((metadataEntry) => { return this.buildMetadata(metadataEntry); - }); - }), + })), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -105,10 +98,7 @@ export class MetadataHttp extends Http implements MetadataRepository { getAccountMetadataByKeyAndSender(address: Address, key: string, publicKey: string): Observable { return observableFrom( this.metadataRoutesApi.getAccountMetadataByKeyAndSender(address.plain(), key, publicKey)).pipe( - map((response: { response: ClientResponse; body: MetadataDTO; }) => { - const metadataDTO = response.body; - return this.buildMetadata(metadataDTO); - }), + map(({body}) => this.buildMetadata(body)), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -125,12 +115,9 @@ export class MetadataHttp extends Http implements MetadataRepository { this.queryParams(queryParams).pageSize, this.queryParams(queryParams).id, this.queryParams(queryParams).order)).pipe( - map((response: { response: ClientResponse; body: MetadataEntriesDTO; }) => { - const metadataEntriesDTO = response.body; - return metadataEntriesDTO.metadataEntries.map((metadataEntry) => { + map(({body}) => body.metadataEntries.map((metadataEntry) => { return this.buildMetadata(metadataEntry); - }); - }), + })), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -144,12 +131,9 @@ export class MetadataHttp extends Http implements MetadataRepository { getMosaicMetadataByKey(mosaicId: MosaicId, key: string): Observable { return observableFrom( this.metadataRoutesApi.getMosaicMetadataByKey(mosaicId.toHex(), key)).pipe( - map((response: { response: ClientResponse; body: MetadataEntriesDTO; }) => { - const metadataEntriesDTO = response.body; - return metadataEntriesDTO.metadataEntries.map((metadataEntry) => { + map(({body}) => body.metadataEntries.map((metadataEntry) => { return this.buildMetadata(metadataEntry); - }); - }), + })), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -164,10 +148,7 @@ export class MetadataHttp extends Http implements MetadataRepository { getMosaicMetadataByKeyAndSender(mosaicId: MosaicId, key: string, publicKey: string): Observable { return observableFrom( this.metadataRoutesApi.getMosaicMetadataByKeyAndSender(mosaicId.toHex(), key, publicKey)).pipe( - map((response: { response: ClientResponse; body: MetadataDTO; }) => { - const metadataDTO = response.body; - return this.buildMetadata(metadataDTO); - }), + map(({body}) => this.buildMetadata(body)), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -184,12 +165,9 @@ export class MetadataHttp extends Http implements MetadataRepository { this.queryParams(queryParams).pageSize, this.queryParams(queryParams).id, this.queryParams(queryParams).order)).pipe( - map((response: { response: ClientResponse; body: MetadataEntriesDTO; }) => { - const metadataEntriesDTO = response.body; - return metadataEntriesDTO.metadataEntries.map((metadataEntry) => { + map(({body}) => body.metadataEntries.map((metadataEntry) => { return this.buildMetadata(metadataEntry); - }); - }), + })), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -203,12 +181,9 @@ export class MetadataHttp extends Http implements MetadataRepository { public getNamespaceMetadataByKey(namespaceId: NamespaceId, key: string): Observable { return observableFrom( this.metadataRoutesApi.getNamespaceMetadataByKey(namespaceId.toHex(), key)).pipe( - map((response: { response: ClientResponse; body: MetadataEntriesDTO; }) => { - const metadataEntriesDTO = response.body; - return metadataEntriesDTO.metadataEntries.map((metadataEntry) => { + map(({body}) => body.metadataEntries.map((metadataEntry) => { return this.buildMetadata(metadataEntry); - }); - }), + })), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -223,10 +198,7 @@ export class MetadataHttp extends Http implements MetadataRepository { public getNamespaceMetadataByKeyAndSender(namespaceId: NamespaceId, key: string, publicKey: string): Observable { return observableFrom( this.metadataRoutesApi.getNamespaceMetadataByKeyAndSender(namespaceId.toHex(), key, publicKey)).pipe( - map((response: { response: ClientResponse; body: MetadataDTO; }) => { - const metadataDTO = response.body; - return this.buildMetadata(metadataDTO); - }), + map(({body}) => this.buildMetadata(body)), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -259,7 +231,6 @@ export class MetadataHttp extends Http implements MetadataRepository { metadataEntry.targetPublicKey, UInt64.fromHex(metadataEntry.scopedMetadataKey), metadataEntry.metadataType.valueOf(), - metadataEntry.valueSize, Convert.decodeHex(metadataEntry.value), targetId, ), diff --git a/src/infrastructure/MosaicHttp.ts b/src/infrastructure/MosaicHttp.ts index 28eae72a02..81474ca627 100644 --- a/src/infrastructure/MosaicHttp.ts +++ b/src/infrastructure/MosaicHttp.ts @@ -1,5 +1,5 @@ /* - * Copyright 2018 NEM + * Copyright 2019 NEM * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,18 +14,15 @@ * limitations under the License. */ -import { ClientResponse } from 'http'; import {from as observableFrom, Observable, throwError} from 'rxjs'; import {catchError, map, mergeMap} from 'rxjs/operators'; +import { Address } from '../model/account/Address'; import {PublicAccount} from '../model/account/PublicAccount'; import {MosaicFlags} from '../model/mosaic/MosaicFlags'; import {MosaicId} from '../model/mosaic/MosaicId'; import {MosaicInfo} from '../model/mosaic/MosaicInfo'; -import { MosaicNames } from '../model/mosaic/MosaicNames'; -import {NamespaceId} from '../model/namespace/NamespaceId'; -import { NamespaceName } from '../model/namespace/NamespaceName'; import {UInt64} from '../model/UInt64'; -import { MosaicInfoDTO, MosaicNamesDTO, MosaicRoutesApi, MosaicsNamesDTO } from './api'; +import { MosaicRoutesApi } from './api'; import {Http} from './Http'; import {MosaicRepository} from './MosaicRepository'; import {NetworkHttp} from './NetworkHttp'; @@ -62,19 +59,16 @@ export class MosaicHttp extends Http implements MosaicRepository { return this.getNetworkTypeObservable().pipe( mergeMap((networkType) => observableFrom( this.mosaicRoutesApi.getMosaic(mosaicId.toHex())).pipe( - map((response: { response: ClientResponse; body: MosaicInfoDTO; } ) => { - const mosaicInfoDTO = response.body; - return new MosaicInfo( - new MosaicId(mosaicInfoDTO.mosaic.id), - UInt64.fromNumericString(mosaicInfoDTO.mosaic.supply), - UInt64.fromNumericString(mosaicInfoDTO.mosaic.startHeight), - PublicAccount.createFromPublicKey(mosaicInfoDTO.mosaic.ownerPublicKey, networkType), - mosaicInfoDTO.mosaic.revision, - new MosaicFlags(mosaicInfoDTO.mosaic.flags), - mosaicInfoDTO.mosaic.divisibility, - UInt64.fromNumericString(mosaicInfoDTO.mosaic.duration), - ); - }), + map(({body}) => new MosaicInfo( + new MosaicId(body.mosaic.id), + UInt64.fromNumericString(body.mosaic.supply), + UInt64.fromNumericString(body.mosaic.startHeight), + PublicAccount.createFromPublicKey(body.mosaic.ownerPublicKey, networkType), + body.mosaic.revision, + new MosaicFlags(body.mosaic.flags), + body.mosaic.divisibility, + UInt64.fromNumericString(body.mosaic.duration), + )), catchError((error) => throwError(this.errorHandling(error))), )), ); @@ -92,21 +86,18 @@ export class MosaicHttp extends Http implements MosaicRepository { return this.getNetworkTypeObservable().pipe( mergeMap((networkType) => observableFrom( this.mosaicRoutesApi.getMosaics(mosaicIdsBody)).pipe( - map((response: { response: ClientResponse; body: MosaicInfoDTO[]; }) => { - const mosaicInfosDTO = response.body; - return mosaicInfosDTO.map((mosaicInfoDTO) => { - return new MosaicInfo( - new MosaicId(mosaicInfoDTO.mosaic.id), - UInt64.fromNumericString(mosaicInfoDTO.mosaic.supply), - UInt64.fromNumericString(mosaicInfoDTO.mosaic.startHeight), - PublicAccount.createFromPublicKey(mosaicInfoDTO.mosaic.ownerPublicKey, networkType), - mosaicInfoDTO.mosaic.revision, - new MosaicFlags(mosaicInfoDTO.mosaic.flags), - mosaicInfoDTO.mosaic.divisibility, - UInt64.fromNumericString(mosaicInfoDTO.mosaic.duration), - ); - }); - }), + map(({body}) => body.map((mosaicInfoDTO) => { + return new MosaicInfo( + new MosaicId(mosaicInfoDTO.mosaic.id), + UInt64.fromNumericString(mosaicInfoDTO.mosaic.supply), + UInt64.fromNumericString(mosaicInfoDTO.mosaic.startHeight), + PublicAccount.createFromPublicKey(mosaicInfoDTO.mosaic.ownerPublicKey, networkType), + mosaicInfoDTO.mosaic.revision, + new MosaicFlags(mosaicInfoDTO.mosaic.flags), + mosaicInfoDTO.mosaic.divisibility, + UInt64.fromNumericString(mosaicInfoDTO.mosaic.duration), + ); + })), catchError((error) => throwError(this.errorHandling(error))), ), ), @@ -114,29 +105,56 @@ export class MosaicHttp extends Http implements MosaicRepository { } /** - * Get readable names for a set of mosaics - * Returns friendly names for mosaics. - * @param mosaicIds - Array of mosaic ids - * @return Observable + * Gets an array of mosaics created for a given account address. + * @summary Get mosaics created by an account + * @param address Account address. */ - public getMosaicsNames(mosaicIds: MosaicId[]): Observable { - const mosaicIdsBody = { - mosaicIds: mosaicIds.map((id) => id.toHex()), + public getMosaicsFromAccount(address: Address): Observable { + return this.getNetworkTypeObservable().pipe( + mergeMap((networkType) => observableFrom( + this.mosaicRoutesApi.getMosaicsFromAccount(address.plain())).pipe( + map(({body}) => body.mosaics.map((mosaicInfo) => + new MosaicInfo( + new MosaicId(mosaicInfo.id), + UInt64.fromNumericString(mosaicInfo.supply), + UInt64.fromNumericString(mosaicInfo.startHeight), + PublicAccount.createFromPublicKey(mosaicInfo.ownerPublicKey, networkType), + mosaicInfo.revision, + new MosaicFlags(mosaicInfo.flags), + mosaicInfo.divisibility, + UInt64.fromNumericString(mosaicInfo.duration)))), + catchError((error) => throwError(this.errorHandling(error))), + )), + ); + } + + /** + * Gets mosaics created for a given array of addresses. + * @summary Get mosaics created for given array of addresses + * @param addresses Array of addresses + */ + public getMosaicsFromAccounts(addresses: Address[]): Observable { + const accountIdsBody = { + addresses: addresses.map((address) => address.plain()), }; - return observableFrom( - this.mosaicRoutesApi.getMosaicsNames(mosaicIdsBody)).pipe( - map((response: { response: ClientResponse; body: MosaicsNamesDTO; }) => { - const mosaics = response.body; - return mosaics.mosaicNames.map((mosaic) => { - return new MosaicNames( - new MosaicId(mosaic.mosaicId), - mosaic.names.map((name) => { - return new NamespaceName(new NamespaceId(name), name); - }), + return this.getNetworkTypeObservable().pipe( + mergeMap((networkType) => observableFrom( + this.mosaicRoutesApi.getMosaicsFromAccounts(accountIdsBody)).pipe( + map(({body}) => body.mosaics.map((mosaicInfoDTO) => { + return new MosaicInfo( + new MosaicId(mosaicInfoDTO.id), + UInt64.fromNumericString(mosaicInfoDTO.supply), + UInt64.fromNumericString(mosaicInfoDTO.startHeight), + PublicAccount.createFromPublicKey(mosaicInfoDTO.ownerPublicKey, networkType), + mosaicInfoDTO.revision, + new MosaicFlags(mosaicInfoDTO.flags), + mosaicInfoDTO.divisibility, + UInt64.fromNumericString(mosaicInfoDTO.duration), ); - }); - }), - catchError((error) => throwError(this.errorHandling(error))), - ); + })), + catchError((error) => throwError(this.errorHandling(error))), + ), + ), + ); } } diff --git a/src/infrastructure/MosaicRepository.ts b/src/infrastructure/MosaicRepository.ts index fbe71a84b4..1913432e46 100644 --- a/src/infrastructure/MosaicRepository.ts +++ b/src/infrastructure/MosaicRepository.ts @@ -1,5 +1,5 @@ /* - * Copyright 2018 NEM + * Copyright 2019 NEM * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,9 +15,9 @@ */ import {Observable} from 'rxjs'; +import { Address } from '../model/account/Address'; import {MosaicId} from '../model/mosaic/MosaicId'; import {MosaicInfo} from '../model/mosaic/MosaicInfo'; -import { MosaicNames } from '../model/mosaic/MosaicNames'; /** * Mosaic interface repository. @@ -40,11 +40,17 @@ export interface MosaicRepository { */ getMosaics(mosaicIds: MosaicId[]): Observable; + /** + * Gets mosaics created for a given address. + * @summary Get mosaics created for given address + * @param address Address + */ + getMosaicsFromAccount(address: Address): Observable; + /** - * Get readable names for a set of mosaics - * Returns friendly names for mosaics. - * @param mosaicIds - Array of mosaic ids - * @return Observable + * Gets mosaics created for a given array of addresses. + * @summary Get mosaics created for given array of addresses + * @param addresses Address */ - getMosaicsNames(mosaicIds: MosaicId[]): Observable; + getMosaicsFromAccounts(addresses: Address[]): Observable; } diff --git a/src/infrastructure/MultisigHttp.ts b/src/infrastructure/MultisigHttp.ts new file mode 100644 index 0000000000..c705dd1f96 --- /dev/null +++ b/src/infrastructure/MultisigHttp.ts @@ -0,0 +1,105 @@ +/* + * Copyright 2019 NEM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {from as observableFrom, Observable, throwError} from 'rxjs'; +import {catchError, map, mergeMap} from 'rxjs/operators'; +import {Address} from '../model/account/Address'; +import {MultisigAccountGraphInfo} from '../model/account/MultisigAccountGraphInfo'; +import {MultisigAccountInfo} from '../model/account/MultisigAccountInfo'; +import {PublicAccount} from '../model/account/PublicAccount'; +import { MultisigRoutesApi } from './api/multisigRoutesApi'; +import {Http} from './Http'; +import { MultisigRepository } from './MultisigRepository'; +import {NetworkHttp} from './NetworkHttp'; + +/** + * Multisig http repository. + * + * @since 1.0 + */ +export class MultisigHttp extends Http implements MultisigRepository { + /** + * @internal + * Nem2 Library account routes api + */ + private multisigRoutesApi: MultisigRoutesApi; + + /** + * Constructor + * @param url + * @param networkHttp + */ + constructor(url: string, networkHttp?: NetworkHttp) { + networkHttp = networkHttp == null ? new NetworkHttp(url) : networkHttp; + super(networkHttp); + this.multisigRoutesApi = new MultisigRoutesApi(url); + } + + /** + * Gets a MultisigAccountInfo for an account. + * @param address - * Address can be created rawAddress or publicKey + * @returns Observable + */ + public getMultisigAccountInfo(address: Address): Observable { + return this.getNetworkTypeObservable().pipe( + mergeMap((networkType) => observableFrom( + this.multisigRoutesApi.getAccountMultisig(address.plain())) + .pipe(map(({body}) => new MultisigAccountInfo( + PublicAccount.createFromPublicKey(body.multisig.accountPublicKey, networkType), + body.multisig.minApproval, + body.multisig.minRemoval, + body.multisig.cosignatoryPublicKeys + .map((cosigner) => PublicAccount.createFromPublicKey(cosigner, networkType)), + body.multisig.multisigPublicKeys + .map((multisigAccount) => PublicAccount.createFromPublicKey(multisigAccount, networkType)), + )), + catchError((error) => throwError(this.errorHandling(error))), + ))); + } + + /** + * Gets a MultisigAccountGraphInfo for an account. + * @param address - * Address can be created rawAddress or publicKey + * @returns Observable + */ + public getMultisigAccountGraphInfo(address: Address): Observable { + return this.getNetworkTypeObservable().pipe( + mergeMap((networkType) => observableFrom( + this.multisigRoutesApi.getAccountMultisigGraph(address.plain())) + .pipe(map(({body}) => { + const multisigAccountGraphInfosDTO = body; + const multisigAccounts = new Map(); + multisigAccountGraphInfosDTO.map((multisigAccountGraphInfoDTO) => { + multisigAccounts.set(multisigAccountGraphInfoDTO.level, + multisigAccountGraphInfoDTO.multisigEntries.map((multisigAccountInfoDTO) => { + return new MultisigAccountInfo( + PublicAccount.createFromPublicKey(multisigAccountInfoDTO.multisig.accountPublicKey, networkType), + multisigAccountInfoDTO.multisig.minApproval, + multisigAccountInfoDTO.multisig.minRemoval, + multisigAccountInfoDTO.multisig.cosignatoryPublicKeys + .map((cosigner) => PublicAccount.createFromPublicKey(cosigner, networkType)), + multisigAccountInfoDTO.multisig.multisigPublicKeys + .map((multisigAccountDTO) => + PublicAccount.createFromPublicKey(multisigAccountDTO, networkType))); + }), + ); + }); + return new MultisigAccountGraphInfo(multisigAccounts); + }), + catchError((error) => throwError(this.errorHandling(error))), + ))); + } +} diff --git a/src/infrastructure/MultisigRepository.ts b/src/infrastructure/MultisigRepository.ts new file mode 100644 index 0000000000..876a15eb02 --- /dev/null +++ b/src/infrastructure/MultisigRepository.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2019 NEM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {Observable} from 'rxjs'; +import {Address} from '../model/account/Address'; +import {MultisigAccountGraphInfo} from '../model/account/MultisigAccountGraphInfo'; +import {MultisigAccountInfo} from '../model/account/MultisigAccountInfo'; + +/** + * Multisig interface repository. + * + * @since 1.0 + */ +export interface MultisigRepository { + + /** + * Gets a MultisigAccountInfo for an account. + * @param address - * Address can be created rawAddress or publicKey + * @returns Observable + */ + getMultisigAccountInfo(address: Address): Observable; + + /** + * Gets a MultisigAccountGraphInfo for an account. + * @param address - * Address can be created rawAddress or publicKey + * @returns Observable + */ + getMultisigAccountGraphInfo(address: Address): Observable; + +} diff --git a/src/infrastructure/NamespaceHttp.ts b/src/infrastructure/NamespaceHttp.ts index 785903f142..a0e3ca4755 100644 --- a/src/infrastructure/NamespaceHttp.ts +++ b/src/infrastructure/NamespaceHttp.ts @@ -13,13 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { ClientResponse } from 'http'; import {from as observableFrom, Observable, throwError} from 'rxjs'; import {catchError, map, mergeMap} from 'rxjs/operators'; import {Convert as convert, RawAddress as AddressLibrary} from '../core/format'; +import { AccountNames } from '../model/account/AccountNames'; import {Address} from '../model/account/Address'; import {PublicAccount} from '../model/account/PublicAccount'; import {MosaicId} from '../model/mosaic/MosaicId'; +import { MosaicNames } from '../model/mosaic/MosaicNames'; import {AddressAlias} from '../model/namespace/AddressAlias'; import {Alias} from '../model/namespace/Alias'; import {AliasType} from '../model/namespace/AliasType'; @@ -29,7 +30,7 @@ import {NamespaceId} from '../model/namespace/NamespaceId'; import {NamespaceInfo} from '../model/namespace/NamespaceInfo'; import {NamespaceName} from '../model/namespace/NamespaceName'; import {UInt64} from '../model/UInt64'; -import { NamespaceInfoDTO, NamespaceNameDTO, NamespaceRoutesApi } from './api'; +import { NamespaceRoutesApi } from './api'; import {Http} from './Http'; import {NamespaceRepository} from './NamespaceRepository'; import {NetworkHttp} from './NetworkHttp'; @@ -58,6 +59,53 @@ export class NamespaceHttp extends Http implements NamespaceRepository { this.namespaceRoutesApi = new NamespaceRoutesApi(url); } + /** + * Returns friendly names for array of addresses. + * @summary Get readable names for a set of array of addresses + * @param addresses - Array of addresses + */ + public getAccountsNames(addresses: Address[]): Observable { + const accountIdsBody = { + addresses: addresses.map((address) => address.plain()), + }; + return observableFrom( + this.namespaceRoutesApi.getAccountsNames(accountIdsBody)).pipe( + map(({body}) => body.accountNames.map((accountName) => { + return new AccountNames( + Address.createFromEncoded(accountName.address), + accountName.names.map((name) => { + return new NamespaceName(new NamespaceId(name), name); + }), + ); + })), + catchError((error) => throwError(this.errorHandling(error))), + ); + } + + /** + * Get readable names for a set of mosaics + * Returns friendly names for mosaics. + * @param mosaicIds - Array of mosaic ids + * @return Observable + */ + public getMosaicsNames(mosaicIds: MosaicId[]): Observable { + const mosaicIdsBody = { + mosaicIds: mosaicIds.map((id) => id.toHex()), + }; + return observableFrom( + this.namespaceRoutesApi.getMosaicsNames(mosaicIdsBody)).pipe( + map(({body}) => body.mosaicNames.map((mosaic) => { + return new MosaicNames( + new MosaicId(mosaic.mosaicId), + mosaic.names.map((name) => { + return new NamespaceName(new NamespaceId(name), name); + }), + ); + })), + catchError((error) => throwError(this.errorHandling(error))), + ); + } + /** * Gets the NamespaceInfo for a given namespaceId * @param namespaceId - Namespace id @@ -67,22 +115,19 @@ export class NamespaceHttp extends Http implements NamespaceRepository { return this.getNetworkTypeObservable().pipe( mergeMap((networkType) => observableFrom( this.namespaceRoutesApi.getNamespace(namespaceId.toHex())).pipe( - map((response: { response: ClientResponse; body: NamespaceInfoDTO; } ) => { - const namespaceInfoDTO = response.body; - return new NamespaceInfo( - namespaceInfoDTO.meta.active, - namespaceInfoDTO.meta.index, - namespaceInfoDTO.meta.id, - namespaceInfoDTO.namespace.registrationType as number, - namespaceInfoDTO.namespace.depth, - this.extractLevels(namespaceInfoDTO.namespace), - NamespaceId.createFromEncoded(namespaceInfoDTO.namespace.parentId), - PublicAccount.createFromPublicKey(namespaceInfoDTO.namespace.ownerPublicKey, networkType), - UInt64.fromNumericString(namespaceInfoDTO.namespace.startHeight), - UInt64.fromNumericString(namespaceInfoDTO.namespace.endHeight), - this.extractAlias(namespaceInfoDTO.namespace), - ); - }), + map(({body}) => new NamespaceInfo( + body.meta.active, + body.meta.index, + body.meta.id, + body.namespace.registrationType as number, + body.namespace.depth, + this.extractLevels(body.namespace), + NamespaceId.createFromEncoded(body.namespace.parentId), + PublicAccount.createFromPublicKey(body.namespace.ownerPublicKey, networkType), + UInt64.fromNumericString(body.namespace.startHeight), + UInt64.fromNumericString(body.namespace.endHeight), + this.extractAlias(body.namespace), + )), catchError((error) => throwError(this.errorHandling(error))), ), ), @@ -103,24 +148,21 @@ export class NamespaceHttp extends Http implements NamespaceRepository { this.queryParams(queryParams).pageSize, this.queryParams(queryParams).id, this.queryParams(queryParams).order)).pipe( - map((response: { response: ClientResponse; body: NamespaceInfoDTO[]; }) => { - const namespaceInfosDTO = response.body; - return namespaceInfosDTO.map((namespaceInfoDTO) => { - return new NamespaceInfo( - namespaceInfoDTO.meta.active, - namespaceInfoDTO.meta.index, - namespaceInfoDTO.meta.id, - namespaceInfoDTO.namespace.registrationType as number, - namespaceInfoDTO.namespace.depth, - this.extractLevels(namespaceInfoDTO.namespace), - NamespaceId.createFromEncoded(namespaceInfoDTO.namespace.parentId), - PublicAccount.createFromPublicKey(namespaceInfoDTO.namespace.ownerPublicKey, networkType), - UInt64.fromNumericString(namespaceInfoDTO.namespace.startHeight), - UInt64.fromNumericString(namespaceInfoDTO.namespace.endHeight), - this.extractAlias(namespaceInfoDTO.namespace), - ); - }); - }), + map(({body}) => body.namespaces.map((namespaceInfoDTO) => { + return new NamespaceInfo( + namespaceInfoDTO.meta.active, + namespaceInfoDTO.meta.index, + namespaceInfoDTO.meta.id, + namespaceInfoDTO.namespace.registrationType as number, + namespaceInfoDTO.namespace.depth, + this.extractLevels(namespaceInfoDTO.namespace), + NamespaceId.createFromEncoded(namespaceInfoDTO.namespace.parentId), + PublicAccount.createFromPublicKey(namespaceInfoDTO.namespace.ownerPublicKey, networkType), + UInt64.fromNumericString(namespaceInfoDTO.namespace.startHeight), + UInt64.fromNumericString(namespaceInfoDTO.namespace.endHeight), + this.extractAlias(namespaceInfoDTO.namespace), + ); + })), catchError((error) => throwError(this.errorHandling(error))), ), )); @@ -140,24 +182,21 @@ export class NamespaceHttp extends Http implements NamespaceRepository { return this.getNetworkTypeObservable().pipe( mergeMap((networkType) => observableFrom( this.namespaceRoutesApi.getNamespacesFromAccounts(publicKeysBody)).pipe( - map((response: { response: ClientResponse; body: NamespaceInfoDTO[]; }) => { - const namespaceInfosDTO = response.body; - return namespaceInfosDTO.map((namespaceInfoDTO) => { - return new NamespaceInfo( - namespaceInfoDTO.meta.active, - namespaceInfoDTO.meta.index, - namespaceInfoDTO.meta.id, - namespaceInfoDTO.namespace.registrationType as number, - namespaceInfoDTO.namespace.depth, - this.extractLevels(namespaceInfoDTO.namespace), - NamespaceId.createFromEncoded(namespaceInfoDTO.namespace.parentId), - PublicAccount.createFromPublicKey(namespaceInfoDTO.namespace.ownerPublicKey, networkType), - UInt64.fromNumericString(namespaceInfoDTO.namespace.startHeight), - UInt64.fromNumericString(namespaceInfoDTO.namespace.endHeight), - this.extractAlias(namespaceInfoDTO.namespace), - ); - }); - }), + map(({body}) => body.namespaces.map((namespaceInfoDTO) => { + return new NamespaceInfo( + namespaceInfoDTO.meta.active, + namespaceInfoDTO.meta.index, + namespaceInfoDTO.meta.id, + namespaceInfoDTO.namespace.registrationType as number, + namespaceInfoDTO.namespace.depth, + this.extractLevels(namespaceInfoDTO.namespace), + NamespaceId.createFromEncoded(namespaceInfoDTO.namespace.parentId), + PublicAccount.createFromPublicKey(namespaceInfoDTO.namespace.ownerPublicKey, networkType), + UInt64.fromNumericString(namespaceInfoDTO.namespace.startHeight), + UInt64.fromNumericString(namespaceInfoDTO.namespace.endHeight), + this.extractAlias(namespaceInfoDTO.namespace), + ); + })), catchError((error) => throwError(this.errorHandling(error))), ), )); @@ -174,16 +213,13 @@ export class NamespaceHttp extends Http implements NamespaceRepository { }; return observableFrom( this.namespaceRoutesApi.getNamespacesNames(namespaceIdsBody)).pipe( - map((response: { response: ClientResponse; body: NamespaceNameDTO[]; } ) => { - const namespaceNamesDTO = response.body; - return namespaceNamesDTO.map((namespaceNameDTO) => { - return new NamespaceName( - NamespaceId.createFromEncoded(namespaceNameDTO.id), - namespaceNameDTO.name, - namespaceNameDTO.parentId ? NamespaceId.createFromEncoded(namespaceNameDTO.parentId) : undefined, - ); - }); - }), + map(({body}) => body.map((namespaceNameDTO) => { + return new NamespaceName( + NamespaceId.createFromEncoded(namespaceNameDTO.id), + namespaceNameDTO.name, + namespaceNameDTO.parentId ? NamespaceId.createFromEncoded(namespaceNameDTO.parentId) : undefined, + ); + })), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -195,10 +231,10 @@ export class NamespaceHttp extends Http implements NamespaceRepository { */ public getLinkedMosaicId(namespaceId: NamespaceId): Observable { return this.getNetworkTypeObservable().pipe( - mergeMap((networkType) => observableFrom( + mergeMap(() => observableFrom( this.namespaceRoutesApi.getNamespace(namespaceId.toHex())).pipe( - map((response: { response: ClientResponse; body: NamespaceInfoDTO; } ) => { - const namespaceInfoDTO = response.body; + map(({body}) => { + const namespaceInfoDTO = body; if (namespaceInfoDTO.namespace === undefined) { // forward catapult-rest error throw namespaceInfoDTO; @@ -223,10 +259,10 @@ export class NamespaceHttp extends Http implements NamespaceRepository { */ public getLinkedAddress(namespaceId: NamespaceId): Observable
{ return this.getNetworkTypeObservable().pipe( - mergeMap((networkType) => observableFrom( + mergeMap(() => observableFrom( this.namespaceRoutesApi.getNamespace(namespaceId.toHex())).pipe( - map((response: { response: ClientResponse; body: NamespaceInfoDTO; } ) => { - const namespaceInfoDTO = response.body; + map(({body}) => { + const namespaceInfoDTO = body; if (namespaceInfoDTO.namespace === undefined) { // forward catapult-rest error throw namespaceInfoDTO; diff --git a/src/infrastructure/NamespaceRepository.ts b/src/infrastructure/NamespaceRepository.ts index 1c29e51425..2db911234a 100644 --- a/src/infrastructure/NamespaceRepository.ts +++ b/src/infrastructure/NamespaceRepository.ts @@ -15,9 +15,10 @@ */ import {Observable} from 'rxjs'; +import { AccountNames } from '../model/account/AccountNames'; import {Address} from '../model/account/Address'; -import {PublicAccount} from '../model/account/PublicAccount'; import {MosaicId} from '../model/mosaic/MosaicId'; +import { MosaicNames } from '../model/mosaic/MosaicNames'; import {NamespaceId} from '../model/namespace/NamespaceId'; import {NamespaceInfo} from '../model/namespace/NamespaceInfo'; import {NamespaceName} from '../model/namespace/NamespaceName'; @@ -30,6 +31,22 @@ import {QueryParams} from './QueryParams'; */ export interface NamespaceRepository { + /** + * Get readable names for a set of accountIds. + * Returns friendly names for accounts. + * @param accountIds List of Address - * Address can be created rawAddress or publicKey + * @return Observable + */ + getAccountsNames(accountIds: Address[]): Observable; + + /** + * Get readable names for a set of mosaics + * Returns friendly names for mosaics. + * @param mosaicIds - Array of mosaic ids + * @return Observable + */ + getMosaicsNames(mosaicIds: MosaicId[]): Observable; + /** * Gets the NamespaceInfo for a given namespaceId * @param namespaceId - Namespace id diff --git a/src/infrastructure/NodeHttp.ts b/src/infrastructure/NodeHttp.ts index 0c7080a327..af986369a0 100644 --- a/src/infrastructure/NodeHttp.ts +++ b/src/infrastructure/NodeHttp.ts @@ -14,15 +14,14 @@ * limitations under the License. */ -import { ClientResponse } from 'http'; import {from as observableFrom, Observable, throwError} from 'rxjs'; import {catchError, map} from 'rxjs/operators'; import { NodeInfo } from '../model/node/NodeInfo'; import { NodeTime } from '../model/node/NodeTime'; -import { NodeInfoDTO, NodeRoutesApi, NodeTimeDTO } from './api'; +import { UInt64 } from '../model/UInt64'; +import { NodeRoutesApi } from './api'; import {Http} from './Http'; import {NodeRepository} from './NodeRepository'; -import { UInt64 } from '../model/UInt64'; /** * Node http repository. @@ -52,18 +51,15 @@ export class NodeHttp extends Http implements NodeRepository { */ public getNodeInfo(): Observable { return observableFrom(this.nodeRoutesApi.getNodeInfo()).pipe( - map((response: { response: ClientResponse; body: NodeInfoDTO; } ) => { - const nodeInfoDTO = response.body; - return new NodeInfo( - nodeInfoDTO.publicKey, - nodeInfoDTO.port, - nodeInfoDTO.networkIdentifier, - nodeInfoDTO.version, - nodeInfoDTO.roles as number, - nodeInfoDTO.host, - nodeInfoDTO.friendlyName, - ); - }), + map(({body}) => new NodeInfo( + body.publicKey, + body.port, + body.networkIdentifier, + body.version, + body.roles as number, + body.host, + body.friendlyName, + )), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -74,8 +70,8 @@ export class NodeHttp extends Http implements NodeRepository { */ public getNodeTime(): Observable { return observableFrom(this.nodeRoutesApi.getNodeTime()).pipe( - map((response: { response: ClientResponse; body: NodeTimeDTO; } ) => { - const nodeTimeDTO = response.body; + map(({body}) => { + const nodeTimeDTO = body; if (nodeTimeDTO.communicationTimestamps.sendTimestamp && nodeTimeDTO.communicationTimestamps.receiveTimestamp) { return new NodeTime(UInt64.fromNumericString(nodeTimeDTO.communicationTimestamps.sendTimestamp).toDTO(), UInt64.fromNumericString(nodeTimeDTO.communicationTimestamps.receiveTimestamp).toDTO()); diff --git a/src/infrastructure/ReceiptHttp.ts b/src/infrastructure/ReceiptHttp.ts new file mode 100644 index 0000000000..b64a61819c --- /dev/null +++ b/src/infrastructure/ReceiptHttp.ts @@ -0,0 +1,88 @@ +/* + * Copyright 2019 NEM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {from as observableFrom, Observable, throwError} from 'rxjs'; +import {catchError, map, mergeMap} from 'rxjs/operators'; +import { MerklePathItem } from '../model/blockchain/MerklePathItem'; +import { MerkleProofInfo } from '../model/blockchain/MerkleProofInfo'; +import { Statement } from '../model/receipt/Statement'; +import { ReceiptRoutesApi } from './api/receiptRoutesApi'; +import {Http} from './Http'; +import { NetworkHttp } from './NetworkHttp'; +import { CreateStatementFromDTO } from './receipt/CreateReceiptFromDTO'; +import { ReceiptRepository } from './ReceiptRepository'; + +/** + * Receipt http repository. + * + * @since 1.0 + */ +export class ReceiptHttp extends Http implements ReceiptRepository { + /** + * @internal + * Nem2 Library receipt routes api + */ + private receiptRoutesApi: ReceiptRoutesApi; + + /** + * Constructor + * @param url + * @param networkHttp + */ + constructor(url: string, networkHttp?: NetworkHttp) { + networkHttp = networkHttp == null ? new NetworkHttp(url) : networkHttp; + super(networkHttp); + this.receiptRoutesApi = new ReceiptRoutesApi(url); + } + + /** + * Get the merkle path for a given a receipt statement hash and block + * Returns the merkle path for a [receipt statement or resolution](https://nemtech.github.io/concepts/receipt.html) + * linked to a block. The path is the complementary data needed to calculate the merkle root. + * A client can compare if the calculated root equals the one recorded in the block header, + * verifying that the receipt was linked with the block. + * @param height The height of the block. + * @param hash The hash of the receipt statement or resolution. + * @return Observable + */ + public getMerkleReceipts(height: string, hash: string): Observable { + return observableFrom( + this.receiptRoutesApi.getMerkleReceipts(height, hash)).pipe( + map(({body}) => new MerkleProofInfo( + body.merklePath!.map( + (payload) => new MerklePathItem(payload.position, payload.hash)), + )), + catchError((error) => throwError(this.errorHandling(error))), + ); + } + + /** + * Gets an array receipts for a block height. + * @param height - Block height from which will be the first block in the array + * @param queryParams - (Optional) Query params + * @returns Observable + */ + public getBlockReceipts(height: string): Observable { + return this.getNetworkTypeObservable().pipe( + mergeMap((networkType) => observableFrom( + this.receiptRoutesApi.getBlockReceipts(height)).pipe( + map(({body}) => CreateStatementFromDTO(body, networkType)), + catchError((error) => throwError(this.errorHandling(error))), + ), + ), + ); + } +} diff --git a/src/infrastructure/ReceiptRepository.ts b/src/infrastructure/ReceiptRepository.ts new file mode 100644 index 0000000000..a9e98df384 --- /dev/null +++ b/src/infrastructure/ReceiptRepository.ts @@ -0,0 +1,47 @@ +/* + * Copyright 2019 NEM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {Observable} from 'rxjs'; +import { MerkleProofInfo } from '../model/blockchain/MerkleProofInfo'; +import { Statement } from '../model/receipt/Statement'; + +/** + * Receipt interface repository. + * + * @since 1.0 + */ +export interface ReceiptRepository { + + /** + * Get receipts from a block + * Returns the receipts linked to a block. + * @param {string} height The height of the block. + * @return Observable + */ + getBlockReceipts(height: string): Observable; + + /** + * Get the merkle path for a given a receipt statement hash and block + * Returns the merkle path for a [receipt statement or resolution](https://nemtech.github.io/concepts/receipt.html) + * linked to a block. The path is the complementary data needed to calculate the merkle root. + * A client can compare if the calculated root equals the one recorded in the block header, + * verifying that the receipt was linked with the block. + * @param height The height of the block. + * @param hash The hash of the receipt statement or resolution. + * @return Observable + */ + getMerkleReceipts(height: string, hash: string): Observable; +} diff --git a/src/infrastructure/RestrictionAccountHttp.ts b/src/infrastructure/RestrictionAccountHttp.ts new file mode 100644 index 0000000000..8caaba8122 --- /dev/null +++ b/src/infrastructure/RestrictionAccountHttp.ts @@ -0,0 +1,77 @@ +/* + * Copyright 2019 NEM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {from as observableFrom, Observable, throwError} from 'rxjs'; +import {catchError, map} from 'rxjs/operators'; +import { DtoMapping } from '../core/utils/DtoMapping'; +import { Address } from '../model/account/Address'; +import { AccountRestriction } from '../model/restriction/AccountRestriction'; +import { AccountRestrictions } from '../model/restriction/AccountRestrictions'; +import { RestrictionAccountRoutesApi } from './api/restrictionAccountRoutesApi'; +import {Http} from './Http'; +import { RestrictionAccountRepository } from './RestrictionAccountRespository'; + +/** + * RestrictionAccount http repository. + * + * @since 1.0 + */ +export class RestrictionAccountHttp extends Http implements RestrictionAccountRepository { + /** + * @internal + */ + private restrictionAccountRoutesApi: RestrictionAccountRoutesApi; + + /** + * Constructor + * @param url + */ + constructor(url: string) { + super(); + this.restrictionAccountRoutesApi = new RestrictionAccountRoutesApi(url); + + } + + /** + * Get Account restrictions. + * @param publicAccount public account + * @returns Observable + */ + public getAccountRestrictions(address: Address): Observable { + return observableFrom(this.restrictionAccountRoutesApi.getAccountRestrictions(address.plain())) + .pipe(map(({body}) => DtoMapping.extractAccountRestrictionFromDto(body).accountRestrictions.restrictions), + catchError((error) => throwError(this.errorHandling(error))), + ); + } + + /** + * Get Account restrictions. + * @param address list of addresses + * @returns Observable + */ + public getAccountRestrictionsFromAccounts(addresses: Address[]): Observable { + const accountIds = { + addresses: addresses.map((address) => address.plain()), + }; + return observableFrom( + this.restrictionAccountRoutesApi.getAccountRestrictionsFromAccounts(accountIds)) + .pipe(map(({body}) => body.map((restriction) => { + return DtoMapping.extractAccountRestrictionFromDto(restriction).accountRestrictions; + })), + catchError((error) => throwError(this.errorHandling(error))), + ); + } +} diff --git a/src/infrastructure/RestrictionAccountRespository.ts b/src/infrastructure/RestrictionAccountRespository.ts new file mode 100644 index 0000000000..b029bc9d5e --- /dev/null +++ b/src/infrastructure/RestrictionAccountRespository.ts @@ -0,0 +1,36 @@ +/* + * Copyright 2019 NEM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Observable } from 'rxjs/internal/Observable'; +import { Address } from '../model/account/Address'; +import { AccountRestriction } from '../model/restriction/AccountRestriction'; +import { AccountRestrictions } from '../model/restriction/AccountRestrictions'; + +export interface RestrictionAccountRepository { + /** + * Gets Account restrictions. + * @param address list of addresses + * @returns Observable + */ + getAccountRestrictions(address: Address): Observable; + + /** + * Gets Account restrictions. + * @param addresses list of addresses + * @returns Observable + */ + getAccountRestrictionsFromAccounts(addresses: Address[]): Observable; +} diff --git a/src/infrastructure/RestrictionHttp.ts b/src/infrastructure/RestrictionMosaicHttp.ts similarity index 63% rename from src/infrastructure/RestrictionHttp.ts rename to src/infrastructure/RestrictionMosaicHttp.ts index 88801573a3..f00587e024 100644 --- a/src/infrastructure/RestrictionHttp.ts +++ b/src/infrastructure/RestrictionMosaicHttp.ts @@ -14,35 +14,27 @@ * limitations under the License. */ -import { ClientResponse } from 'http'; import {from as observableFrom, Observable, throwError} from 'rxjs'; import {catchError, map} from 'rxjs/operators'; -import { DtoMapping } from '../core/utils/DtoMapping'; import { Address } from '../model/account/Address'; import { MosaicId } from '../model/mosaic/MosaicId'; -import { AccountRestriction } from '../model/restriction/AccountRestriction'; -import { AccountRestrictions } from '../model/restriction/AccountRestrictions'; -import { AccountRestrictionsInfo } from '../model/restriction/AccountRestrictionsInfo'; import { MosaicAddressRestriction } from '../model/restriction/MosaicAddressRestriction'; import { MosaicGlobalRestriction } from '../model/restriction/MosaicGlobalRestriction'; import { MosaicGlobalRestrictionItem } from '../model/restriction/MosaicGlobalRestrictionItem'; -import { AccountRestrictionsInfoDTO, - MosaicAddressRestrictionDTO, - MosaicGlobalRestrictionDTO, - RestrictionRoutesApi } from './api'; +import { RestrictionMosaicRoutesApi } from './api/restrictionMosaicRoutesApi'; import {Http} from './Http'; -import { RestrictionRepository } from './RestrictionRepository'; +import { RestrictionMosaicRepository } from './RestrictionMosaicRespository'; /** - * Restriction http repository. + * RestrictionMosaic http repository. * * @since 1.0 */ -export class RestrictionHttp extends Http implements RestrictionRepository { +export class RestrictionMosaicHttp extends Http implements RestrictionMosaicRepository { /** * @internal */ - private restrictionRoutesApi: RestrictionRoutesApi; + private restrictionMosaicRoutesApi: RestrictionMosaicRoutesApi; /** * Constructor @@ -50,46 +42,10 @@ export class RestrictionHttp extends Http implements RestrictionRepository { */ constructor(url: string) { super(); - this.restrictionRoutesApi = new RestrictionRoutesApi(url); + this.restrictionMosaicRoutesApi = new RestrictionMosaicRoutesApi(url); } - /** - * Get Account restrictions. - * @param publicAccount public account - * @returns Observable - */ - public getAccountRestrictions(address: Address): Observable { - return observableFrom(this.restrictionRoutesApi.getAccountRestrictions(address.plain())) - .pipe(map((response: { response: ClientResponse; body: AccountRestrictionsInfoDTO; }) => { - const accountRestrictions = response.body; - return DtoMapping.extractAccountRestrictionFromDto(accountRestrictions).accountRestrictions.restrictions; - }), - catchError((error) => throwError(this.errorHandling(error))), - ); - } - - /** - * Get Account restrictions. - * @param address list of addresses - * @returns Observable - */ - public getAccountRestrictionsFromAccounts(addresses: Address[]): Observable { - const accountIds = { - addresses: addresses.map((address) => address.plain()), - }; - return observableFrom( - this.restrictionRoutesApi.getAccountRestrictionsFromAccounts(accountIds)) - .pipe(map((response: { response: ClientResponse; body: AccountRestrictionsInfoDTO[]; }) => { - const accountRestrictions = response.body; - return accountRestrictions.map((restriction) => { - return DtoMapping.extractAccountRestrictionFromDto(restriction).accountRestrictions; - }); - }), - catchError((error) => throwError(this.errorHandling(error))), - ); - } - /** * Get mosaic address restriction. * @summary Get mosaic address restrictions for a given mosaic and account identifier. @@ -99,9 +55,9 @@ export class RestrictionHttp extends Http implements RestrictionRepository { */ getMosaicAddressRestriction(mosaicId: MosaicId, address: Address): Observable { return observableFrom( - this.restrictionRoutesApi.getMosaicAddressRestriction(mosaicId.toHex(), address.plain())).pipe( - map((response: { response: ClientResponse; body: MosaicAddressRestrictionDTO; }) => { - const payload = response.body.mosaicRestrictionEntry; + this.restrictionMosaicRoutesApi.getMosaicAddressRestriction(mosaicId.toHex(), address.plain())).pipe( + map(({body}) => { + const payload = body.mosaicRestrictionEntry; const restirctionItems = new Map(); payload.restrictions.forEach((restriction) => { restirctionItems.set(restriction.key, restriction.value); @@ -130,10 +86,8 @@ export class RestrictionHttp extends Http implements RestrictionRepository { addresses: addresses.map((address) => address.plain()), }; return observableFrom( - this.restrictionRoutesApi.getMosaicAddressRestrictions(mosaicId.toHex(), accountIds)).pipe( - map((response: { response: ClientResponse; body: MosaicAddressRestrictionDTO[]; }) => { - const mosaicAddressRestrictionsDTO = response.body; - return mosaicAddressRestrictionsDTO.map((payload) => { + this.restrictionMosaicRoutesApi.getMosaicAddressRestrictions(mosaicId.toHex(), accountIds)).pipe( + map(({body}) => body.map((payload) => { const restirctionItems = new Map(); payload.mosaicRestrictionEntry.restrictions.forEach((restriction) => { restirctionItems.set(restriction.key, restriction.value); @@ -145,8 +99,7 @@ export class RestrictionHttp extends Http implements RestrictionRepository { Address.createFromEncoded(payload.mosaicRestrictionEntry.targetAddress), restirctionItems, ); - }); - }), + })), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -159,9 +112,9 @@ export class RestrictionHttp extends Http implements RestrictionRepository { */ getMosaicGlobalRestriction(mosaicId: MosaicId): Observable { return observableFrom( - this.restrictionRoutesApi.getMosaicGlobalRestriction(mosaicId.toHex())).pipe( - map((response: { response: ClientResponse; body: MosaicGlobalRestrictionDTO; }) => { - const payload = response.body.mosaicRestrictionEntry; + this.restrictionMosaicRoutesApi.getMosaicGlobalRestriction(mosaicId.toHex())).pipe( + map(({body}) => { + const payload = body.mosaicRestrictionEntry; const restirctionItems = new Map(); payload.restrictions.forEach((restriction) => restirctionItems.set(restriction.key, @@ -192,10 +145,8 @@ export class RestrictionHttp extends Http implements RestrictionRepository { mosaicIds: mosaicIds.map((id) => id.toHex()), }; return observableFrom( - this.restrictionRoutesApi.getMosaicGlobalRestrictions(mosaicIdsBody)).pipe( - map((response: { response: ClientResponse; body: MosaicGlobalRestrictionDTO[]; }) => { - const mosaicGlobalRestrictionsDTO = response.body; - return mosaicGlobalRestrictionsDTO.map((payload) => { + this.restrictionMosaicRoutesApi.getMosaicGlobalRestrictions(mosaicIdsBody)).pipe( + map(({body}) => body.map((payload) => { const restirctionItems = new Map(); payload.mosaicRestrictionEntry.restrictions.forEach((restriction) => restirctionItems.set(restriction.key, @@ -210,8 +161,7 @@ export class RestrictionHttp extends Http implements RestrictionRepository { new MosaicId(payload.mosaicRestrictionEntry.mosaicId), restirctionItems, ); - }); - }), + })), catchError((error) => throwError(this.errorHandling(error))), ); } diff --git a/src/infrastructure/RestrictionRepository.ts b/src/infrastructure/RestrictionMosaicRespository.ts similarity index 78% rename from src/infrastructure/RestrictionRepository.ts rename to src/infrastructure/RestrictionMosaicRespository.ts index 21430e30ad..f6dd5cf29b 100644 --- a/src/infrastructure/RestrictionRepository.ts +++ b/src/infrastructure/RestrictionMosaicRespository.ts @@ -17,26 +17,10 @@ import { Observable } from 'rxjs/internal/Observable'; import { Address } from '../model/account/Address'; import { MosaicId } from '../model/mosaic/MosaicId'; -import { AccountRestriction } from '../model/restriction/AccountRestriction'; -import { AccountRestrictions } from '../model/restriction/AccountRestrictions'; import { MosaicAddressRestriction } from '../model/restriction/MosaicAddressRestriction'; import { MosaicGlobalRestriction } from '../model/restriction/MosaicGlobalRestriction'; -export interface RestrictionRepository { - /** - * Gets Account restrictions. - * @param address list of addresses - * @returns Observable - */ - getAccountRestrictions(address: Address): Observable; - - /** - * Gets Account restrictions. - * @param addresses list of addresses - * @returns Observable - */ - getAccountRestrictionsFromAccounts(addresses: Address[]): Observable; - +export interface RestrictionMosaicRepository { /** * Get mosaic address restriction. * @summary Get mosaic address restrictions for a given mosaic and account identifier. diff --git a/src/infrastructure/TransactionHttp.ts b/src/infrastructure/TransactionHttp.ts index 3d4612a923..c65aaac15d 100644 --- a/src/infrastructure/TransactionHttp.ts +++ b/src/infrastructure/TransactionHttp.ts @@ -73,10 +73,7 @@ export class TransactionHttp extends Http implements TransactionRepository { */ public getTransaction(transactionId: string): Observable { return observableFrom(this.transactionRoutesApi.getTransaction(transactionId)).pipe( - map((response: { response: ClientResponse; body: TransactionInfoDTO; } ) => { - const transactionDTO = response.body; - return CreateTransactionFromDTO(transactionDTO); - }), + map(({body}) => CreateTransactionFromDTO(body)), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -92,12 +89,9 @@ export class TransactionHttp extends Http implements TransactionRepository { }; return observableFrom( this.transactionRoutesApi.getTransactions(transactionIdsBody)).pipe( - map((response: { response: ClientResponse; body: TransactionInfoDTO[]; } ) => { - const transactionsDTO = response.body; - return transactionsDTO.map((transactionDTO) => { + map(({body}) => body.map((transactionDTO) => { return CreateTransactionFromDTO(transactionDTO); - }); - }), + })), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -109,16 +103,13 @@ export class TransactionHttp extends Http implements TransactionRepository { */ public getTransactionStatus(transactionHash: string): Observable { return observableFrom(this.transactionRoutesApi.getTransactionStatus(transactionHash)).pipe( - map((response: { response: ClientResponse; body: TransactionStatusDTO; } ) => { - const transactionStatusDTO = response.body; - return new TransactionStatus( - transactionStatusDTO.status, - transactionStatusDTO.group, - transactionStatusDTO.hash, - transactionStatusDTO.deadline ? - Deadline.createFromDTO(UInt64.fromNumericString(transactionStatusDTO.deadline).toDTO()) : undefined, - transactionStatusDTO.height ? UInt64.fromNumericString(transactionStatusDTO.height) : undefined); - }), + map(({body}) => new TransactionStatus( + body.status, + body.group, + body.hash, + body.deadline ? + Deadline.createFromDTO(UInt64.fromNumericString(body.deadline).toDTO()) : undefined, + body.height ? UInt64.fromNumericString(body.height) : undefined)), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -134,9 +125,7 @@ export class TransactionHttp extends Http implements TransactionRepository { }; return observableFrom( this.transactionRoutesApi.getTransactionsStatuses(transactionHashesBody)).pipe( - map((response: { response: ClientResponse; body: TransactionStatusDTO[]; }) => { - const transactionStatusesDTO = response.body; - return transactionStatusesDTO.map((transactionStatusDTO) => { + map(({body}) => body.map((transactionStatusDTO) => { return new TransactionStatus( transactionStatusDTO.status, transactionStatusDTO.group, @@ -144,8 +133,7 @@ export class TransactionHttp extends Http implements TransactionRepository { transactionStatusDTO.deadline ? Deadline.createFromDTO(UInt64.fromNumericString(transactionStatusDTO.deadline).toDTO()) : undefined, transactionStatusDTO.height ? UInt64.fromNumericString(transactionStatusDTO.height) : undefined); - }); - }), + })), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -160,10 +148,7 @@ export class TransactionHttp extends Http implements TransactionRepository { throw new Error('Announcing aggregate bonded transaction should use \'announceAggregateBonded\''); } return observableFrom(this.transactionRoutesApi.announceTransaction(signedTransaction)).pipe( - map((response: { response: ClientResponse; body: AnnounceTransactionInfoDTO; } ) => { - const transactionAnnounceResponseDTO = response.body; - return new TransactionAnnounceResponse(transactionAnnounceResponseDTO.message); - }), + map(({body}) => new TransactionAnnounceResponse(body.message)), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -178,10 +163,7 @@ export class TransactionHttp extends Http implements TransactionRepository { throw new Error('Only Transaction Type 0x4241 is allowed for announce aggregate bonded'); } return observableFrom(this.transactionRoutesApi.announcePartialTransaction(signedTransaction)).pipe( - map((response: { response: ClientResponse; body: AnnounceTransactionInfoDTO; } ) => { - const transactionAnnounceResponseDTO = response.body; - return new TransactionAnnounceResponse(transactionAnnounceResponseDTO.message); - }), + map(({body}) => new TransactionAnnounceResponse(body.message)), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -194,10 +176,7 @@ export class TransactionHttp extends Http implements TransactionRepository { public announceAggregateBondedCosignature( cosignatureSignedTransaction: CosignatureSignedTransaction): Observable { return observableFrom(this.transactionRoutesApi.announceCosignatureTransaction(cosignatureSignedTransaction)).pipe( - map((response: { response: ClientResponse; body: AnnounceTransactionInfoDTO; } ) => { - const transactionAnnounceResponseDTO = response.body; - return new TransactionAnnounceResponse(transactionAnnounceResponseDTO.message); - }), + map(({body}) => new TransactionAnnounceResponse(body.message)), catchError((error) => throwError(this.errorHandling(error))), ); } @@ -238,14 +217,14 @@ export class TransactionHttp extends Http implements TransactionRepository { */ public getTransactionEffectiveFee(transactionId: string): Observable { return observableFrom(this.transactionRoutesApi.getTransaction(transactionId)).pipe( - mergeMap((response: { response: ClientResponse; body: TransactionInfoDTO; } ) => { + mergeMap(({body}) => { // parse transaction to take advantage of `size` getter overload - const transactionDTO = response.body; + const transactionDTO = body; const transaction = CreateTransactionFromDTO(transactionDTO); const uintHeight = (transaction.transactionInfo as TransactionInfo).height; // now read block details - return observableFrom(this.blockRoutesApi.getBlockByHeight(uintHeight.compact())).pipe( + return observableFrom(this.blockRoutesApi.getBlockByHeight(uintHeight.toString())).pipe( map((blockResponse: { response: ClientResponse; body: BlockInfoDTO; } ) => { const blockDTO = blockResponse.body; // @see https://nemtech.github.io/concepts/transaction.html#fees diff --git a/src/infrastructure/api.ts b/src/infrastructure/api.ts index 590b4eacdd..95e4f0d5b9 100644 --- a/src/infrastructure/api.ts +++ b/src/infrastructure/api.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.16 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/api/accountRoutesApi.ts b/src/infrastructure/api/accountRoutesApi.ts index bf064a7840..6030accaf0 100644 --- a/src/infrastructure/api/accountRoutesApi.ts +++ b/src/infrastructure/api/accountRoutesApi.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -31,10 +31,7 @@ import http = require('http'); /* tslint:disable:no-unused-locals */ import { AccountIds } from '../model/accountIds'; import { AccountInfoDTO } from '../model/accountInfoDTO'; -import { AccountsNamesDTO } from '../model/accountsNamesDTO'; import { ModelError } from '../model/modelError'; -import { MultisigAccountGraphInfoDTO } from '../model/multisigAccountGraphInfoDTO'; -import { MultisigAccountInfoDTO } from '../model/multisigAccountInfoDTO'; import { TransactionInfoDTO } from '../model/transactionInfoDTO'; import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; @@ -91,12 +88,15 @@ export class AccountRoutesApi { } /** - * Returns the account information. - * @summary Get account information + * Gets an array of incoming transactions. A transaction is said to be incoming with respect to an account if the account is the recipient of the transaction. + * @summary Get incoming transactions * @param accountId Account public key or address. + * @param pageSize Number of transactions to return for each request. + * @param id Transaction identifier up to which transactions are returned. + * @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. */ - public async getAccountInfo (accountId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: AccountInfoDTO; }> { - const localVarPath = this.basePath + '/account/{accountId}' + public async getAccountIncomingTransactions (accountId: string, pageSize?: number, id?: string, ordering?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { + const localVarPath = this.basePath + '/account/{accountId}/transactions/incoming' .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); @@ -104,66 +104,19 @@ export class AccountRoutesApi { // verify required parameter 'accountId' is not null or undefined if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling getAccountInfo.'); + throw new Error('Required parameter accountId was null or undefined when calling getAccountIncomingTransactions.'); } - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; + if (pageSize !== undefined) { + localVarQueryParameters['pageSize'] = ObjectSerializer.serialize(pageSize, "number"); + } - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: AccountInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "AccountInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns the multisig account information. - * @summary Get multisig account information - * @param accountId Account public key or address. - */ - public async getAccountMultisig (accountId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MultisigAccountInfoDTO; }> { - const localVarPath = this.basePath + '/account/{accountId}/multisig' - .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; + if (id !== undefined) { + localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); + } - // verify required parameter 'accountId' is not null or undefined - if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling getAccountMultisig.'); + if (ordering !== undefined) { + localVarQueryParameters['ordering'] = ObjectSerializer.serialize(ordering, "string"); } (Object).assign(localVarHeaderParams, options.headers); @@ -189,12 +142,12 @@ export class AccountRoutesApi { localVarRequestOptions.form = localVarFormParams; } } - return new Promise<{ response: http.ClientResponse; body: MultisigAccountInfoDTO; }>((resolve, reject) => { + return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { - body = ObjectSerializer.deserialize(body, "MultisigAccountInfoDTO"); + body = ObjectSerializer.deserialize(body, "Array"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -209,12 +162,12 @@ export class AccountRoutesApi { }); } /** - * Returns the multisig account graph. - * @summary Get multisig account graph information + * Returns the account information. + * @summary Get account information * @param accountId Account public key or address. */ - public async getAccountMultisigGraph (accountId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/account/{accountId}/multisig/graph' + public async getAccountInfo (accountId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: AccountInfoDTO; }> { + const localVarPath = this.basePath + '/account/{accountId}' .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); @@ -222,7 +175,7 @@ export class AccountRoutesApi { // verify required parameter 'accountId' is not null or undefined if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling getAccountMultisigGraph.'); + throw new Error('Required parameter accountId was null or undefined when calling getAccountInfo.'); } (Object).assign(localVarHeaderParams, options.headers); @@ -248,120 +201,12 @@ export class AccountRoutesApi { localVarRequestOptions.form = localVarFormParams; } } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns the account information for an array of accounts. - * @summary Get accounts information - * @param accountIds - */ - public async getAccountsInfo (accountIds?: AccountIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/account'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(accountIds, "AccountIds") - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns friendly names for accounts. - * @summary Get readable names for a set of accountIds - * @param accountIds - */ - public async getAccountsNames (accountIds?: AccountIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: AccountsNamesDTO; }> { - const localVarPath = this.basePath + '/account/names'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(accountIds, "AccountIds") - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: AccountsNamesDTO; }>((resolve, reject) => { + return new Promise<{ response: http.ClientResponse; body: AccountInfoDTO; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { - body = ObjectSerializer.deserialize(body, "AccountsNamesDTO"); + body = ObjectSerializer.deserialize(body, "AccountInfoDTO"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -376,15 +221,15 @@ export class AccountRoutesApi { }); } /** - * Gets an array of incoming transactions. A transaction is said to be incoming with respect to an account if the account is the recipient of the transaction. - * @summary Get incoming transactions + * Gets an array of outgoing transactions. A transaction is said to be outgoing with respect to an account if the account is the sender of the transaction. + * @summary Get outgoing transactions * @param accountId Account public key or address. * @param pageSize Number of transactions to return for each request. * @param id Transaction identifier up to which transactions are returned. * @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. */ - public async incomingTransactions (accountId: string, pageSize?: number, id?: string, ordering?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/account/{accountId}/transactions/incoming' + public async getAccountOutgoingTransactions (accountId: string, pageSize?: number, id?: string, ordering?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { + const localVarPath = this.basePath + '/account/{accountId}/transactions/outgoing' .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); @@ -392,7 +237,7 @@ export class AccountRoutesApi { // verify required parameter 'accountId' is not null or undefined if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling incomingTransactions.'); + throw new Error('Required parameter accountId was null or undefined when calling getAccountOutgoingTransactions.'); } if (pageSize !== undefined) { @@ -450,15 +295,15 @@ export class AccountRoutesApi { }); } /** - * Gets an array of outgoing transactions. A transaction is said to be outgoing with respect to an account if the account is the sender of the transaction. - * @summary Get outgoing transactions + * Gets an array of aggregate bonded transactions where the account is the sender or requires to cosign the transaction. + * @summary Get aggregate bonded transactions information * @param accountId Account public key or address. * @param pageSize Number of transactions to return for each request. * @param id Transaction identifier up to which transactions are returned. * @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. */ - public async outgoingTransactions (accountId: string, pageSize?: number, id?: string, ordering?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/account/{accountId}/transactions/outgoing' + public async getAccountPartialTransactions (accountId: string, pageSize?: number, id?: string, ordering?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { + const localVarPath = this.basePath + '/account/{accountId}/transactions/partial' .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); @@ -466,7 +311,7 @@ export class AccountRoutesApi { // verify required parameter 'accountId' is not null or undefined if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling outgoingTransactions.'); + throw new Error('Required parameter accountId was null or undefined when calling getAccountPartialTransactions.'); } if (pageSize !== undefined) { @@ -524,15 +369,15 @@ export class AccountRoutesApi { }); } /** - * Gets an array of aggregate bonded transactions where the account is the sender or requires to cosign the transaction. - * @summary Get aggregate bonded transactions information + * Gets an array of transactions for which an account is the sender or receiver. + * @summary Get confirmed transactions * @param accountId Account public key or address. * @param pageSize Number of transactions to return for each request. * @param id Transaction identifier up to which transactions are returned. * @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. */ - public async partialTransactions (accountId: string, pageSize?: number, id?: string, ordering?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/account/{accountId}/transactions/partial' + public async getAccountTransactions (accountId: string, pageSize?: number, id?: string, ordering?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { + const localVarPath = this.basePath + '/account/{accountId}/transactions' .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); @@ -540,7 +385,7 @@ export class AccountRoutesApi { // verify required parameter 'accountId' is not null or undefined if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling partialTransactions.'); + throw new Error('Required parameter accountId was null or undefined when calling getAccountTransactions.'); } if (pageSize !== undefined) { @@ -598,15 +443,15 @@ export class AccountRoutesApi { }); } /** - * Gets an array of transactions for which an account is the sender or receiver. - * @summary Get confirmed transactions + * Gets the array of transactions not included in a block where an account is the sender or receiver. + * @summary Get unconfirmed transactions * @param accountId Account public key or address. * @param pageSize Number of transactions to return for each request. * @param id Transaction identifier up to which transactions are returned. * @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. */ - public async transactions (accountId: string, pageSize?: number, id?: string, ordering?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/account/{accountId}/transactions' + public async getAccountUnconfirmedTransactions (accountId: string, pageSize?: number, id?: string, ordering?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { + const localVarPath = this.basePath + '/account/{accountId}/transactions/unconfirmed' .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); @@ -614,7 +459,7 @@ export class AccountRoutesApi { // verify required parameter 'accountId' is not null or undefined if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling transactions.'); + throw new Error('Required parameter accountId was null or undefined when calling getAccountUnconfirmedTransactions.'); } if (pageSize !== undefined) { @@ -672,48 +517,28 @@ export class AccountRoutesApi { }); } /** - * Gets the array of transactions not included in a block where an account is the sender or receiver. - * @summary Get unconfirmed transactions - * @param accountId Account public key or address. - * @param pageSize Number of transactions to return for each request. - * @param id Transaction identifier up to which transactions are returned. - * @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. + * Returns the account information for an array of accounts. + * @summary Get accounts information + * @param accountIds */ - public async unconfirmedTransactions (accountId: string, pageSize?: number, id?: string, ordering?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/account/{accountId}/transactions/unconfirmed' - .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); + public async getAccountsInfo (accountIds?: AccountIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { + const localVarPath = this.basePath + '/account'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); let localVarFormParams: any = {}; - // verify required parameter 'accountId' is not null or undefined - if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling unconfirmedTransactions.'); - } - - if (pageSize !== undefined) { - localVarQueryParameters['pageSize'] = ObjectSerializer.serialize(pageSize, "number"); - } - - if (id !== undefined) { - localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); - } - - if (ordering !== undefined) { - localVarQueryParameters['ordering'] = ObjectSerializer.serialize(ordering, "string"); - } - (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', + method: 'POST', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, + body: ObjectSerializer.serialize(accountIds, "AccountIds") }; let authenticationPromise = Promise.resolve(); @@ -726,12 +551,12 @@ export class AccountRoutesApi { localVarRequestOptions.form = localVarFormParams; } } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { + return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { - body = ObjectSerializer.deserialize(body, "Array"); + body = ObjectSerializer.deserialize(body, "Array"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { diff --git a/src/infrastructure/api/apis.ts b/src/infrastructure/api/apis.ts index e7f6371f82..b219325aa8 100644 --- a/src/infrastructure/api/apis.ts +++ b/src/infrastructure/api/apis.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -37,14 +37,20 @@ export * from './metadataRoutesApi'; import { MetadataRoutesApi } from './metadataRoutesApi'; export * from './mosaicRoutesApi'; import { MosaicRoutesApi } from './mosaicRoutesApi'; +export * from './multisigRoutesApi'; +import { MultisigRoutesApi } from './multisigRoutesApi'; export * from './namespaceRoutesApi'; import { NamespaceRoutesApi } from './namespaceRoutesApi'; export * from './networkRoutesApi'; import { NetworkRoutesApi } from './networkRoutesApi'; export * from './nodeRoutesApi'; import { NodeRoutesApi } from './nodeRoutesApi'; -export * from './restrictionRoutesApi'; -import { RestrictionRoutesApi } from './restrictionRoutesApi'; +export * from './receiptRoutesApi'; +import { ReceiptRoutesApi } from './receiptRoutesApi'; +export * from './restrictionAccountRoutesApi'; +import { RestrictionAccountRoutesApi } from './restrictionAccountRoutesApi'; +export * from './restrictionMosaicRoutesApi'; +import { RestrictionMosaicRoutesApi } from './restrictionMosaicRoutesApi'; export * from './transactionRoutesApi'; import { TransactionRoutesApi } from './transactionRoutesApi'; -export const APIS = [AccountRoutesApi, BlockRoutesApi, ChainRoutesApi, DiagnosticRoutesApi, MetadataRoutesApi, MosaicRoutesApi, NamespaceRoutesApi, NetworkRoutesApi, NodeRoutesApi, RestrictionRoutesApi, TransactionRoutesApi]; +export const APIS = [AccountRoutesApi, BlockRoutesApi, ChainRoutesApi, DiagnosticRoutesApi, MetadataRoutesApi, MosaicRoutesApi, MultisigRoutesApi, NamespaceRoutesApi, NetworkRoutesApi, NodeRoutesApi, ReceiptRoutesApi, RestrictionAccountRoutesApi, RestrictionMosaicRoutesApi, TransactionRoutesApi]; diff --git a/src/infrastructure/api/blockRoutesApi.ts b/src/infrastructure/api/blockRoutesApi.ts index 89f55b8a4d..0cce81b26b 100644 --- a/src/infrastructure/api/blockRoutesApi.ts +++ b/src/infrastructure/api/blockRoutesApi.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -32,7 +32,6 @@ import http = require('http'); import { BlockInfoDTO } from '../model/blockInfoDTO'; import { MerkleProofInfoDTO } from '../model/merkleProofInfoDTO'; import { ModelError } from '../model/modelError'; -import { StatementsDTO } from '../model/statementsDTO'; import { TransactionInfoDTO } from '../model/transactionInfoDTO'; import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; @@ -91,9 +90,9 @@ export class BlockRoutesApi { /** * Gets a block from the chain that has the given height. * @summary Get block information - * @param height Block height. If height -1 is not a multiple of the limit provided, the inferior closest multiple + 1 is used instead. + * @param height Block height. If height -1 is not a multiple of the limit provided, the inferior closest multiple + 1 is used instead. */ - public async getBlockByHeight (height: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: BlockInfoDTO; }> { + public async getBlockByHeight (height: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: BlockInfoDTO; }> { const localVarPath = this.basePath + '/block/{height}' .replace('{' + 'height' + '}', encodeURIComponent(String(height))); let localVarQueryParameters: any = {}; @@ -147,74 +146,15 @@ export class BlockRoutesApi { }); }); } - /** - * Returns the receipts linked to a block. - * @summary Get receipts from a block - * @param height Block height. If height -1 is not a multiple of the limit provided, the inferior closest multiple + 1 is used instead. - */ - public async getBlockReceipts (height: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: StatementsDTO; }> { - const localVarPath = this.basePath + '/block/{height}/receipts' - .replace('{' + 'height' + '}', encodeURIComponent(String(height))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'height' is not null or undefined - if (height === null || height === undefined) { - throw new Error('Required parameter height was null or undefined when calling getBlockReceipts.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: StatementsDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "StatementsDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } /** * Returns an array of transactions included in a block for a given block height. * @summary Get transactions from a block - * @param height Block height. If height -1 is not a multiple of the limit provided, the inferior closest multiple + 1 is used instead. + * @param height Block height. If height -1 is not a multiple of the limit provided, the inferior closest multiple + 1 is used instead. * @param pageSize Number of transactions to return for each request. * @param id Transaction identifier up to which transactions are returned. * @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. */ - public async getBlockTransactions (height: number, pageSize?: number, id?: string, ordering?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { + public async getBlockTransactions (height: string, pageSize?: number, id?: string, ordering?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { const localVarPath = this.basePath + '/block/{height}/transactions' .replace('{' + 'height' + '}', encodeURIComponent(String(height))); let localVarQueryParameters: any = {}; @@ -283,10 +223,10 @@ export class BlockRoutesApi { /** * Gets up to limit number of blocks after given block height. * @summary Get blocks information - * @param height Block height. If height -1 is not a multiple of the limit provided, the inferior closest multiple + 1 is used instead. + * @param height Block height. If height -1 is not a multiple of the limit provided, the inferior closest multiple + 1 is used instead. * @param limit Number of elements to be returned. */ - public async getBlocksByHeightWithLimit (height: number, limit: 25 | 50 | 75 | 100, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { + public async getBlocksByHeightWithLimit (height: string, limit: 25 | 50 | 75 | 100, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { const localVarPath = this.basePath + '/blocks/{height}/limit/{limit}' .replace('{' + 'height' + '}', encodeURIComponent(String(height))) .replace('{' + 'limit' + '}', encodeURIComponent(String(limit))); @@ -346,79 +286,13 @@ export class BlockRoutesApi { }); }); } - /** - * Returns the merkle path for a receipt statement or resolution linked to a block. The path is the complementary data needed to calculate the merkle root. A client can compare if the calculated root equals the one recorded in the block header, verifying that the receipt was linked with the block. - * @summary Get the merkle path for a given a receipt statement hash and block - * @param height Block height. If height -1 is not a multiple of the limit provided, the inferior closest multiple + 1 is used instead. - * @param hash Receipt hash. - */ - public async getMerkleReceipts (height: number, hash: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MerkleProofInfoDTO; }> { - const localVarPath = this.basePath + '/block/{height}/receipt/{hash}/merkle' - .replace('{' + 'height' + '}', encodeURIComponent(String(height))) - .replace('{' + 'hash' + '}', encodeURIComponent(String(hash))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'height' is not null or undefined - if (height === null || height === undefined) { - throw new Error('Required parameter height was null or undefined when calling getMerkleReceipts.'); - } - - // verify required parameter 'hash' is not null or undefined - if (hash === null || hash === undefined) { - throw new Error('Required parameter hash was null or undefined when calling getMerkleReceipts.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: MerkleProofInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "MerkleProofInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } /** * Returns the merkle path for a transaction included in a block. The path is the complementary data needed to calculate the merkle root. A client can compare if the calculated root equals the one recorded in the block header, verifying that the transaction was included in the block. * @summary Get the merkle path for a given a transaction and block - * @param height Block height. If height -1 is not a multiple of the limit provided, the inferior closest multiple + 1 is used instead. + * @param height Block height. If height -1 is not a multiple of the limit provided, the inferior closest multiple + 1 is used instead. * @param hash Transaction hash. */ - public async getMerkleTransaction (height: number, hash: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MerkleProofInfoDTO; }> { + public async getMerkleTransaction (height: string, hash: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MerkleProofInfoDTO; }> { const localVarPath = this.basePath + '/block/{height}/transaction/{hash}/merkle' .replace('{' + 'height' + '}', encodeURIComponent(String(height))) .replace('{' + 'hash' + '}', encodeURIComponent(String(hash))); diff --git a/src/infrastructure/api/chainRoutesApi.ts b/src/infrastructure/api/chainRoutesApi.ts index a80a978a67..1f3c749bba 100644 --- a/src/infrastructure/api/chainRoutesApi.ts +++ b/src/infrastructure/api/chainRoutesApi.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -89,7 +89,7 @@ export class ChainRoutesApi { * Returns the current height of the blockchain. * @summary Get the current height of the chain */ - public async getBlockchainHeight (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: HeightInfoDTO; }> { + public async getChainHeight (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: HeightInfoDTO; }> { const localVarPath = this.basePath + '/chain/height'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); diff --git a/src/infrastructure/api/diagnosticRoutesApi.ts b/src/infrastructure/api/diagnosticRoutesApi.ts index 45cc06fe2d..b71abfb7c8 100644 --- a/src/infrastructure/api/diagnosticRoutesApi.ts +++ b/src/infrastructure/api/diagnosticRoutesApi.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -29,7 +29,7 @@ import localVarRequest = require('request'); import http = require('http'); /* tslint:disable:no-unused-locals */ -import { ServerDTO } from '../model/serverDTO'; +import { ServerInfoDTO } from '../model/serverInfoDTO'; import { StorageInfoDTO } from '../model/storageInfoDTO'; import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; @@ -141,7 +141,7 @@ export class DiagnosticRoutesApi { * Returns the version of the running catapult-rest component. * @summary Get the version of the running rest component */ - public async getServerInfo (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: ServerDTO; }> { + public async getServerInfo (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: ServerInfoDTO; }> { const localVarPath = this.basePath + '/diagnostic/server'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); @@ -170,12 +170,12 @@ export class DiagnosticRoutesApi { localVarRequestOptions.form = localVarFormParams; } } - return new Promise<{ response: http.ClientResponse; body: ServerDTO; }>((resolve, reject) => { + return new Promise<{ response: http.ClientResponse; body: ServerInfoDTO; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { - body = ObjectSerializer.deserialize(body, "ServerDTO"); + body = ObjectSerializer.deserialize(body, "ServerInfoDTO"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { diff --git a/src/infrastructure/api/metadataRoutesApi.ts b/src/infrastructure/api/metadataRoutesApi.ts index 39b8937699..dc303735b7 100644 --- a/src/infrastructure/api/metadataRoutesApi.ts +++ b/src/infrastructure/api/metadataRoutesApi.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -31,6 +31,7 @@ import http = require('http'); /* tslint:disable:no-unused-locals */ import { MetadataDTO } from '../model/metadataDTO'; import { MetadataEntriesDTO } from '../model/metadataEntriesDTO'; +import { ModelError } from '../model/modelError'; import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; @@ -160,7 +161,7 @@ export class MetadataRoutesApi { }); } /** - * Returns the account metadata given an account id and a key + * Returns the account metadata given an account id and a key. * @summary Get account metadata * @param accountId Account public key or address. * @param key Metadata key. @@ -226,11 +227,11 @@ export class MetadataRoutesApi { }); } /** - * Returns the account metadata given an account id, a key, and a sender + * Returns the account metadata given an account id, a key, and a sender. * @summary Get account metadata * @param accountId Account public key or address. * @param key Metadata key. - * @param publicKey Account public key + * @param publicKey Account public key. */ public async getAccountMetadataByKeyAndSender (accountId: string, key: string, publicKey: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MetadataDTO; }> { const localVarPath = this.basePath + '/metadata/account/{accountId}/key/{key}/sender/{publicKey}' @@ -373,7 +374,7 @@ export class MetadataRoutesApi { }); } /** - * Returns the mosaic metadata given a mosaic id and a key + * Returns the mosaic metadata given a mosaic id and a key. * @summary Get mosaic metadata * @param mosaicId Mosaic identifier. * @param key Metadata key. @@ -439,11 +440,11 @@ export class MetadataRoutesApi { }); } /** - * Returns the mosaic metadata given a mosaic id, a key, and a sender + * Returns the mosaic metadata given a mosaic id, a key, and a sender. * @summary Get mosaic metadata * @param mosaicId Mosaic identifier. * @param key Metadata key. - * @param publicKey Account public key + * @param publicKey Account public key. */ public async getMosaicMetadataByKeyAndSender (mosaicId: string, key: string, publicKey: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MetadataDTO; }> { const localVarPath = this.basePath + '/metadata/mosaic/{mosaicId}/key/{key}/sender/{publicKey}' @@ -586,7 +587,7 @@ export class MetadataRoutesApi { }); } /** - * Returns the namespace metadata given a namespace id and a key + * Returns the namespace metadata given a namespace id and a key. * @summary Get namespace metadata * @param namespaceId Namespace identifier. * @param key Metadata key. @@ -652,11 +653,11 @@ export class MetadataRoutesApi { }); } /** - * Returns the namespace metadata given a namespace id, a key, and a sender + * Returns the namespace metadata given a namespace id, a key, and a sender. * @summary Get namespace metadata * @param namespaceId Namespace identifier. * @param key Metadata key. - * @param publicKey Account public key + * @param publicKey Account public key. */ public async getNamespaceMetadataByKeyAndSender (namespaceId: string, key: string, publicKey: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MetadataDTO; }> { const localVarPath = this.basePath + '/metadata/namespace/{namespaceId}/key/{key}/sender/{publicKey}' diff --git a/src/infrastructure/api/mosaicRoutesApi.ts b/src/infrastructure/api/mosaicRoutesApi.ts index e4ea723372..7e46da3b3a 100644 --- a/src/infrastructure/api/mosaicRoutesApi.ts +++ b/src/infrastructure/api/mosaicRoutesApi.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -33,7 +33,7 @@ import { AccountIds } from '../model/accountIds'; import { ModelError } from '../model/modelError'; import { MosaicIds } from '../model/mosaicIds'; import { MosaicInfoDTO } from '../model/mosaicInfoDTO'; -import { MosaicsNamesDTO } from '../model/mosaicsNamesDTO'; +import { MosaicsInfoDTO } from '../model/mosaicsInfoDTO'; import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; @@ -210,10 +210,8 @@ export class MosaicRoutesApi { * Gets an array of mosaics created for a given account address. * @summary Get mosaics created by an account * @param accountId Account public key or address. - * @param pageSize Number of transactions to return for each request. - * @param id Mosaic identifier up to which transactions are returned. */ - public async getMosaicsFromAccount (accountId: string, pageSize?: number, id?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { + public async getMosaicsFromAccount (accountId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MosaicsInfoDTO; }> { const localVarPath = this.basePath + '/account/{accountId}/mosaics' .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); let localVarQueryParameters: any = {}; @@ -225,14 +223,6 @@ export class MosaicRoutesApi { throw new Error('Required parameter accountId was null or undefined when calling getMosaicsFromAccount.'); } - if (pageSize !== undefined) { - localVarQueryParameters['pageSize'] = ObjectSerializer.serialize(pageSize, "number"); - } - - if (id !== undefined) { - localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); - } - (Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; @@ -256,12 +246,12 @@ export class MosaicRoutesApi { localVarRequestOptions.form = localVarFormParams; } } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { + return new Promise<{ response: http.ClientResponse; body: MosaicsInfoDTO; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { - body = ObjectSerializer.deserialize(body, "Array"); + body = ObjectSerializer.deserialize(body, "MosaicsInfoDTO"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -280,7 +270,7 @@ export class MosaicRoutesApi { * @summary Get mosaics created for given array of addresses * @param accountIds */ - public async getMosaicsFromAccounts (accountIds?: AccountIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { + public async getMosaicsFromAccounts (accountIds?: AccountIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MosaicsInfoDTO; }> { const localVarPath = this.basePath + '/account/mosaics'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); @@ -310,71 +300,12 @@ export class MosaicRoutesApi { localVarRequestOptions.form = localVarFormParams; } } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns friendly names for mosaics. - * @summary Get readable names for a set of mosaics - * @param mosaicIds - */ - public async getMosaicsNames (mosaicIds: MosaicIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MosaicsNamesDTO; }> { - const localVarPath = this.basePath + '/mosaic/names'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'mosaicIds' is not null or undefined - if (mosaicIds === null || mosaicIds === undefined) { - throw new Error('Required parameter mosaicIds was null or undefined when calling getMosaicsNames.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(mosaicIds, "MosaicIds") - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: MosaicsNamesDTO; }>((resolve, reject) => { + return new Promise<{ response: http.ClientResponse; body: MosaicsInfoDTO; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { - body = ObjectSerializer.deserialize(body, "MosaicsNamesDTO"); + body = ObjectSerializer.deserialize(body, "MosaicsInfoDTO"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { diff --git a/src/infrastructure/api/multisigRoutesApi.ts b/src/infrastructure/api/multisigRoutesApi.ts new file mode 100644 index 0000000000..77b36b550c --- /dev/null +++ b/src/infrastructure/api/multisigRoutesApi.ts @@ -0,0 +1,207 @@ +/* + * Copyright 2019 NEM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * Catapult REST Endpoints + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.7.21 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import localVarRequest = require('request'); +import http = require('http'); + +/* tslint:disable:no-unused-locals */ +import { ModelError } from '../model/modelError'; +import { MultisigAccountGraphInfoDTO } from '../model/multisigAccountGraphInfoDTO'; +import { MultisigAccountInfoDTO } from '../model/multisigAccountInfoDTO'; + +import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; + +let defaultBasePath = 'http://localhost:3000'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum MultisigRoutesApiApiKeys { +} + +export class MultisigRoutesApi { + protected _basePath = defaultBasePath; + protected defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + } + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: MultisigRoutesApiApiKeys, value: string) { + (this.authentications as any)[MultisigRoutesApiApiKeys[key]].apiKey = value; + } + + /** + * Returns the multisig account information. + * @summary Get multisig account information + * @param accountId Account public key or address. + */ + public async getAccountMultisig (accountId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MultisigAccountInfoDTO; }> { + const localVarPath = this.basePath + '/account/{accountId}/multisig' + .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'accountId' is not null or undefined + if (accountId === null || accountId === undefined) { + throw new Error('Required parameter accountId was null or undefined when calling getAccountMultisig.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + return authenticationPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.ClientResponse; body: MultisigAccountInfoDTO; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + body = ObjectSerializer.deserialize(body, "MultisigAccountInfoDTO"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject({ response: { + statusCode: response.statusCode, + statusMessage: response.statusMessage, + }, body: response.body }); + } + } + }); + }); + }); + } + /** + * Returns the multisig account graph. + * @summary Get multisig account graph information + * @param accountId Account public key or address. + */ + public async getAccountMultisigGraph (accountId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { + const localVarPath = this.basePath + '/account/{accountId}/multisig/graph' + .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'accountId' is not null or undefined + if (accountId === null || accountId === undefined) { + throw new Error('Required parameter accountId was null or undefined when calling getAccountMultisigGraph.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + return authenticationPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + body = ObjectSerializer.deserialize(body, "Array"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject({ response: { + statusCode: response.statusCode, + statusMessage: response.statusMessage, + }, body: response.body }); + } + } + }); + }); + }); + } +} diff --git a/src/infrastructure/api/namespaceRoutesApi.ts b/src/infrastructure/api/namespaceRoutesApi.ts index d1419b0adc..5c112f7074 100644 --- a/src/infrastructure/api/namespaceRoutesApi.ts +++ b/src/infrastructure/api/namespaceRoutesApi.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -30,10 +30,14 @@ import http = require('http'); /* tslint:disable:no-unused-locals */ import { AccountIds } from '../model/accountIds'; +import { AccountsNamesDTO } from '../model/accountsNamesDTO'; import { ModelError } from '../model/modelError'; +import { MosaicIds } from '../model/mosaicIds'; +import { MosaicsNamesDTO } from '../model/mosaicsNamesDTO'; import { NamespaceIds } from '../model/namespaceIds'; import { NamespaceInfoDTO } from '../model/namespaceInfoDTO'; import { NamespaceNameDTO } from '../model/namespaceNameDTO'; +import { NamespacesInfoDTO } from '../model/namespacesInfoDTO'; import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; @@ -88,6 +92,119 @@ export class NamespaceRoutesApi { (this.authentications as any)[NamespaceRoutesApiApiKeys[key]].apiKey = value; } + /** + * Returns friendly names for accounts. + * @summary Get readable names for a set of accountIds + * @param accountIds + */ + public async getAccountsNames (accountIds?: AccountIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: AccountsNamesDTO; }> { + const localVarPath = this.basePath + '/account/names'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(accountIds, "AccountIds") + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + return authenticationPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.ClientResponse; body: AccountsNamesDTO; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + body = ObjectSerializer.deserialize(body, "AccountsNamesDTO"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject({ response: { + statusCode: response.statusCode, + statusMessage: response.statusMessage, + }, body: response.body }); + } + } + }); + }); + }); + } + /** + * Returns friendly names for mosaics. + * @summary Get readable names for a set of mosaics + * @param mosaicIds + */ + public async getMosaicsNames (mosaicIds: MosaicIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MosaicsNamesDTO; }> { + const localVarPath = this.basePath + '/mosaic/names'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'mosaicIds' is not null or undefined + if (mosaicIds === null || mosaicIds === undefined) { + throw new Error('Required parameter mosaicIds was null or undefined when calling getMosaicsNames.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(mosaicIds, "MosaicIds") + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + return authenticationPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.ClientResponse; body: MosaicsNamesDTO; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + body = ObjectSerializer.deserialize(body, "MosaicsNamesDTO"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject({ response: { + statusCode: response.statusCode, + statusMessage: response.statusMessage, + }, body: response.body }); + } + } + }); + }); + }); + } /** * Gets the namespace for a given namespace identifier. * @summary Get namespace information @@ -149,12 +266,12 @@ export class NamespaceRoutesApi { } /** * Gets an array of namespaces for a given account address. - * @summary Get namespaces owned by an account + * @summary Get namespaces created by an account * @param accountId Account public key or address. * @param pageSize Number of transactions to return for each request. * @param id Namespace identifier up to which transactions are returned. */ - public async getNamespacesFromAccount (accountId: string, pageSize?: number, id?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { + public async getNamespacesFromAccount (accountId: string, pageSize?: number, id?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: NamespacesInfoDTO; }> { const localVarPath = this.basePath + '/account/{accountId}/namespaces' .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); let localVarQueryParameters: any = {}; @@ -197,12 +314,12 @@ export class NamespaceRoutesApi { localVarRequestOptions.form = localVarFormParams; } } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { + return new Promise<{ response: http.ClientResponse; body: NamespacesInfoDTO; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { - body = ObjectSerializer.deserialize(body, "Array"); + body = ObjectSerializer.deserialize(body, "NamespacesInfoDTO"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -221,7 +338,7 @@ export class NamespaceRoutesApi { * @summary Get namespaces for given array of addresses * @param accountIds */ - public async getNamespacesFromAccounts (accountIds?: AccountIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { + public async getNamespacesFromAccounts (accountIds?: AccountIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: NamespacesInfoDTO; }> { const localVarPath = this.basePath + '/account/namespaces'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); @@ -251,12 +368,12 @@ export class NamespaceRoutesApi { localVarRequestOptions.form = localVarFormParams; } } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { + return new Promise<{ response: http.ClientResponse; body: NamespacesInfoDTO; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { - body = ObjectSerializer.deserialize(body, "Array"); + body = ObjectSerializer.deserialize(body, "NamespacesInfoDTO"); if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { diff --git a/src/infrastructure/api/networkRoutesApi.ts b/src/infrastructure/api/networkRoutesApi.ts index 9c75f2014c..9c2fa6fd8b 100644 --- a/src/infrastructure/api/networkRoutesApi.ts +++ b/src/infrastructure/api/networkRoutesApi.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/api/nodeRoutesApi.ts b/src/infrastructure/api/nodeRoutesApi.ts index bd3502da65..67d86791ee 100644 --- a/src/infrastructure/api/nodeRoutesApi.ts +++ b/src/infrastructure/api/nodeRoutesApi.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/api/receiptRoutesApi.ts b/src/infrastructure/api/receiptRoutesApi.ts new file mode 100644 index 0000000000..49338943b6 --- /dev/null +++ b/src/infrastructure/api/receiptRoutesApi.ts @@ -0,0 +1,214 @@ +/* + * Copyright 2019 NEM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * Catapult REST Endpoints + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.7.21 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import localVarRequest = require('request'); +import http = require('http'); + +/* tslint:disable:no-unused-locals */ +import { MerkleProofInfoDTO } from '../model/merkleProofInfoDTO'; +import { ModelError } from '../model/modelError'; +import { StatementsDTO } from '../model/statementsDTO'; + +import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; + +let defaultBasePath = 'http://localhost:3000'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum ReceiptRoutesApiApiKeys { +} + +export class ReceiptRoutesApi { + protected _basePath = defaultBasePath; + protected defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + } + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: ReceiptRoutesApiApiKeys, value: string) { + (this.authentications as any)[ReceiptRoutesApiApiKeys[key]].apiKey = value; + } + + /** + * Returns the receipts linked to a block. + * @summary Get receipts from a block + * @param height Block height. If height -1 is not a multiple of the limit provided, the inferior closest multiple + 1 is used instead. + */ + public async getBlockReceipts (height: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: StatementsDTO; }> { + const localVarPath = this.basePath + '/block/{height}/receipts' + .replace('{' + 'height' + '}', encodeURIComponent(String(height))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'height' is not null or undefined + if (height === null || height === undefined) { + throw new Error('Required parameter height was null or undefined when calling getBlockReceipts.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + return authenticationPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.ClientResponse; body: StatementsDTO; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + body = ObjectSerializer.deserialize(body, "StatementsDTO"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject({ response: { + statusCode: response.statusCode, + statusMessage: response.statusMessage, + }, body: response.body }); + } + } + }); + }); + }); + } + /** + * Returns the merkle path for a receipt statement or resolution linked to a block. The path is the complementary data needed to calculate the merkle root. A client can compare if the calculated root equals the one recorded in the block header, verifying that the receipt was linked with the block. + * @summary Get the merkle path for a given a receipt statement hash and block + * @param height Block height. If height -1 is not a multiple of the limit provided, the inferior closest multiple + 1 is used instead. + * @param hash Receipt hash. + */ + public async getMerkleReceipts (height: string, hash: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: MerkleProofInfoDTO; }> { + const localVarPath = this.basePath + '/block/{height}/receipt/{hash}/merkle' + .replace('{' + 'height' + '}', encodeURIComponent(String(height))) + .replace('{' + 'hash' + '}', encodeURIComponent(String(hash))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'height' is not null or undefined + if (height === null || height === undefined) { + throw new Error('Required parameter height was null or undefined when calling getMerkleReceipts.'); + } + + // verify required parameter 'hash' is not null or undefined + if (hash === null || hash === undefined) { + throw new Error('Required parameter hash was null or undefined when calling getMerkleReceipts.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + return authenticationPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.ClientResponse; body: MerkleProofInfoDTO; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + body = ObjectSerializer.deserialize(body, "MerkleProofInfoDTO"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject({ response: { + statusCode: response.statusCode, + statusMessage: response.statusMessage, + }, body: response.body }); + } + } + }); + }); + }); + } +} diff --git a/src/infrastructure/api/restrictionAccountRoutesApi.ts b/src/infrastructure/api/restrictionAccountRoutesApi.ts new file mode 100644 index 0000000000..57656b2c35 --- /dev/null +++ b/src/infrastructure/api/restrictionAccountRoutesApi.ts @@ -0,0 +1,202 @@ +/* + * Copyright 2019 NEM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * Catapult REST Endpoints + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.7.21 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import localVarRequest = require('request'); +import http = require('http'); + +/* tslint:disable:no-unused-locals */ +import { AccountIds } from '../model/accountIds'; +import { AccountRestrictionsInfoDTO } from '../model/accountRestrictionsInfoDTO'; +import { ModelError } from '../model/modelError'; + +import { ObjectSerializer, Authentication, VoidAuth } from '../model/models'; + +let defaultBasePath = 'http://localhost:3000'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum RestrictionAccountRoutesApiApiKeys { +} + +export class RestrictionAccountRoutesApi { + protected _basePath = defaultBasePath; + protected defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + } + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: RestrictionAccountRoutesApiApiKeys, value: string) { + (this.authentications as any)[RestrictionAccountRoutesApiApiKeys[key]].apiKey = value; + } + + /** + * Returns the account restrictions for a given account. + * @summary Get the account restrictions + * @param accountId Account public key or address. + */ + public async getAccountRestrictions (accountId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: AccountRestrictionsInfoDTO; }> { + const localVarPath = this.basePath + '/restrictions/account/{accountId}' + .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'accountId' is not null or undefined + if (accountId === null || accountId === undefined) { + throw new Error('Required parameter accountId was null or undefined when calling getAccountRestrictions.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + return authenticationPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.ClientResponse; body: AccountRestrictionsInfoDTO; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + body = ObjectSerializer.deserialize(body, "AccountRestrictionsInfoDTO"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject({ response: { + statusCode: response.statusCode, + statusMessage: response.statusMessage, + }, body: response.body }); + } + } + }); + }); + }); + } + /** + * Returns the account restrictions for a given array of addresses. + * @summary Get account restrictions for given array of addresses + * @param accountIds + */ + public async getAccountRestrictionsFromAccounts (accountIds?: AccountIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { + const localVarPath = this.basePath + '/restrictions/account'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(accountIds, "AccountIds") + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + return authenticationPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + body = ObjectSerializer.deserialize(body, "Array"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject({ response: { + statusCode: response.statusCode, + statusMessage: response.statusMessage, + }, body: response.body }); + } + } + }); + }); + }); + } +} diff --git a/src/infrastructure/api/restrictionRoutesApi.ts b/src/infrastructure/api/restrictionMosaicRoutesApi.ts similarity index 71% rename from src/infrastructure/api/restrictionRoutesApi.ts rename to src/infrastructure/api/restrictionMosaicRoutesApi.ts index f2e82f3adf..ad6f09dc02 100644 --- a/src/infrastructure/api/restrictionRoutesApi.ts +++ b/src/infrastructure/api/restrictionMosaicRoutesApi.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -30,7 +30,6 @@ import http = require('http'); /* tslint:disable:no-unused-locals */ import { AccountIds } from '../model/accountIds'; -import { AccountRestrictionsInfoDTO } from '../model/accountRestrictionsInfoDTO'; import { ModelError } from '../model/modelError'; import { MosaicAddressRestrictionDTO } from '../model/mosaicAddressRestrictionDTO'; import { MosaicGlobalRestrictionDTO } from '../model/mosaicGlobalRestrictionDTO'; @@ -44,10 +43,10 @@ let defaultBasePath = 'http://localhost:3000'; // This file is autogenerated - Please do not edit // =============================================== -export enum RestrictionRoutesApiApiKeys { +export enum RestrictionMosaicRoutesApiApiKeys { } -export class RestrictionRoutesApi { +export class RestrictionMosaicRoutesApi { protected _basePath = defaultBasePath; protected defaultHeaders : any = {}; protected _useQuerystring : boolean = false; @@ -85,123 +84,10 @@ export class RestrictionRoutesApi { this.authentications.default = auth; } - public setApiKey(key: RestrictionRoutesApiApiKeys, value: string) { - (this.authentications as any)[RestrictionRoutesApiApiKeys[key]].apiKey = value; + public setApiKey(key: RestrictionMosaicRoutesApiApiKeys, value: string) { + (this.authentications as any)[RestrictionMosaicRoutesApiApiKeys[key]].apiKey = value; } - /** - * Returns the account restrictions for a given account. - * @summary Get the account restrictions - * @param accountId Account public key or address. - */ - public async getAccountRestrictions (accountId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: AccountRestrictionsInfoDTO; }> { - const localVarPath = this.basePath + '/restrictions/account/{accountId}' - .replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId))); - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - // verify required parameter 'accountId' is not null or undefined - if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling getAccountRestrictions.'); - } - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: AccountRestrictionsInfoDTO; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "AccountRestrictionsInfoDTO"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } - /** - * Returns the account restrictions for a given array of addresses. - * @summary Get account restrictions for given array of addresses - * @param accountIds - */ - public async getAccountRestrictionsFromAccounts (accountIds?: AccountIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { - const localVarPath = this.basePath + '/restrictions/account'; - let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); - let localVarFormParams: any = {}; - - (Object).assign(localVarHeaderParams, options.headers); - - let localVarUseFormData = false; - - let localVarRequestOptions: localVarRequest.Options = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: ObjectSerializer.serialize(accountIds, "AccountIds") - }; - - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - return authenticationPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - (localVarRequestOptions).formData = localVarFormParams; - } else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise<{ response: http.ClientResponse; body: Array; }>((resolve, reject) => { - localVarRequest(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } else { - body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } else { - reject({ response: { - statusCode: response.statusCode, - statusMessage: response.statusMessage, - }, body: response.body }); - } - } - }); - }); - }); - } /** * Get mosaic address restriction. * @summary Get mosaic address restrictions for a given mosaic and account identifier. diff --git a/src/infrastructure/api/transactionRoutesApi.ts b/src/infrastructure/api/transactionRoutesApi.ts index 0a9a15a058..9375a20c7a 100644 --- a/src/infrastructure/api/transactionRoutesApi.ts +++ b/src/infrastructure/api/transactionRoutesApi.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/infrastructure.ts b/src/infrastructure/infrastructure.ts index 1f23a26872..6bc372b0af 100644 --- a/src/infrastructure/infrastructure.ts +++ b/src/infrastructure/infrastructure.ts @@ -27,5 +27,8 @@ export * from './Listener'; export * from './QueryParams'; export * from './NetworkHttp'; export * from './NodeHttp'; -export * from './RestrictionHttp'; +export * from './RestrictionAccountHttp'; +export * from './RestrictionMosaicHttp'; +export * from './MultisigHttp'; +export * from './ReceiptHttp'; export * from './transaction/NamespaceMosaicIdGenerator'; diff --git a/src/infrastructure/model/accountAddressRestrictionTransactionBodyDTO.ts b/src/infrastructure/model/accountAddressRestrictionTransactionBodyDTO.ts index b0a0335185..fcafef8bc4 100644 --- a/src/infrastructure/model/accountAddressRestrictionTransactionBodyDTO.ts +++ b/src/infrastructure/model/accountAddressRestrictionTransactionBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,25 +25,36 @@ * Do not edit the class manually. */ -import { AccountAddressRestrictionModificationDTO } from './accountAddressRestrictionModificationDTO'; -import { AccountRestrictionTypeEnum } from './accountRestrictionTypeEnum'; +import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; export class AccountAddressRestrictionTransactionBodyDTO { - 'restrictionType': AccountRestrictionTypeEnum; - 'modifications': Array; + 'restrictionFlags': AccountRestrictionFlagsEnum; + /** + * Account restriction additions. + */ + 'restrictionAdditions': Array; + /** + * Account restriction deletions. + */ + 'restrictionDeletions': Array; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - "name": "restrictionType", - "baseName": "restrictionType", - "type": "AccountRestrictionTypeEnum" + "name": "restrictionFlags", + "baseName": "restrictionFlags", + "type": "AccountRestrictionFlagsEnum" }, { - "name": "modifications", - "baseName": "modifications", - "type": "Array" + "name": "restrictionAdditions", + "baseName": "restrictionAdditions", + "type": "Array" + }, + { + "name": "restrictionDeletions", + "baseName": "restrictionDeletions", + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/accountAddressRestrictionTransactionDTO.ts b/src/infrastructure/model/accountAddressRestrictionTransactionDTO.ts index 3ac642f172..f3285d711b 100644 --- a/src/infrastructure/model/accountAddressRestrictionTransactionDTO.ts +++ b/src/infrastructure/model/accountAddressRestrictionTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,9 +25,9 @@ * Do not edit the class manually. */ -import { AccountAddressRestrictionModificationDTO } from './accountAddressRestrictionModificationDTO'; import { AccountAddressRestrictionTransactionBodyDTO } from './accountAddressRestrictionTransactionBodyDTO'; -import { AccountRestrictionTypeEnum } from './accountRestrictionTypeEnum'; +import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { TransactionDTO } from './transactionDTO'; /** @@ -40,9 +40,10 @@ export class AccountAddressRestrictionTransactionDTO { 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -52,8 +53,15 @@ export class AccountAddressRestrictionTransactionDTO { * Duration expressed in number of blocks. */ 'deadline': string; - 'restrictionType': AccountRestrictionTypeEnum; - 'modifications': Array; + 'restrictionFlags': AccountRestrictionFlagsEnum; + /** + * Account restriction additions. + */ + 'restrictionAdditions': Array; + /** + * Account restriction deletions. + */ + 'restrictionDeletions': Array; static discriminator: string | undefined = undefined; @@ -73,6 +81,11 @@ export class AccountAddressRestrictionTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -89,14 +102,19 @@ export class AccountAddressRestrictionTransactionDTO { "type": "string" }, { - "name": "restrictionType", - "baseName": "restrictionType", - "type": "AccountRestrictionTypeEnum" + "name": "restrictionFlags", + "baseName": "restrictionFlags", + "type": "AccountRestrictionFlagsEnum" + }, + { + "name": "restrictionAdditions", + "baseName": "restrictionAdditions", + "type": "Array" }, { - "name": "modifications", - "baseName": "modifications", - "type": "Array" + "name": "restrictionDeletions", + "baseName": "restrictionDeletions", + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/accountDTO.ts b/src/infrastructure/model/accountDTO.ts index da98d36999..0fb7c46261 100644 --- a/src/infrastructure/model/accountDTO.ts +++ b/src/infrastructure/model/accountDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/accountIds.ts b/src/infrastructure/model/accountIds.ts index 370f46fa31..9680d11689 100644 --- a/src/infrastructure/model/accountIds.ts +++ b/src/infrastructure/model/accountIds.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/accountInfoDTO.ts b/src/infrastructure/model/accountInfoDTO.ts index 503c28436a..cba670bbc2 100644 --- a/src/infrastructure/model/accountInfoDTO.ts +++ b/src/infrastructure/model/accountInfoDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/accountLinkActionEnum.ts b/src/infrastructure/model/accountLinkActionEnum.ts index 5cfa176ce9..ebfc4ac3fb 100644 --- a/src/infrastructure/model/accountLinkActionEnum.ts +++ b/src/infrastructure/model/accountLinkActionEnum.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/accountLinkTransactionBodyDTO.ts b/src/infrastructure/model/accountLinkTransactionBodyDTO.ts index 915d285a14..cf46f3cd32 100644 --- a/src/infrastructure/model/accountLinkTransactionBodyDTO.ts +++ b/src/infrastructure/model/accountLinkTransactionBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/accountLinkTransactionDTO.ts b/src/infrastructure/model/accountLinkTransactionDTO.ts index 1f21f0e4b9..c254544001 100644 --- a/src/infrastructure/model/accountLinkTransactionDTO.ts +++ b/src/infrastructure/model/accountLinkTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,6 +27,7 @@ import { AccountLinkActionEnum } from './accountLinkActionEnum'; import { AccountLinkTransactionBodyDTO } from './accountLinkTransactionBodyDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { TransactionDTO } from './transactionDTO'; /** @@ -39,9 +40,10 @@ export class AccountLinkTransactionDTO { 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -72,6 +74,11 @@ export class AccountLinkTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", diff --git a/src/infrastructure/model/accountMetadataTransactionBodyDTO.ts b/src/infrastructure/model/accountMetadataTransactionBodyDTO.ts index 00a3ad3bea..e63034f10b 100644 --- a/src/infrastructure/model/accountMetadataTransactionBodyDTO.ts +++ b/src/infrastructure/model/accountMetadataTransactionBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/accountMetadataTransactionDTO.ts b/src/infrastructure/model/accountMetadataTransactionDTO.ts index 073d4b69b1..00506fbb19 100644 --- a/src/infrastructure/model/accountMetadataTransactionDTO.ts +++ b/src/infrastructure/model/accountMetadataTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -26,6 +26,7 @@ */ import { AccountMetadataTransactionBodyDTO } from './accountMetadataTransactionBodyDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { TransactionDTO } from './transactionDTO'; /** @@ -38,9 +39,10 @@ export class AccountMetadataTransactionDTO { 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -86,6 +88,11 @@ export class AccountMetadataTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", diff --git a/src/infrastructure/model/accountMosaicRestrictionTransactionBodyDTO.ts b/src/infrastructure/model/accountMosaicRestrictionTransactionBodyDTO.ts index c1ad286d39..2f9d5b67f0 100644 --- a/src/infrastructure/model/accountMosaicRestrictionTransactionBodyDTO.ts +++ b/src/infrastructure/model/accountMosaicRestrictionTransactionBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,25 +25,36 @@ * Do not edit the class manually. */ -import { AccountMosaicRestrictionModificationDTO } from './accountMosaicRestrictionModificationDTO'; -import { AccountRestrictionTypeEnum } from './accountRestrictionTypeEnum'; +import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; export class AccountMosaicRestrictionTransactionBodyDTO { - 'restrictionType': AccountRestrictionTypeEnum; - 'modifications': Array; + 'restrictionFlags': AccountRestrictionFlagsEnum; + /** + * Account restriction additions. + */ + 'restrictionAdditions': Array; + /** + * Account restriction deletions. + */ + 'restrictionDeletions': Array; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - "name": "restrictionType", - "baseName": "restrictionType", - "type": "AccountRestrictionTypeEnum" + "name": "restrictionFlags", + "baseName": "restrictionFlags", + "type": "AccountRestrictionFlagsEnum" }, { - "name": "modifications", - "baseName": "modifications", - "type": "Array" + "name": "restrictionAdditions", + "baseName": "restrictionAdditions", + "type": "Array" + }, + { + "name": "restrictionDeletions", + "baseName": "restrictionDeletions", + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/accountMosaicRestrictionTransactionDTO.ts b/src/infrastructure/model/accountMosaicRestrictionTransactionDTO.ts index 722eea9c4b..1ea90730e1 100644 --- a/src/infrastructure/model/accountMosaicRestrictionTransactionDTO.ts +++ b/src/infrastructure/model/accountMosaicRestrictionTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,9 +25,9 @@ * Do not edit the class manually. */ -import { AccountMosaicRestrictionModificationDTO } from './accountMosaicRestrictionModificationDTO'; import { AccountMosaicRestrictionTransactionBodyDTO } from './accountMosaicRestrictionTransactionBodyDTO'; -import { AccountRestrictionTypeEnum } from './accountRestrictionTypeEnum'; +import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { TransactionDTO } from './transactionDTO'; /** @@ -40,9 +40,10 @@ export class AccountMosaicRestrictionTransactionDTO { 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -52,8 +53,15 @@ export class AccountMosaicRestrictionTransactionDTO { * Duration expressed in number of blocks. */ 'deadline': string; - 'restrictionType': AccountRestrictionTypeEnum; - 'modifications': Array; + 'restrictionFlags': AccountRestrictionFlagsEnum; + /** + * Account restriction additions. + */ + 'restrictionAdditions': Array; + /** + * Account restriction deletions. + */ + 'restrictionDeletions': Array; static discriminator: string | undefined = undefined; @@ -73,6 +81,11 @@ export class AccountMosaicRestrictionTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -89,14 +102,19 @@ export class AccountMosaicRestrictionTransactionDTO { "type": "string" }, { - "name": "restrictionType", - "baseName": "restrictionType", - "type": "AccountRestrictionTypeEnum" + "name": "restrictionFlags", + "baseName": "restrictionFlags", + "type": "AccountRestrictionFlagsEnum" + }, + { + "name": "restrictionAdditions", + "baseName": "restrictionAdditions", + "type": "Array" }, { - "name": "modifications", - "baseName": "modifications", - "type": "Array" + "name": "restrictionDeletions", + "baseName": "restrictionDeletions", + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/accountNamesDTO.ts b/src/infrastructure/model/accountNamesDTO.ts index 91bd0c5f97..c36c6cdf76 100644 --- a/src/infrastructure/model/accountNamesDTO.ts +++ b/src/infrastructure/model/accountNamesDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/accountOperationRestrictionTransactionBodyDTO.ts b/src/infrastructure/model/accountOperationRestrictionTransactionBodyDTO.ts index 3b599045ce..e49771bdbb 100644 --- a/src/infrastructure/model/accountOperationRestrictionTransactionBodyDTO.ts +++ b/src/infrastructure/model/accountOperationRestrictionTransactionBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,25 +25,37 @@ * Do not edit the class manually. */ -import { AccountOperationRestrictionModificationDTO } from './accountOperationRestrictionModificationDTO'; -import { AccountRestrictionTypeEnum } from './accountRestrictionTypeEnum'; +import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; +import { TransactionTypeEnum } from './transactionTypeEnum'; export class AccountOperationRestrictionTransactionBodyDTO { - 'restrictionType': AccountRestrictionTypeEnum; - 'modifications': Array; + 'restrictionFlags': AccountRestrictionFlagsEnum; + /** + * Account restriction additions. + */ + 'restrictionAdditions': Array; + /** + * Account restriction deletions. + */ + 'restrictionDeletions': Array; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - "name": "restrictionType", - "baseName": "restrictionType", - "type": "AccountRestrictionTypeEnum" + "name": "restrictionFlags", + "baseName": "restrictionFlags", + "type": "AccountRestrictionFlagsEnum" }, { - "name": "modifications", - "baseName": "modifications", - "type": "Array" + "name": "restrictionAdditions", + "baseName": "restrictionAdditions", + "type": "Array" + }, + { + "name": "restrictionDeletions", + "baseName": "restrictionDeletions", + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/accountOperationRestrictionTransactionDTO.ts b/src/infrastructure/model/accountOperationRestrictionTransactionDTO.ts index 2487495569..f4afb105e8 100644 --- a/src/infrastructure/model/accountOperationRestrictionTransactionDTO.ts +++ b/src/infrastructure/model/accountOperationRestrictionTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,10 +25,11 @@ * Do not edit the class manually. */ -import { AccountOperationRestrictionModificationDTO } from './accountOperationRestrictionModificationDTO'; import { AccountOperationRestrictionTransactionBodyDTO } from './accountOperationRestrictionTransactionBodyDTO'; -import { AccountRestrictionTypeEnum } from './accountRestrictionTypeEnum'; +import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { TransactionDTO } from './transactionDTO'; +import { TransactionTypeEnum } from './transactionTypeEnum'; /** * Transaction to prevent outgoing transactions by transaction type. @@ -40,9 +41,10 @@ export class AccountOperationRestrictionTransactionDTO { 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -52,8 +54,15 @@ export class AccountOperationRestrictionTransactionDTO { * Duration expressed in number of blocks. */ 'deadline': string; - 'restrictionType': AccountRestrictionTypeEnum; - 'modifications': Array; + 'restrictionFlags': AccountRestrictionFlagsEnum; + /** + * Account restriction additions. + */ + 'restrictionAdditions': Array; + /** + * Account restriction deletions. + */ + 'restrictionDeletions': Array; static discriminator: string | undefined = undefined; @@ -73,6 +82,11 @@ export class AccountOperationRestrictionTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -89,14 +103,19 @@ export class AccountOperationRestrictionTransactionDTO { "type": "string" }, { - "name": "restrictionType", - "baseName": "restrictionType", - "type": "AccountRestrictionTypeEnum" + "name": "restrictionFlags", + "baseName": "restrictionFlags", + "type": "AccountRestrictionFlagsEnum" + }, + { + "name": "restrictionAdditions", + "baseName": "restrictionAdditions", + "type": "Array" }, { - "name": "modifications", - "baseName": "modifications", - "type": "Array" + "name": "restrictionDeletions", + "baseName": "restrictionDeletions", + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/accountRestrictionDTO.ts b/src/infrastructure/model/accountRestrictionDTO.ts index 5b0f4ced11..c52fe7a7ee 100644 --- a/src/infrastructure/model/accountRestrictionDTO.ts +++ b/src/infrastructure/model/accountRestrictionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,27 +25,27 @@ * Do not edit the class manually. */ -import { AccountRestrictionTypeEnum } from './accountRestrictionTypeEnum'; +import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; export class AccountRestrictionDTO { - 'restrictionType': AccountRestrictionTypeEnum; + 'restrictionFlags': AccountRestrictionFlagsEnum; /** - * Address, transaction type, or mosaic id to restrict. + * Address, mosaic id, or transaction type to restrict. */ - 'values': Array; + 'values': any; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - "name": "restrictionType", - "baseName": "restrictionType", - "type": "AccountRestrictionTypeEnum" + "name": "restrictionFlags", + "baseName": "restrictionFlags", + "type": "AccountRestrictionFlagsEnum" }, { "name": "values", "baseName": "values", - "type": "Array" + "type": "any" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/accountRestrictionFlagsEnum.ts b/src/infrastructure/model/accountRestrictionFlagsEnum.ts new file mode 100644 index 0000000000..4b2746e02f --- /dev/null +++ b/src/infrastructure/model/accountRestrictionFlagsEnum.ts @@ -0,0 +1,41 @@ +/* + * Copyright 2019 NEM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * Catapult REST Endpoints + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.7.21 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** +* Type of account restriction: * 0x0001 (1 decimal) - Allow only incoming transactions from a given address. * 0x0002 (2 decimal) - Allow only incoming transactions containing a given mosaic identifier. * 0x4001 (16385 decimal) - Allow only outgoing transactions to a given address. * 0x4004 (16388 decimal) - Allow only outgoing transactions with a given transaction type. * 0x8001 (32769 decimal) - Block incoming transactions from a given address. * 0x8002 (32770 decimal) - Block incoming transactions containing a given mosaic identifier. * 0xC001 (49153 decimal) - Block outgoing transactions to a given address. * 0xC004 (49156 decimal) - Block outgoing transactions with a given transaction type. +*/ +export enum AccountRestrictionFlagsEnum { + NUMBER_1 = 1, + NUMBER_2 = 2, + NUMBER_16385 = 16385, + NUMBER_16388 = 16388, + NUMBER_32769 = 32769, + NUMBER_32770 = 32770, + NUMBER_49153 = 49153, + NUMBER_49156 = 49156 +} diff --git a/src/infrastructure/model/accountRestrictionTypeEnum.ts b/src/infrastructure/model/accountRestrictionTypeEnum.ts deleted file mode 100644 index 27de75c291..0000000000 --- a/src/infrastructure/model/accountRestrictionTypeEnum.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.19 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** -* Type of account restriction: * 0x01 (1 decimal) - Allow only incoming transactions from a given address. * 0x02 (2 decimal) - Allow only incoming transactions containing a given mosaic identifier. * 0x05 (5 decimal) - Account restriction sentinel. * 0x41 (65 decimal) - Allow only outgoing transactions to a given address. * 0x44 (68 decimal) - Allow only outgoing transactions with a given transaction type. * 0x81 (129 decimal) - Block incoming transactions from a given address. * 0x82 (130 decimal) - Block incoming transactions containing a given mosaic identifier. * 0xC1 (193 decimal) - Block outgoing transactions to a given address. * 0xC4 (196 decimal) - Block outgoing transactions with a given transaction type. -*/ -export enum AccountRestrictionTypeEnum { - NUMBER_1 = 1, - NUMBER_2 = 2, - NUMBER_5 = 5, - NUMBER_65 = 65, - NUMBER_68 = 68, - NUMBER_129 = 129, - NUMBER_130 = 130, - NUMBER_193 = 193, - NUMBER_196 = 196 -} diff --git a/src/infrastructure/model/accountRestrictionsDTO.ts b/src/infrastructure/model/accountRestrictionsDTO.ts index cebee66b92..208a11c535 100644 --- a/src/infrastructure/model/accountRestrictionsDTO.ts +++ b/src/infrastructure/model/accountRestrictionsDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/accountRestrictionsInfoDTO.ts b/src/infrastructure/model/accountRestrictionsInfoDTO.ts index 4786953f8e..07e957d9a0 100644 --- a/src/infrastructure/model/accountRestrictionsInfoDTO.ts +++ b/src/infrastructure/model/accountRestrictionsInfoDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/accountTypeEnum.ts b/src/infrastructure/model/accountTypeEnum.ts index 772dfdcfe0..94ebbb1ce5 100644 --- a/src/infrastructure/model/accountTypeEnum.ts +++ b/src/infrastructure/model/accountTypeEnum.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/accountsNamesDTO.ts b/src/infrastructure/model/accountsNamesDTO.ts index b51a54be81..1b6ef91181 100644 --- a/src/infrastructure/model/accountsNamesDTO.ts +++ b/src/infrastructure/model/accountsNamesDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/activityBucketDTO.ts b/src/infrastructure/model/activityBucketDTO.ts index 0e61d51d4d..451da2d066 100644 --- a/src/infrastructure/model/activityBucketDTO.ts +++ b/src/infrastructure/model/activityBucketDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/addressAliasTransactionBodyDTO.ts b/src/infrastructure/model/addressAliasTransactionBodyDTO.ts index 49b7916c0f..1b84a678cc 100644 --- a/src/infrastructure/model/addressAliasTransactionBodyDTO.ts +++ b/src/infrastructure/model/addressAliasTransactionBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,7 +28,6 @@ import { AliasActionEnum } from './aliasActionEnum'; export class AddressAliasTransactionBodyDTO { - 'aliasAction': AliasActionEnum; /** * Namespace identifier. */ @@ -37,15 +36,11 @@ export class AddressAliasTransactionBodyDTO { * Decoded address. */ 'address': string; + 'aliasAction': AliasActionEnum; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "aliasAction", - "baseName": "aliasAction", - "type": "AliasActionEnum" - }, { "name": "namespaceId", "baseName": "namespaceId", @@ -55,6 +50,11 @@ export class AddressAliasTransactionBodyDTO { "name": "address", "baseName": "address", "type": "string" + }, + { + "name": "aliasAction", + "baseName": "aliasAction", + "type": "AliasActionEnum" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/addressAliasTransactionDTO.ts b/src/infrastructure/model/addressAliasTransactionDTO.ts index e40b7ec72b..a574c941a5 100644 --- a/src/infrastructure/model/addressAliasTransactionDTO.ts +++ b/src/infrastructure/model/addressAliasTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,6 +27,7 @@ import { AddressAliasTransactionBodyDTO } from './addressAliasTransactionBodyDTO'; import { AliasActionEnum } from './aliasActionEnum'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { TransactionDTO } from './transactionDTO'; /** @@ -39,9 +40,10 @@ export class AddressAliasTransactionDTO { 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -51,7 +53,6 @@ export class AddressAliasTransactionDTO { * Duration expressed in number of blocks. */ 'deadline': string; - 'aliasAction': AliasActionEnum; /** * Namespace identifier. */ @@ -60,6 +61,7 @@ export class AddressAliasTransactionDTO { * Decoded address. */ 'address': string; + 'aliasAction': AliasActionEnum; static discriminator: string | undefined = undefined; @@ -79,6 +81,11 @@ export class AddressAliasTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -94,11 +101,6 @@ export class AddressAliasTransactionDTO { "baseName": "deadline", "type": "string" }, - { - "name": "aliasAction", - "baseName": "aliasAction", - "type": "AliasActionEnum" - }, { "name": "namespaceId", "baseName": "namespaceId", @@ -108,6 +110,11 @@ export class AddressAliasTransactionDTO { "name": "address", "baseName": "address", "type": "string" + }, + { + "name": "aliasAction", + "baseName": "aliasAction", + "type": "AliasActionEnum" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/aggregateCompleteTransactionDTO.ts b/src/infrastructure/model/aggregateCompleteTransactionDTO.ts deleted file mode 100644 index bceed87b8a..0000000000 --- a/src/infrastructure/model/aggregateCompleteTransactionDTO.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.19 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AggregateTransactionBodyDTO } from './aggregateTransactionBodyDTO'; -import { CosignatureDTO } from './cosignatureDTO'; -import { EmbeddedTransactionInfoDTO } from './embeddedTransactionInfoDTO'; -import { TransactionDTO } from './transactionDTO'; - -/** -* Transaction to combine multiple transactions together. -*/ -export class AggregateCompleteTransactionDTO { - /** - * Entity\'s signature generated by the signer. - */ - 'signature': string; - 'signerPublicKey': string; - /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. - */ - 'version': number; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - /** - * Array of transaction cosignatures. - */ - 'cosignatures': Array; - /** - * Array of transactions initiated by different accounts. - */ - 'transactions': Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "cosignatures", - "baseName": "cosignatures", - "type": "Array" - }, - { - "name": "transactions", - "baseName": "transactions", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return AggregateCompleteTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/aggregateTransactionBodyDTO.ts b/src/infrastructure/model/aggregateTransactionBodyDTO.ts index cd93384b2e..c40ae75439 100644 --- a/src/infrastructure/model/aggregateTransactionBodyDTO.ts +++ b/src/infrastructure/model/aggregateTransactionBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -29,6 +29,7 @@ import { CosignatureDTO } from './cosignatureDTO'; import { EmbeddedTransactionInfoDTO } from './embeddedTransactionInfoDTO'; export class AggregateTransactionBodyDTO { + 'transactionsHash': string; /** * Array of transaction cosignatures. */ @@ -41,6 +42,11 @@ export class AggregateTransactionBodyDTO { static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "transactionsHash", + "baseName": "transactionsHash", + "type": "string" + }, { "name": "cosignatures", "baseName": "cosignatures", diff --git a/src/infrastructure/model/aggregateBondedTransactionDTO.ts b/src/infrastructure/model/aggregateTransactionDTO.ts similarity index 85% rename from src/infrastructure/model/aggregateBondedTransactionDTO.ts rename to src/infrastructure/model/aggregateTransactionDTO.ts index 30c78cdb3f..b84ab10fe9 100644 --- a/src/infrastructure/model/aggregateBondedTransactionDTO.ts +++ b/src/infrastructure/model/aggregateTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,21 +28,23 @@ import { AggregateTransactionBodyDTO } from './aggregateTransactionBodyDTO'; import { CosignatureDTO } from './cosignatureDTO'; import { EmbeddedTransactionInfoDTO } from './embeddedTransactionInfoDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { TransactionDTO } from './transactionDTO'; /** * Transaction to combine multiple transactions together. */ -export class AggregateBondedTransactionDTO { +export class AggregateTransactionDTO { /** * Entity\'s signature generated by the signer. */ 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -52,6 +54,7 @@ export class AggregateBondedTransactionDTO { * Duration expressed in number of blocks. */ 'deadline': string; + 'transactionsHash': string; /** * Array of transaction cosignatures. */ @@ -79,6 +82,11 @@ export class AggregateBondedTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -94,6 +102,11 @@ export class AggregateBondedTransactionDTO { "baseName": "deadline", "type": "string" }, + { + "name": "transactionsHash", + "baseName": "transactionsHash", + "type": "string" + }, { "name": "cosignatures", "baseName": "cosignatures", @@ -106,7 +119,7 @@ export class AggregateBondedTransactionDTO { } ]; static getAttributeTypeMap() { - return AggregateBondedTransactionDTO.attributeTypeMap; + return AggregateTransactionDTO.attributeTypeMap; } } diff --git a/src/infrastructure/model/aliasActionEnum.ts b/src/infrastructure/model/aliasActionEnum.ts index 647d36ca1c..d90ad550ef 100644 --- a/src/infrastructure/model/aliasActionEnum.ts +++ b/src/infrastructure/model/aliasActionEnum.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/aliasDTO.ts b/src/infrastructure/model/aliasDTO.ts index 90f22f609b..70ded6bdd8 100644 --- a/src/infrastructure/model/aliasDTO.ts +++ b/src/infrastructure/model/aliasDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/aliasTypeEnum.ts b/src/infrastructure/model/aliasTypeEnum.ts index 034e9386ba..173ef1af5f 100644 --- a/src/infrastructure/model/aliasTypeEnum.ts +++ b/src/infrastructure/model/aliasTypeEnum.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/announceTransactionInfoDTO.ts b/src/infrastructure/model/announceTransactionInfoDTO.ts index f1b627b7a0..32b4c7937b 100644 --- a/src/infrastructure/model/announceTransactionInfoDTO.ts +++ b/src/infrastructure/model/announceTransactionInfoDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/balanceChangeReceiptDTO.ts b/src/infrastructure/model/balanceChangeReceiptDTO.ts index 586d91fb47..135b48cea3 100644 --- a/src/infrastructure/model/balanceChangeReceiptDTO.ts +++ b/src/infrastructure/model/balanceChangeReceiptDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -38,7 +38,6 @@ export class BalanceChangeReceiptDTO { */ 'version': number; 'type': ReceiptTypeEnum; - 'targetPublicKey': string; /** * Mosaic identifier. */ @@ -47,6 +46,7 @@ export class BalanceChangeReceiptDTO { * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). */ 'amount': string; + 'targetPublicKey': string; static discriminator: string | undefined = undefined; @@ -61,11 +61,6 @@ export class BalanceChangeReceiptDTO { "baseName": "type", "type": "ReceiptTypeEnum" }, - { - "name": "targetPublicKey", - "baseName": "targetPublicKey", - "type": "string" - }, { "name": "mosaicId", "baseName": "mosaicId", @@ -75,6 +70,11 @@ export class BalanceChangeReceiptDTO { "name": "amount", "baseName": "amount", "type": "string" + }, + { + "name": "targetPublicKey", + "baseName": "targetPublicKey", + "type": "string" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/balanceChangeReceiptDTOAllOf.ts b/src/infrastructure/model/balanceChangeReceiptDTOAllOf.ts index 3fce0cd54a..5b88af9977 100644 --- a/src/infrastructure/model/balanceChangeReceiptDTOAllOf.ts +++ b/src/infrastructure/model/balanceChangeReceiptDTOAllOf.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,6 @@ export class BalanceChangeReceiptDTOAllOf { - 'targetPublicKey': string; /** * Mosaic identifier. */ @@ -36,15 +35,11 @@ export class BalanceChangeReceiptDTOAllOf { * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). */ 'amount': string; + 'targetPublicKey': string; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "targetPublicKey", - "baseName": "targetPublicKey", - "type": "string" - }, { "name": "mosaicId", "baseName": "mosaicId", @@ -54,6 +49,11 @@ export class BalanceChangeReceiptDTOAllOf { "name": "amount", "baseName": "amount", "type": "string" + }, + { + "name": "targetPublicKey", + "baseName": "targetPublicKey", + "type": "string" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/balanceTransferReceiptDTO.ts b/src/infrastructure/model/balanceTransferReceiptDTO.ts index a7de04c5cc..213ba3d7ff 100644 --- a/src/infrastructure/model/balanceTransferReceiptDTO.ts +++ b/src/infrastructure/model/balanceTransferReceiptDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -38,11 +38,6 @@ export class BalanceTransferReceiptDTO { */ 'version': number; 'type': ReceiptTypeEnum; - 'senderPublicKey': string; - /** - * Decoded address. - */ - 'recipientAddress': string; /** * Mosaic identifier. */ @@ -51,6 +46,11 @@ export class BalanceTransferReceiptDTO { * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). */ 'amount': string; + 'senderPublicKey': string; + /** + * Decoded address. + */ + 'recipientAddress': string; static discriminator: string | undefined = undefined; @@ -66,23 +66,23 @@ export class BalanceTransferReceiptDTO { "type": "ReceiptTypeEnum" }, { - "name": "senderPublicKey", - "baseName": "senderPublicKey", + "name": "mosaicId", + "baseName": "mosaicId", "type": "string" }, { - "name": "recipientAddress", - "baseName": "recipientAddress", + "name": "amount", + "baseName": "amount", "type": "string" }, { - "name": "mosaicId", - "baseName": "mosaicId", + "name": "senderPublicKey", + "baseName": "senderPublicKey", "type": "string" }, { - "name": "amount", - "baseName": "amount", + "name": "recipientAddress", + "baseName": "recipientAddress", "type": "string" } ]; diff --git a/src/infrastructure/model/balanceTransferReceiptDTOAllOf.ts b/src/infrastructure/model/balanceTransferReceiptDTOAllOf.ts index 1255d785e8..1678cbd309 100644 --- a/src/infrastructure/model/balanceTransferReceiptDTOAllOf.ts +++ b/src/infrastructure/model/balanceTransferReceiptDTOAllOf.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,11 +27,6 @@ export class BalanceTransferReceiptDTOAllOf { - 'senderPublicKey': string; - /** - * Decoded address. - */ - 'recipientAddress': string; /** * Mosaic identifier. */ @@ -40,28 +35,33 @@ export class BalanceTransferReceiptDTOAllOf { * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). */ 'amount': string; + 'senderPublicKey': string; + /** + * Decoded address. + */ + 'recipientAddress': string; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - "name": "senderPublicKey", - "baseName": "senderPublicKey", + "name": "mosaicId", + "baseName": "mosaicId", "type": "string" }, { - "name": "recipientAddress", - "baseName": "recipientAddress", + "name": "amount", + "baseName": "amount", "type": "string" }, { - "name": "mosaicId", - "baseName": "mosaicId", + "name": "senderPublicKey", + "baseName": "senderPublicKey", "type": "string" }, { - "name": "amount", - "baseName": "amount", + "name": "recipientAddress", + "baseName": "recipientAddress", "type": "string" } ]; diff --git a/src/infrastructure/model/blockDTO.ts b/src/infrastructure/model/blockDTO.ts index 043bbc9923..c115b1f73c 100644 --- a/src/infrastructure/model/blockDTO.ts +++ b/src/infrastructure/model/blockDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,6 +27,7 @@ import { BlockDTOAllOf } from './blockDTOAllOf'; import { EntityDTO } from './entityDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { VerifiableEntityDTO } from './verifiableEntityDTO'; export class BlockDTO { @@ -36,9 +37,10 @@ export class BlockDTO { 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Height of the blockchain. @@ -52,15 +54,15 @@ export class BlockDTO { * Defines how difficult it will be to harvest next the block, based on previous blocks. */ 'difficulty': string; - /** - * Fee multiplier applied to transactions contained in block. - */ - 'feeMultiplier': number; 'previousBlockHash': string; 'transactionsHash': string; 'receiptsHash': string; 'stateHash': string; 'beneficiaryPublicKey': string; + /** + * Fee multiplier applied to transactions contained in block. + */ + 'feeMultiplier': number; static discriminator: string | undefined = undefined; @@ -80,6 +82,11 @@ export class BlockDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -100,11 +107,6 @@ export class BlockDTO { "baseName": "difficulty", "type": "string" }, - { - "name": "feeMultiplier", - "baseName": "feeMultiplier", - "type": "number" - }, { "name": "previousBlockHash", "baseName": "previousBlockHash", @@ -129,6 +131,11 @@ export class BlockDTO { "name": "beneficiaryPublicKey", "baseName": "beneficiaryPublicKey", "type": "string" + }, + { + "name": "feeMultiplier", + "baseName": "feeMultiplier", + "type": "number" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/blockDTOAllOf.ts b/src/infrastructure/model/blockDTOAllOf.ts index 2b1d1003b2..259f240a76 100644 --- a/src/infrastructure/model/blockDTOAllOf.ts +++ b/src/infrastructure/model/blockDTOAllOf.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -39,15 +39,15 @@ export class BlockDTOAllOf { * Defines how difficult it will be to harvest next the block, based on previous blocks. */ 'difficulty': string; - /** - * Fee multiplier applied to transactions contained in block. - */ - 'feeMultiplier': number; 'previousBlockHash': string; 'transactionsHash': string; 'receiptsHash': string; 'stateHash': string; 'beneficiaryPublicKey': string; + /** + * Fee multiplier applied to transactions contained in block. + */ + 'feeMultiplier': number; static discriminator: string | undefined = undefined; @@ -67,11 +67,6 @@ export class BlockDTOAllOf { "baseName": "difficulty", "type": "string" }, - { - "name": "feeMultiplier", - "baseName": "feeMultiplier", - "type": "number" - }, { "name": "previousBlockHash", "baseName": "previousBlockHash", @@ -96,6 +91,11 @@ export class BlockDTOAllOf { "name": "beneficiaryPublicKey", "baseName": "beneficiaryPublicKey", "type": "string" + }, + { + "name": "feeMultiplier", + "baseName": "feeMultiplier", + "type": "number" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/blockInfoDTO.ts b/src/infrastructure/model/blockInfoDTO.ts index 2547bcb2f3..6cf0f67fb6 100644 --- a/src/infrastructure/model/blockInfoDTO.ts +++ b/src/infrastructure/model/blockInfoDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/blockMetaDTO.ts b/src/infrastructure/model/blockMetaDTO.ts index 6cdfdf3e08..43fd5364a5 100644 --- a/src/infrastructure/model/blockMetaDTO.ts +++ b/src/infrastructure/model/blockMetaDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/chainScoreDTO.ts b/src/infrastructure/model/chainScoreDTO.ts index 3e1a8e1a66..6272f5251b 100644 --- a/src/infrastructure/model/chainScoreDTO.ts +++ b/src/infrastructure/model/chainScoreDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/communicationTimestampsDTO.ts b/src/infrastructure/model/communicationTimestampsDTO.ts index c0c6bb5e31..ae0b5302c7 100644 --- a/src/infrastructure/model/communicationTimestampsDTO.ts +++ b/src/infrastructure/model/communicationTimestampsDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/cosignature.ts b/src/infrastructure/model/cosignature.ts index d2e50250d4..2e84137071 100644 --- a/src/infrastructure/model/cosignature.ts +++ b/src/infrastructure/model/cosignature.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/cosignatureDTO.ts b/src/infrastructure/model/cosignatureDTO.ts index fa5764e86f..1c15f6e43f 100644 --- a/src/infrastructure/model/cosignatureDTO.ts +++ b/src/infrastructure/model/cosignatureDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/cosignatureDTOAllOf.ts b/src/infrastructure/model/cosignatureDTOAllOf.ts index bcfd9098de..0333c1144d 100644 --- a/src/infrastructure/model/cosignatureDTOAllOf.ts +++ b/src/infrastructure/model/cosignatureDTOAllOf.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/embeddedAccountAddressRestrictionTransactionDTO.ts b/src/infrastructure/model/embeddedAccountAddressRestrictionTransactionDTO.ts index a5c1cac994..dddd5619e8 100644 --- a/src/infrastructure/model/embeddedAccountAddressRestrictionTransactionDTO.ts +++ b/src/infrastructure/model/embeddedAccountAddressRestrictionTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,17 +25,18 @@ * Do not edit the class manually. */ -import { AccountAddressRestrictionModificationDTO } from './accountAddressRestrictionModificationDTO'; import { AccountAddressRestrictionTransactionBodyDTO } from './accountAddressRestrictionTransactionBodyDTO'; -import { AccountRestrictionTypeEnum } from './accountRestrictionTypeEnum'; +import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; export class EmbeddedAccountAddressRestrictionTransactionDTO { 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -45,8 +46,15 @@ export class EmbeddedAccountAddressRestrictionTransactionDTO { * Duration expressed in number of blocks. */ 'deadline': string; - 'restrictionType': AccountRestrictionTypeEnum; - 'modifications': Array; + 'restrictionFlags': AccountRestrictionFlagsEnum; + /** + * Account restriction additions. + */ + 'restrictionAdditions': Array; + /** + * Account restriction deletions. + */ + 'restrictionDeletions': Array; static discriminator: string | undefined = undefined; @@ -61,6 +69,11 @@ export class EmbeddedAccountAddressRestrictionTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -77,14 +90,19 @@ export class EmbeddedAccountAddressRestrictionTransactionDTO { "type": "string" }, { - "name": "restrictionType", - "baseName": "restrictionType", - "type": "AccountRestrictionTypeEnum" + "name": "restrictionFlags", + "baseName": "restrictionFlags", + "type": "AccountRestrictionFlagsEnum" + }, + { + "name": "restrictionAdditions", + "baseName": "restrictionAdditions", + "type": "Array" }, { - "name": "modifications", - "baseName": "modifications", - "type": "Array" + "name": "restrictionDeletions", + "baseName": "restrictionDeletions", + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/embeddedAccountLinkTransactionDTO.ts b/src/infrastructure/model/embeddedAccountLinkTransactionDTO.ts index 3cdb776883..84afb3916a 100644 --- a/src/infrastructure/model/embeddedAccountLinkTransactionDTO.ts +++ b/src/infrastructure/model/embeddedAccountLinkTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,13 +28,15 @@ import { AccountLinkActionEnum } from './accountLinkActionEnum'; import { AccountLinkTransactionBodyDTO } from './accountLinkTransactionBodyDTO'; import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; export class EmbeddedAccountLinkTransactionDTO { 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -60,6 +62,11 @@ export class EmbeddedAccountLinkTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", diff --git a/src/infrastructure/model/embeddedAccountMetadataTransactionDTO.ts b/src/infrastructure/model/embeddedAccountMetadataTransactionDTO.ts index 1338dfff3a..49c7be06e9 100644 --- a/src/infrastructure/model/embeddedAccountMetadataTransactionDTO.ts +++ b/src/infrastructure/model/embeddedAccountMetadataTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,13 +27,15 @@ import { AccountMetadataTransactionBodyDTO } from './accountMetadataTransactionBodyDTO'; import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; export class EmbeddedAccountMetadataTransactionDTO { 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -74,6 +76,11 @@ export class EmbeddedAccountMetadataTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", diff --git a/src/infrastructure/model/embeddedAccountMetadataTransactionTransactionDTO.ts b/src/infrastructure/model/embeddedAccountMetadataTransactionTransactionDTO.ts deleted file mode 100644 index 012fe24576..0000000000 --- a/src/infrastructure/model/embeddedAccountMetadataTransactionTransactionDTO.ts +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.18 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { AccountMetadataTransactionBodyDTO } from './accountMetadataTransactionBodyDTO'; -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; - -export class EmbeddedAccountMetadataTransactionTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. - */ - 'version': number; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'targetPublicKey': string; - /** - * Metadata key scoped to source, target and type. - */ - 'scopedMetadataKey': string; - /** - * Change in value size in bytes. - */ - 'valueSizeDelta': number; - /** - * Value size in bytes. - */ - 'valueSize': number; - /** - * When there is an existing value, the new value is calculated as xor(previous-value, value). - */ - 'value': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "targetPublicKey", - "baseName": "targetPublicKey", - "type": "string" - }, - { - "name": "scopedMetadataKey", - "baseName": "scopedMetadataKey", - "type": "string" - }, - { - "name": "valueSizeDelta", - "baseName": "valueSizeDelta", - "type": "number" - }, - { - "name": "valueSize", - "baseName": "valueSize", - "type": "number" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return EmbeddedAccountMetadataTransactionTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedAccountMosaicRestrictionTransactionDTO.ts b/src/infrastructure/model/embeddedAccountMosaicRestrictionTransactionDTO.ts index 905d893c81..2d698aa879 100644 --- a/src/infrastructure/model/embeddedAccountMosaicRestrictionTransactionDTO.ts +++ b/src/infrastructure/model/embeddedAccountMosaicRestrictionTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,17 +25,18 @@ * Do not edit the class manually. */ -import { AccountMosaicRestrictionModificationDTO } from './accountMosaicRestrictionModificationDTO'; import { AccountMosaicRestrictionTransactionBodyDTO } from './accountMosaicRestrictionTransactionBodyDTO'; -import { AccountRestrictionTypeEnum } from './accountRestrictionTypeEnum'; +import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; export class EmbeddedAccountMosaicRestrictionTransactionDTO { 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -45,8 +46,15 @@ export class EmbeddedAccountMosaicRestrictionTransactionDTO { * Duration expressed in number of blocks. */ 'deadline': string; - 'restrictionType': AccountRestrictionTypeEnum; - 'modifications': Array; + 'restrictionFlags': AccountRestrictionFlagsEnum; + /** + * Account restriction additions. + */ + 'restrictionAdditions': Array; + /** + * Account restriction deletions. + */ + 'restrictionDeletions': Array; static discriminator: string | undefined = undefined; @@ -61,6 +69,11 @@ export class EmbeddedAccountMosaicRestrictionTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -77,14 +90,19 @@ export class EmbeddedAccountMosaicRestrictionTransactionDTO { "type": "string" }, { - "name": "restrictionType", - "baseName": "restrictionType", - "type": "AccountRestrictionTypeEnum" + "name": "restrictionFlags", + "baseName": "restrictionFlags", + "type": "AccountRestrictionFlagsEnum" + }, + { + "name": "restrictionAdditions", + "baseName": "restrictionAdditions", + "type": "Array" }, { - "name": "modifications", - "baseName": "modifications", - "type": "Array" + "name": "restrictionDeletions", + "baseName": "restrictionDeletions", + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/embeddedAccountOperationRestrictionTransactionDTO.ts b/src/infrastructure/model/embeddedAccountOperationRestrictionTransactionDTO.ts index 82c050453c..f04016f1d9 100644 --- a/src/infrastructure/model/embeddedAccountOperationRestrictionTransactionDTO.ts +++ b/src/infrastructure/model/embeddedAccountOperationRestrictionTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,17 +25,19 @@ * Do not edit the class manually. */ -import { AccountOperationRestrictionModificationDTO } from './accountOperationRestrictionModificationDTO'; import { AccountOperationRestrictionTransactionBodyDTO } from './accountOperationRestrictionTransactionBodyDTO'; -import { AccountRestrictionTypeEnum } from './accountRestrictionTypeEnum'; +import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; +import { TransactionTypeEnum } from './transactionTypeEnum'; export class EmbeddedAccountOperationRestrictionTransactionDTO { 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -45,8 +47,15 @@ export class EmbeddedAccountOperationRestrictionTransactionDTO { * Duration expressed in number of blocks. */ 'deadline': string; - 'restrictionType': AccountRestrictionTypeEnum; - 'modifications': Array; + 'restrictionFlags': AccountRestrictionFlagsEnum; + /** + * Account restriction additions. + */ + 'restrictionAdditions': Array; + /** + * Account restriction deletions. + */ + 'restrictionDeletions': Array; static discriminator: string | undefined = undefined; @@ -61,6 +70,11 @@ export class EmbeddedAccountOperationRestrictionTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -77,14 +91,19 @@ export class EmbeddedAccountOperationRestrictionTransactionDTO { "type": "string" }, { - "name": "restrictionType", - "baseName": "restrictionType", - "type": "AccountRestrictionTypeEnum" + "name": "restrictionFlags", + "baseName": "restrictionFlags", + "type": "AccountRestrictionFlagsEnum" + }, + { + "name": "restrictionAdditions", + "baseName": "restrictionAdditions", + "type": "Array" }, { - "name": "modifications", - "baseName": "modifications", - "type": "Array" + "name": "restrictionDeletions", + "baseName": "restrictionDeletions", + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/embeddedAddressAliasTransactionDTO.ts b/src/infrastructure/model/embeddedAddressAliasTransactionDTO.ts index 3cece291a5..dd6c82be9b 100644 --- a/src/infrastructure/model/embeddedAddressAliasTransactionDTO.ts +++ b/src/infrastructure/model/embeddedAddressAliasTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,13 +28,15 @@ import { AddressAliasTransactionBodyDTO } from './addressAliasTransactionBodyDTO'; import { AliasActionEnum } from './aliasActionEnum'; import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; export class EmbeddedAddressAliasTransactionDTO { 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -44,7 +46,6 @@ export class EmbeddedAddressAliasTransactionDTO { * Duration expressed in number of blocks. */ 'deadline': string; - 'aliasAction': AliasActionEnum; /** * Namespace identifier. */ @@ -53,6 +54,7 @@ export class EmbeddedAddressAliasTransactionDTO { * Decoded address. */ 'address': string; + 'aliasAction': AliasActionEnum; static discriminator: string | undefined = undefined; @@ -67,6 +69,11 @@ export class EmbeddedAddressAliasTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -82,11 +89,6 @@ export class EmbeddedAddressAliasTransactionDTO { "baseName": "deadline", "type": "string" }, - { - "name": "aliasAction", - "baseName": "aliasAction", - "type": "AliasActionEnum" - }, { "name": "namespaceId", "baseName": "namespaceId", @@ -96,6 +98,11 @@ export class EmbeddedAddressAliasTransactionDTO { "name": "address", "baseName": "address", "type": "string" + }, + { + "name": "aliasAction", + "baseName": "aliasAction", + "type": "AliasActionEnum" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/embeddedHashLockTransactionDTO.ts b/src/infrastructure/model/embeddedHashLockTransactionDTO.ts index d88f188873..b3a807632d 100644 --- a/src/infrastructure/model/embeddedHashLockTransactionDTO.ts +++ b/src/infrastructure/model/embeddedHashLockTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -26,15 +26,16 @@ */ import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { HashLockTransactionDTO } from './hashLockTransactionDTO'; -import { Mosaic } from './mosaic'; +import { HashLockTransactionBodyDTO } from './hashLockTransactionBodyDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; export class EmbeddedHashLockTransactionDTO { 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -45,10 +46,13 @@ export class EmbeddedHashLockTransactionDTO { */ 'deadline': string; /** - * Entity\'s signature generated by the signer. + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. */ - 'signature': string; - 'mosaic': Mosaic; + 'mosaicId': string; + /** + * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). + */ + 'amount': string; /** * Duration expressed in number of blocks. */ @@ -68,6 +72,11 @@ export class EmbeddedHashLockTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -84,14 +93,14 @@ export class EmbeddedHashLockTransactionDTO { "type": "string" }, { - "name": "signature", - "baseName": "signature", + "name": "mosaicId", + "baseName": "mosaicId", "type": "string" }, { - "name": "mosaic", - "baseName": "mosaic", - "type": "Mosaic" + "name": "amount", + "baseName": "amount", + "type": "string" }, { "name": "duration", diff --git a/src/infrastructure/model/embeddedMosaicAddressRestrictionTransactionDTO.ts b/src/infrastructure/model/embeddedMosaicAddressRestrictionTransactionDTO.ts index 620dcf3528..515a9f2f74 100644 --- a/src/infrastructure/model/embeddedMosaicAddressRestrictionTransactionDTO.ts +++ b/src/infrastructure/model/embeddedMosaicAddressRestrictionTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,13 +27,15 @@ import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; import { MosaicAddressRestrictionTransactionBodyDTO } from './mosaicAddressRestrictionTransactionBodyDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; export class EmbeddedMosaicAddressRestrictionTransactionDTO { 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -44,7 +46,7 @@ export class EmbeddedMosaicAddressRestrictionTransactionDTO { */ 'deadline': string; /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. */ 'mosaicId': string; /** @@ -52,17 +54,17 @@ export class EmbeddedMosaicAddressRestrictionTransactionDTO { */ 'restrictionKey': string; /** - * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. - */ - 'targetAddress': string; - /** - * Previous restriction value. + * A value in a restriction transaction. */ 'previousRestrictionValue': string; /** - * New restriction value. + * A value in a restriction transaction. */ 'newRestrictionValue': string; + /** + * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. + */ + 'targetAddress': string; static discriminator: string | undefined = undefined; @@ -77,6 +79,11 @@ export class EmbeddedMosaicAddressRestrictionTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -102,11 +109,6 @@ export class EmbeddedMosaicAddressRestrictionTransactionDTO { "baseName": "restrictionKey", "type": "string" }, - { - "name": "targetAddress", - "baseName": "targetAddress", - "type": "string" - }, { "name": "previousRestrictionValue", "baseName": "previousRestrictionValue", @@ -116,6 +118,11 @@ export class EmbeddedMosaicAddressRestrictionTransactionDTO { "name": "newRestrictionValue", "baseName": "newRestrictionValue", "type": "string" + }, + { + "name": "targetAddress", + "baseName": "targetAddress", + "type": "string" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/embeddedMosaicAliasTransactionDTO.ts b/src/infrastructure/model/embeddedMosaicAliasTransactionDTO.ts index 345cfd9dad..387ad18e77 100644 --- a/src/infrastructure/model/embeddedMosaicAliasTransactionDTO.ts +++ b/src/infrastructure/model/embeddedMosaicAliasTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,13 +28,15 @@ import { AliasActionEnum } from './aliasActionEnum'; import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; import { MosaicAliasTransactionBodyDTO } from './mosaicAliasTransactionBodyDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; export class EmbeddedMosaicAliasTransactionDTO { 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -44,7 +46,6 @@ export class EmbeddedMosaicAliasTransactionDTO { * Duration expressed in number of blocks. */ 'deadline': string; - 'aliasAction': AliasActionEnum; /** * Namespace identifier. */ @@ -53,6 +54,7 @@ export class EmbeddedMosaicAliasTransactionDTO { * Mosaic identifier. */ 'mosaicId': string; + 'aliasAction': AliasActionEnum; static discriminator: string | undefined = undefined; @@ -67,6 +69,11 @@ export class EmbeddedMosaicAliasTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -82,11 +89,6 @@ export class EmbeddedMosaicAliasTransactionDTO { "baseName": "deadline", "type": "string" }, - { - "name": "aliasAction", - "baseName": "aliasAction", - "type": "AliasActionEnum" - }, { "name": "namespaceId", "baseName": "namespaceId", @@ -96,6 +98,11 @@ export class EmbeddedMosaicAliasTransactionDTO { "name": "mosaicId", "baseName": "mosaicId", "type": "string" + }, + { + "name": "aliasAction", + "baseName": "aliasAction", + "type": "AliasActionEnum" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/embeddedMosaicDefinitionTransactionDTO.ts b/src/infrastructure/model/embeddedMosaicDefinitionTransactionDTO.ts index fb2cd0ae3b..81a024e269 100644 --- a/src/infrastructure/model/embeddedMosaicDefinitionTransactionDTO.ts +++ b/src/infrastructure/model/embeddedMosaicDefinitionTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,13 +27,15 @@ import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; import { MosaicDefinitionTransactionBodyDTO } from './mosaicDefinitionTransactionBodyDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; export class EmbeddedMosaicDefinitionTransactionDTO { 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -44,14 +46,18 @@ export class EmbeddedMosaicDefinitionTransactionDTO { */ 'deadline': string; /** - * Random nonce used to generate the mosaic id. - */ - 'nonce': number; - /** * Mosaic identifier. */ 'id': string; /** + * Duration expressed in number of blocks. + */ + 'duration': string; + /** + * Random nonce used to generate the mosaic id. + */ + 'nonce': number; + /** * - 0x00 (none) - No flags present. - 0x01 (supplyMutable) - Mosaic supports supply changes even when mosaic owner owns partial supply. - 0x02 (transferable) - Mosaic supports transfers between arbitrary accounts. When not set, mosaic can only be transferred to and from mosaic owner. - 0x04 (restrictable) - Mosaic supports custom restrictions configured by mosaic owner. */ 'flags': number; @@ -59,10 +65,6 @@ export class EmbeddedMosaicDefinitionTransactionDTO { * Determines up to what decimal place the mosaic can be divided. Divisibility of 3 means that a mosaic can be divided into smallest parts of 0.001 mosaics. The divisibility must be in the range of 0 and 6. */ 'divisibility': number; - /** - * Duration expressed in number of blocks. - */ - 'duration': string; static discriminator: string | undefined = undefined; @@ -77,6 +79,11 @@ export class EmbeddedMosaicDefinitionTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -92,16 +99,21 @@ export class EmbeddedMosaicDefinitionTransactionDTO { "baseName": "deadline", "type": "string" }, - { - "name": "nonce", - "baseName": "nonce", - "type": "number" - }, { "name": "id", "baseName": "id", "type": "string" }, + { + "name": "duration", + "baseName": "duration", + "type": "string" + }, + { + "name": "nonce", + "baseName": "nonce", + "type": "number" + }, { "name": "flags", "baseName": "flags", @@ -111,11 +123,6 @@ export class EmbeddedMosaicDefinitionTransactionDTO { "name": "divisibility", "baseName": "divisibility", "type": "number" - }, - { - "name": "duration", - "baseName": "duration", - "type": "string" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/embeddedMosaicGlobalRestrictionTransactionDTO.ts b/src/infrastructure/model/embeddedMosaicGlobalRestrictionTransactionDTO.ts index eee08a8ab9..2f5168ba85 100644 --- a/src/infrastructure/model/embeddedMosaicGlobalRestrictionTransactionDTO.ts +++ b/src/infrastructure/model/embeddedMosaicGlobalRestrictionTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,13 +28,15 @@ import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; import { MosaicGlobalRestrictionTransactionBodyDTO } from './mosaicGlobalRestrictionTransactionBodyDTO'; import { MosaicRestrictionTypeEnum } from './mosaicRestrictionTypeEnum'; +import { NetworkTypeEnum } from './networkTypeEnum'; export class EmbeddedMosaicGlobalRestrictionTransactionDTO { 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -45,11 +47,11 @@ export class EmbeddedMosaicGlobalRestrictionTransactionDTO { */ 'deadline': string; /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. */ 'mosaicId': string; /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. */ 'referenceMosaicId': string; /** @@ -57,14 +59,14 @@ export class EmbeddedMosaicGlobalRestrictionTransactionDTO { */ 'restrictionKey': string; /** - * Previous restriction value. + * A value in a restriction transaction. */ 'previousRestrictionValue': string; - 'previousRestrictionType': MosaicRestrictionTypeEnum; /** - * New restriction value. + * A value in a restriction transaction. */ 'newRestrictionValue': string; + 'previousRestrictionType': MosaicRestrictionTypeEnum; 'newRestrictionType': MosaicRestrictionTypeEnum; static discriminator: string | undefined = undefined; @@ -80,6 +82,11 @@ export class EmbeddedMosaicGlobalRestrictionTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -115,16 +122,16 @@ export class EmbeddedMosaicGlobalRestrictionTransactionDTO { "baseName": "previousRestrictionValue", "type": "string" }, - { - "name": "previousRestrictionType", - "baseName": "previousRestrictionType", - "type": "MosaicRestrictionTypeEnum" - }, { "name": "newRestrictionValue", "baseName": "newRestrictionValue", "type": "string" }, + { + "name": "previousRestrictionType", + "baseName": "previousRestrictionType", + "type": "MosaicRestrictionTypeEnum" + }, { "name": "newRestrictionType", "baseName": "newRestrictionType", diff --git a/src/infrastructure/model/embeddedMosaicMetadataTransactionDTO.ts b/src/infrastructure/model/embeddedMosaicMetadataTransactionDTO.ts index 55022e4f7e..995bb04bb5 100644 --- a/src/infrastructure/model/embeddedMosaicMetadataTransactionDTO.ts +++ b/src/infrastructure/model/embeddedMosaicMetadataTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,13 +27,15 @@ import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; import { MosaicMetadataTransactionBodyDTO } from './mosaicMetadataTransactionBodyDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; export class EmbeddedMosaicMetadataTransactionDTO { 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -49,7 +51,7 @@ export class EmbeddedMosaicMetadataTransactionDTO { */ 'scopedMetadataKey': string; /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. */ 'targetMosaicId': string; /** @@ -78,6 +80,11 @@ export class EmbeddedMosaicMetadataTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", diff --git a/src/infrastructure/model/embeddedMosaicMetadataTransactionTransactionDTO.ts b/src/infrastructure/model/embeddedMosaicMetadataTransactionTransactionDTO.ts deleted file mode 100644 index b91fe0efbf..0000000000 --- a/src/infrastructure/model/embeddedMosaicMetadataTransactionTransactionDTO.ts +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.18 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { MosaicMetadataTransactionBodyDTO } from './mosaicMetadataTransactionBodyDTO'; - -export class EmbeddedMosaicMetadataTransactionTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. - */ - 'version': number; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'targetPublicKey': string; - /** - * Metadata key scoped to source, target and type. - */ - 'scopedMetadataKey': string; - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. - */ - 'targetMosaicId': string; - /** - * Change in value size in bytes. - */ - 'valueSizeDelta': number; - /** - * Value size in bytes. - */ - 'valueSize': number; - /** - * When there is an existing value, the new value is calculated as xor(previous-value, value). - */ - 'value': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "targetPublicKey", - "baseName": "targetPublicKey", - "type": "string" - }, - { - "name": "scopedMetadataKey", - "baseName": "scopedMetadataKey", - "type": "string" - }, - { - "name": "targetMosaicId", - "baseName": "targetMosaicId", - "type": "string" - }, - { - "name": "valueSizeDelta", - "baseName": "valueSizeDelta", - "type": "number" - }, - { - "name": "valueSize", - "baseName": "valueSize", - "type": "number" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return EmbeddedMosaicMetadataTransactionTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedMosaicSupplyChangeTransactionDTO.ts b/src/infrastructure/model/embeddedMosaicSupplyChangeTransactionDTO.ts index bb37ee2e99..7dbe3aec59 100644 --- a/src/infrastructure/model/embeddedMosaicSupplyChangeTransactionDTO.ts +++ b/src/infrastructure/model/embeddedMosaicSupplyChangeTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,13 +28,15 @@ import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; import { MosaicSupplyChangeActionEnum } from './mosaicSupplyChangeActionEnum'; import { MosaicSupplyChangeTransactionBodyDTO } from './mosaicSupplyChangeTransactionBodyDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; export class EmbeddedMosaicSupplyChangeTransactionDTO { 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -45,14 +47,14 @@ export class EmbeddedMosaicSupplyChangeTransactionDTO { */ 'deadline': string; /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. */ 'mosaicId': string; - 'action': MosaicSupplyChangeActionEnum; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). */ 'delta': string; + 'action': MosaicSupplyChangeActionEnum; static discriminator: string | undefined = undefined; @@ -67,6 +69,11 @@ export class EmbeddedMosaicSupplyChangeTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -87,15 +94,15 @@ export class EmbeddedMosaicSupplyChangeTransactionDTO { "baseName": "mosaicId", "type": "string" }, - { - "name": "action", - "baseName": "action", - "type": "MosaicSupplyChangeActionEnum" - }, { "name": "delta", "baseName": "delta", "type": "string" + }, + { + "name": "action", + "baseName": "action", + "type": "MosaicSupplyChangeActionEnum" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/embeddedMultisigAccountModificationTransactionDTO.ts b/src/infrastructure/model/embeddedMultisigAccountModificationTransactionDTO.ts index 75c6ee7be5..d6684d7c0e 100644 --- a/src/infrastructure/model/embeddedMultisigAccountModificationTransactionDTO.ts +++ b/src/infrastructure/model/embeddedMultisigAccountModificationTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,16 +25,17 @@ * Do not edit the class manually. */ -import { CosignatoryModificationDTO } from './cosignatoryModificationDTO'; import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; import { MultisigAccountModificationTransactionBodyDTO } from './multisigAccountModificationTransactionBodyDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; export class EmbeddedMultisigAccountModificationTransactionDTO { 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -53,9 +54,13 @@ export class EmbeddedMultisigAccountModificationTransactionDTO { */ 'minApprovalDelta': number; /** - * Array of cosignatory accounts to add or delete. + * Array of cosignatory accounts to add. */ - 'modifications': Array; + 'publicKeyAdditions': Array; + /** + * Array of cosignatory accounts to delete. + */ + 'publicKeyDeletions': Array; static discriminator: string | undefined = undefined; @@ -70,6 +75,11 @@ export class EmbeddedMultisigAccountModificationTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -96,9 +106,14 @@ export class EmbeddedMultisigAccountModificationTransactionDTO { "type": "number" }, { - "name": "modifications", - "baseName": "modifications", - "type": "Array" + "name": "publicKeyAdditions", + "baseName": "publicKeyAdditions", + "type": "Array" + }, + { + "name": "publicKeyDeletions", + "baseName": "publicKeyDeletions", + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/embeddedNamespaceMetadataTransactionDTO.ts b/src/infrastructure/model/embeddedNamespaceMetadataTransactionDTO.ts index 5ab75e3eb1..a23ff2a12b 100644 --- a/src/infrastructure/model/embeddedNamespaceMetadataTransactionDTO.ts +++ b/src/infrastructure/model/embeddedNamespaceMetadataTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,13 +27,15 @@ import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; import { NamespaceMetadataTransactionBodyDTO } from './namespaceMetadataTransactionBodyDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; export class EmbeddedNamespaceMetadataTransactionDTO { 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -78,6 +80,11 @@ export class EmbeddedNamespaceMetadataTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", diff --git a/src/infrastructure/model/embeddedNamespaceMetadataTransactionTransactionDTO.ts b/src/infrastructure/model/embeddedNamespaceMetadataTransactionTransactionDTO.ts deleted file mode 100644 index 3880d2ac71..0000000000 --- a/src/infrastructure/model/embeddedNamespaceMetadataTransactionTransactionDTO.ts +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright 2019 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Catapult REST Endpoints - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.7.18 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; -import { NamespaceMetadataTransactionBodyDTO } from './namespaceMetadataTransactionBodyDTO'; - -export class EmbeddedNamespaceMetadataTransactionTransactionDTO { - 'signerPublicKey': string; - /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. - */ - 'version': number; - 'type': number; - /** - * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). - */ - 'maxFee': string; - /** - * Duration expressed in number of blocks. - */ - 'deadline': string; - 'targetPublicKey': string; - /** - * Metadata key scoped to source, target and type. - */ - 'scopedMetadataKey': string; - /** - * Namespace identifier. - */ - 'targetNamespaceId'?: string; - /** - * Change in value size in bytes. - */ - 'valueSizeDelta': number; - /** - * Value size in bytes. - */ - 'valueSize': number; - /** - * When there is an existing value, the new value is calculated as xor(previous-value, value). - */ - 'value': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "signerPublicKey", - "baseName": "signerPublicKey", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "type", - "baseName": "type", - "type": "number" - }, - { - "name": "maxFee", - "baseName": "maxFee", - "type": "string" - }, - { - "name": "deadline", - "baseName": "deadline", - "type": "string" - }, - { - "name": "targetPublicKey", - "baseName": "targetPublicKey", - "type": "string" - }, - { - "name": "scopedMetadataKey", - "baseName": "scopedMetadataKey", - "type": "string" - }, - { - "name": "targetNamespaceId", - "baseName": "targetNamespaceId", - "type": "string" - }, - { - "name": "valueSizeDelta", - "baseName": "valueSizeDelta", - "type": "number" - }, - { - "name": "valueSize", - "baseName": "valueSize", - "type": "number" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return EmbeddedNamespaceMetadataTransactionTransactionDTO.attributeTypeMap; - } -} - diff --git a/src/infrastructure/model/embeddedNamespaceRegistrationTransactionDTO.ts b/src/infrastructure/model/embeddedNamespaceRegistrationTransactionDTO.ts index bd57eca813..54dc9f2e58 100644 --- a/src/infrastructure/model/embeddedNamespaceRegistrationTransactionDTO.ts +++ b/src/infrastructure/model/embeddedNamespaceRegistrationTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,13 +28,15 @@ import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; import { NamespaceRegistrationTransactionBodyDTO } from './namespaceRegistrationTransactionBodyDTO'; import { NamespaceRegistrationTypeEnum } from './namespaceRegistrationTypeEnum'; +import { NetworkTypeEnum } from './networkTypeEnum'; export class EmbeddedNamespaceRegistrationTransactionDTO { 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -44,7 +46,6 @@ export class EmbeddedNamespaceRegistrationTransactionDTO { * Duration expressed in number of blocks. */ 'deadline': string; - 'registrationType': NamespaceRegistrationTypeEnum; /** * Duration expressed in number of blocks. */ @@ -57,6 +58,7 @@ export class EmbeddedNamespaceRegistrationTransactionDTO { * Namespace identifier. */ 'id': string; + 'registrationType': NamespaceRegistrationTypeEnum; /** * Namespace name. */ @@ -75,6 +77,11 @@ export class EmbeddedNamespaceRegistrationTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -90,11 +97,6 @@ export class EmbeddedNamespaceRegistrationTransactionDTO { "baseName": "deadline", "type": "string" }, - { - "name": "registrationType", - "baseName": "registrationType", - "type": "NamespaceRegistrationTypeEnum" - }, { "name": "duration", "baseName": "duration", @@ -110,6 +112,11 @@ export class EmbeddedNamespaceRegistrationTransactionDTO { "baseName": "id", "type": "string" }, + { + "name": "registrationType", + "baseName": "registrationType", + "type": "NamespaceRegistrationTypeEnum" + }, { "name": "name", "baseName": "name", diff --git a/src/infrastructure/model/embeddedSecretLockTransactionDTO.ts b/src/infrastructure/model/embeddedSecretLockTransactionDTO.ts index 55bc374e5d..a3a77113e3 100644 --- a/src/infrastructure/model/embeddedSecretLockTransactionDTO.ts +++ b/src/infrastructure/model/embeddedSecretLockTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,14 +27,16 @@ import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; import { LockHashAlgorithmEnum } from './lockHashAlgorithmEnum'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { SecretLockTransactionBodyDTO } from './secretLockTransactionBodyDTO'; export class EmbeddedSecretLockTransactionDTO { 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -44,20 +46,20 @@ export class EmbeddedSecretLockTransactionDTO { * Duration expressed in number of blocks. */ 'deadline': string; + 'secret': string; /** - * Duration expressed in number of blocks. - */ - 'duration': string; - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. */ 'mosaicId': string; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). */ 'amount': string; + /** + * Duration expressed in number of blocks. + */ + 'duration': string; 'hashAlgorithm': LockHashAlgorithmEnum; - 'secret': string; /** * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. */ @@ -76,6 +78,11 @@ export class EmbeddedSecretLockTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -92,8 +99,8 @@ export class EmbeddedSecretLockTransactionDTO { "type": "string" }, { - "name": "duration", - "baseName": "duration", + "name": "secret", + "baseName": "secret", "type": "string" }, { @@ -106,16 +113,16 @@ export class EmbeddedSecretLockTransactionDTO { "baseName": "amount", "type": "string" }, + { + "name": "duration", + "baseName": "duration", + "type": "string" + }, { "name": "hashAlgorithm", "baseName": "hashAlgorithm", "type": "LockHashAlgorithmEnum" }, - { - "name": "secret", - "baseName": "secret", - "type": "string" - }, { "name": "recipientAddress", "baseName": "recipientAddress", diff --git a/src/infrastructure/model/embeddedSecretProofTransactionDTO.ts b/src/infrastructure/model/embeddedSecretProofTransactionDTO.ts index 50602cfd49..7038ffeb1e 100644 --- a/src/infrastructure/model/embeddedSecretProofTransactionDTO.ts +++ b/src/infrastructure/model/embeddedSecretProofTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,14 +27,16 @@ import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; import { LockHashAlgorithmEnum } from './lockHashAlgorithmEnum'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { SecretProofTransactionBodyDTO } from './secretProofTransactionBodyDTO'; export class EmbeddedSecretProofTransactionDTO { 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -44,8 +46,8 @@ export class EmbeddedSecretProofTransactionDTO { * Duration expressed in number of blocks. */ 'deadline': string; - 'hashAlgorithm': LockHashAlgorithmEnum; 'secret': string; + 'hashAlgorithm': LockHashAlgorithmEnum; /** * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. */ @@ -68,6 +70,11 @@ export class EmbeddedSecretProofTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -83,16 +90,16 @@ export class EmbeddedSecretProofTransactionDTO { "baseName": "deadline", "type": "string" }, - { - "name": "hashAlgorithm", - "baseName": "hashAlgorithm", - "type": "LockHashAlgorithmEnum" - }, { "name": "secret", "baseName": "secret", "type": "string" }, + { + "name": "hashAlgorithm", + "baseName": "hashAlgorithm", + "type": "LockHashAlgorithmEnum" + }, { "name": "recipientAddress", "baseName": "recipientAddress", diff --git a/src/infrastructure/model/embeddedTransactionDTO.ts b/src/infrastructure/model/embeddedTransactionDTO.ts index 1234f16938..26ece2f6bb 100644 --- a/src/infrastructure/model/embeddedTransactionDTO.ts +++ b/src/infrastructure/model/embeddedTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -26,14 +26,16 @@ */ import { EntityDTO } from './entityDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { TransactionBodyDTO } from './transactionBodyDTO'; export class EmbeddedTransactionDTO { 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -57,6 +59,11 @@ export class EmbeddedTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", diff --git a/src/infrastructure/model/embeddedTransactionInfoDTO.ts b/src/infrastructure/model/embeddedTransactionInfoDTO.ts index b9af262936..6c6a0206ce 100644 --- a/src/infrastructure/model/embeddedTransactionInfoDTO.ts +++ b/src/infrastructure/model/embeddedTransactionInfoDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/embeddedTransactionMetaDTO.ts b/src/infrastructure/model/embeddedTransactionMetaDTO.ts index 349d658ced..9f672ba5ae 100644 --- a/src/infrastructure/model/embeddedTransactionMetaDTO.ts +++ b/src/infrastructure/model/embeddedTransactionMetaDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/embeddedTransferTransactionDTO.ts b/src/infrastructure/model/embeddedTransferTransactionDTO.ts index a549a52cbe..d9b649facd 100644 --- a/src/infrastructure/model/embeddedTransferTransactionDTO.ts +++ b/src/infrastructure/model/embeddedTransferTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,15 +27,17 @@ import { EmbeddedTransactionDTO } from './embeddedTransactionDTO'; import { MessageDTO } from './messageDTO'; -import { Mosaic } from './mosaic'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { TransferTransactionBodyDTO } from './transferTransactionBodyDTO'; +import { UnresolvedMosaic } from './unresolvedMosaic'; export class EmbeddedTransferTransactionDTO { 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -50,9 +52,9 @@ export class EmbeddedTransferTransactionDTO { */ 'recipientAddress': string; /** - * Array of mosaics sent to the recipient. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of a instead of a mosaicId corresponds to a mosaicId. + * Array of mosaics sent to the recipient. */ - 'mosaics': Array; + 'mosaics': Array; 'message': MessageDTO; static discriminator: string | undefined = undefined; @@ -68,6 +70,11 @@ export class EmbeddedTransferTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -91,7 +98,7 @@ export class EmbeddedTransferTransactionDTO { { "name": "mosaics", "baseName": "mosaics", - "type": "Array" + "type": "Array" }, { "name": "message", diff --git a/src/infrastructure/model/entityDTO.ts b/src/infrastructure/model/entityDTO.ts index d5828e6b5a..8cefca1574 100644 --- a/src/infrastructure/model/entityDTO.ts +++ b/src/infrastructure/model/entityDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,13 +25,15 @@ * Do not edit the class manually. */ +import { NetworkTypeEnum } from './networkTypeEnum'; export class EntityDTO { 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; static discriminator: string | undefined = undefined; @@ -47,6 +49,11 @@ export class EntityDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", diff --git a/src/infrastructure/model/hashLockTransactionBodyDTO.ts b/src/infrastructure/model/hashLockTransactionBodyDTO.ts index c9fa7e07b0..126231f5bb 100644 --- a/src/infrastructure/model/hashLockTransactionBodyDTO.ts +++ b/src/infrastructure/model/hashLockTransactionBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,10 +25,16 @@ * Do not edit the class manually. */ -import { Mosaic } from './mosaic'; export class HashLockTransactionBodyDTO { - 'mosaic': Mosaic; + /** + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + */ + 'mosaicId': string; + /** + * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). + */ + 'amount': string; /** * Duration expressed in number of blocks. */ @@ -39,9 +45,14 @@ export class HashLockTransactionBodyDTO { static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - "name": "mosaic", - "baseName": "mosaic", - "type": "Mosaic" + "name": "mosaicId", + "baseName": "mosaicId", + "type": "string" + }, + { + "name": "amount", + "baseName": "amount", + "type": "string" }, { "name": "duration", diff --git a/src/infrastructure/model/hashLockTransactionDTO.ts b/src/infrastructure/model/hashLockTransactionDTO.ts index a9525905e3..00ddb00a54 100644 --- a/src/infrastructure/model/hashLockTransactionDTO.ts +++ b/src/infrastructure/model/hashLockTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -26,7 +26,7 @@ */ import { HashLockTransactionBodyDTO } from './hashLockTransactionBodyDTO'; -import { Mosaic } from './mosaic'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { TransactionDTO } from './transactionDTO'; /** @@ -39,9 +39,10 @@ export class HashLockTransactionDTO { 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -51,7 +52,14 @@ export class HashLockTransactionDTO { * Duration expressed in number of blocks. */ 'deadline': string; - 'mosaic': Mosaic; + /** + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + */ + 'mosaicId': string; + /** + * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). + */ + 'amount': string; /** * Duration expressed in number of blocks. */ @@ -76,6 +84,11 @@ export class HashLockTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -92,9 +105,14 @@ export class HashLockTransactionDTO { "type": "string" }, { - "name": "mosaic", - "baseName": "mosaic", - "type": "Mosaic" + "name": "mosaicId", + "baseName": "mosaicId", + "type": "string" + }, + { + "name": "amount", + "baseName": "amount", + "type": "string" }, { "name": "duration", diff --git a/src/infrastructure/model/heightInfoDTO.ts b/src/infrastructure/model/heightInfoDTO.ts index dbdb94640a..ebe421025c 100644 --- a/src/infrastructure/model/heightInfoDTO.ts +++ b/src/infrastructure/model/heightInfoDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/inflationReceiptDTO.ts b/src/infrastructure/model/inflationReceiptDTO.ts index fdf25ac186..d5501e5018 100644 --- a/src/infrastructure/model/inflationReceiptDTO.ts +++ b/src/infrastructure/model/inflationReceiptDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/inflationReceiptDTOAllOf.ts b/src/infrastructure/model/inflationReceiptDTOAllOf.ts index e5e304c036..264071b89f 100644 --- a/src/infrastructure/model/inflationReceiptDTOAllOf.ts +++ b/src/infrastructure/model/inflationReceiptDTOAllOf.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/lockHashAlgorithmEnum.ts b/src/infrastructure/model/lockHashAlgorithmEnum.ts index aa72c063e1..799a937d0f 100644 --- a/src/infrastructure/model/lockHashAlgorithmEnum.ts +++ b/src/infrastructure/model/lockHashAlgorithmEnum.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/merklePathItem.ts b/src/infrastructure/model/merklePathItemDTO.ts similarity index 91% rename from src/infrastructure/model/merklePathItem.ts rename to src/infrastructure/model/merklePathItemDTO.ts index 767954fd34..0a4613da50 100644 --- a/src/infrastructure/model/merklePathItem.ts +++ b/src/infrastructure/model/merklePathItemDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -26,7 +26,7 @@ */ -export class MerklePathItem { +export class MerklePathItemDTO { 'position'?: number; 'hash'?: string; @@ -45,7 +45,7 @@ export class MerklePathItem { } ]; static getAttributeTypeMap() { - return MerklePathItem.attributeTypeMap; + return MerklePathItemDTO.attributeTypeMap; } } diff --git a/src/infrastructure/model/merkleProofInfoDTO.ts b/src/infrastructure/model/merkleProofInfoDTO.ts index af69e13183..c3b92fd0ac 100644 --- a/src/infrastructure/model/merkleProofInfoDTO.ts +++ b/src/infrastructure/model/merkleProofInfoDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,13 +25,13 @@ * Do not edit the class manually. */ -import { MerklePathItem } from './merklePathItem'; +import { MerklePathItemDTO } from './merklePathItemDTO'; export class MerkleProofInfoDTO { /** * Complementary data needed to calculate the merkle root. */ - 'merklePath'?: Array; + 'merklePath'?: Array; static discriminator: string | undefined = undefined; @@ -39,7 +39,7 @@ export class MerkleProofInfoDTO { { "name": "merklePath", "baseName": "merklePath", - "type": "Array" + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/messageDTO.ts b/src/infrastructure/model/messageDTO.ts index 46b381c4ee..8106729475 100644 --- a/src/infrastructure/model/messageDTO.ts +++ b/src/infrastructure/model/messageDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/messageTypeEnum.ts b/src/infrastructure/model/messageTypeEnum.ts index 6711f45f54..ec36e86e14 100644 --- a/src/infrastructure/model/messageTypeEnum.ts +++ b/src/infrastructure/model/messageTypeEnum.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,8 +27,10 @@ /** -* Type of message: * 0 - Regular message. * 1 - Encrypted message. +* Type of message: * 0 - Regular message. * 1 - Encrypted message. * 254 - Persistent harvesting delegation. */ export enum MessageTypeEnum { - NUMBER_0 = 0 + NUMBER_0 = 0, + NUMBER_1 = 1, + NUMBER_254 = 254 } diff --git a/src/infrastructure/model/metadataDTO.ts b/src/infrastructure/model/metadataDTO.ts index cd8d5a07a6..c52043c3ec 100644 --- a/src/infrastructure/model/metadataDTO.ts +++ b/src/infrastructure/model/metadataDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/metadataEntriesDTO.ts b/src/infrastructure/model/metadataEntriesDTO.ts index 8d2eb3cb46..36c5e53d1e 100644 --- a/src/infrastructure/model/metadataEntriesDTO.ts +++ b/src/infrastructure/model/metadataEntriesDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/metadataEntryDTO.ts b/src/infrastructure/model/metadataEntryDTO.ts index e36b3cf7b3..df5c97f324 100644 --- a/src/infrastructure/model/metadataEntryDTO.ts +++ b/src/infrastructure/model/metadataEntryDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -38,10 +38,6 @@ export class MetadataEntryDTO { 'targetId'?: any; 'metadataType': MetadataTypeEnum; /** - * Size of value property. - */ - 'valueSize': number; - /** * Metadata value. */ 'value': string; @@ -79,11 +75,6 @@ export class MetadataEntryDTO { "baseName": "metadataType", "type": "MetadataTypeEnum" }, - { - "name": "valueSize", - "baseName": "valueSize", - "type": "number" - }, { "name": "value", "baseName": "value", diff --git a/src/infrastructure/model/metadataTypeEnum.ts b/src/infrastructure/model/metadataTypeEnum.ts index 86298fce2d..7657910dba 100644 --- a/src/infrastructure/model/metadataTypeEnum.ts +++ b/src/infrastructure/model/metadataTypeEnum.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/modelError.ts b/src/infrastructure/model/modelError.ts index 265779812f..5a11639063 100644 --- a/src/infrastructure/model/modelError.ts +++ b/src/infrastructure/model/modelError.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/models.ts b/src/infrastructure/model/models.ts index 6d32cafdad..4a9f3a4bc2 100644 --- a/src/infrastructure/model/models.ts +++ b/src/infrastructure/model/models.ts @@ -1,4 +1,3 @@ -export * from './accountAddressRestrictionModificationDTO'; export * from './accountAddressRestrictionTransactionBodyDTO'; export * from './accountAddressRestrictionTransactionDTO'; export * from './accountDTO'; @@ -9,16 +8,13 @@ export * from './accountLinkTransactionBodyDTO'; export * from './accountLinkTransactionDTO'; export * from './accountMetadataTransactionBodyDTO'; export * from './accountMetadataTransactionDTO'; -export * from './accountMosaicRestrictionModificationDTO'; export * from './accountMosaicRestrictionTransactionBodyDTO'; export * from './accountMosaicRestrictionTransactionDTO'; export * from './accountNamesDTO'; -export * from './accountOperationRestrictionModificationDTO'; export * from './accountOperationRestrictionTransactionBodyDTO'; export * from './accountOperationRestrictionTransactionDTO'; export * from './accountRestrictionDTO'; -export * from './accountRestrictionModificationActionEnum'; -export * from './accountRestrictionTypeEnum'; +export * from './accountRestrictionFlagsEnum'; export * from './accountRestrictionsDTO'; export * from './accountRestrictionsInfoDTO'; export * from './accountTypeEnum'; @@ -26,15 +22,12 @@ export * from './accountsNamesDTO'; export * from './activityBucketDTO'; export * from './addressAliasTransactionBodyDTO'; export * from './addressAliasTransactionDTO'; -export * from './aggregateBondedTransactionDTO'; -export * from './aggregateCompleteTransactionDTO'; export * from './aggregateTransactionBodyDTO'; +export * from './aggregateTransactionDTO'; export * from './aliasActionEnum'; export * from './aliasDTO'; export * from './aliasTypeEnum'; export * from './announceTransactionInfoDTO'; -export * from './artifactExpiryReceiptDTO'; -export * from './artifactExpiryReceiptDTOAllOf'; export * from './balanceChangeReceiptDTO'; export * from './balanceChangeReceiptDTOAllOf'; export * from './balanceTransferReceiptDTO'; @@ -45,8 +38,6 @@ export * from './blockInfoDTO'; export * from './blockMetaDTO'; export * from './chainScoreDTO'; export * from './communicationTimestampsDTO'; -export * from './cosignatoryModificationActionEnum'; -export * from './cosignatoryModificationDTO'; export * from './cosignature'; export * from './cosignatureDTO'; export * from './cosignatureDTOAllOf'; @@ -79,7 +70,7 @@ export * from './heightInfoDTO'; export * from './inflationReceiptDTO'; export * from './inflationReceiptDTOAllOf'; export * from './lockHashAlgorithmEnum'; -export * from './merklePathItem'; +export * from './merklePathItemDTO'; export * from './merkleProofInfoDTO'; export * from './messageDTO'; export * from './messageTypeEnum'; @@ -99,6 +90,8 @@ export * from './mosaicAliasTransactionDTO'; export * from './mosaicDTO'; export * from './mosaicDefinitionTransactionBodyDTO'; export * from './mosaicDefinitionTransactionDTO'; +export * from './mosaicExpiryReceiptDTO'; +export * from './mosaicExpiryReceiptDTOAllOf'; export * from './mosaicGlobalRestrictionDTO'; export * from './mosaicGlobalRestrictionEntryDTO'; export * from './mosaicGlobalRestrictionEntryRestrictionDTO'; @@ -115,6 +108,7 @@ export * from './mosaicRestrictionTypeEnum'; export * from './mosaicSupplyChangeActionEnum'; export * from './mosaicSupplyChangeTransactionBodyDTO'; export * from './mosaicSupplyChangeTransactionDTO'; +export * from './mosaicsInfoDTO'; export * from './mosaicsNamesDTO'; export * from './multisigAccountGraphInfoDTO'; export * from './multisigAccountInfoDTO'; @@ -122,6 +116,8 @@ export * from './multisigAccountModificationTransactionBodyDTO'; export * from './multisigAccountModificationTransactionDTO'; export * from './multisigDTO'; export * from './namespaceDTO'; +export * from './namespaceExpiryReceiptDTO'; +export * from './namespaceExpiryReceiptDTOAllOf'; export * from './namespaceIds'; export * from './namespaceInfoDTO'; export * from './namespaceMetaDTO'; @@ -131,7 +127,9 @@ export * from './namespaceNameDTO'; export * from './namespaceRegistrationTransactionBodyDTO'; export * from './namespaceRegistrationTransactionDTO'; export * from './namespaceRegistrationTypeEnum'; +export * from './namespacesInfoDTO'; export * from './networkTypeDTO'; +export * from './networkTypeEnum'; export * from './nodeInfoDTO'; export * from './nodeTimeDTO'; export * from './receiptDTO'; @@ -167,7 +165,6 @@ export * from './verifiableEntityDTO'; import localVarRequest = require('request'); -import { AccountAddressRestrictionModificationDTO } from './accountAddressRestrictionModificationDTO'; import { AccountAddressRestrictionTransactionBodyDTO } from './accountAddressRestrictionTransactionBodyDTO'; import { AccountAddressRestrictionTransactionDTO } from './accountAddressRestrictionTransactionDTO'; import { AccountDTO } from './accountDTO'; @@ -178,16 +175,13 @@ import { AccountLinkTransactionBodyDTO } from './accountLinkTransactionBodyDTO'; import { AccountLinkTransactionDTO } from './accountLinkTransactionDTO'; import { AccountMetadataTransactionBodyDTO } from './accountMetadataTransactionBodyDTO'; import { AccountMetadataTransactionDTO } from './accountMetadataTransactionDTO'; -import { AccountMosaicRestrictionModificationDTO } from './accountMosaicRestrictionModificationDTO'; import { AccountMosaicRestrictionTransactionBodyDTO } from './accountMosaicRestrictionTransactionBodyDTO'; import { AccountMosaicRestrictionTransactionDTO } from './accountMosaicRestrictionTransactionDTO'; import { AccountNamesDTO } from './accountNamesDTO'; -import { AccountOperationRestrictionModificationDTO } from './accountOperationRestrictionModificationDTO'; import { AccountOperationRestrictionTransactionBodyDTO } from './accountOperationRestrictionTransactionBodyDTO'; import { AccountOperationRestrictionTransactionDTO } from './accountOperationRestrictionTransactionDTO'; import { AccountRestrictionDTO } from './accountRestrictionDTO'; -import { AccountRestrictionModificationActionEnum } from './accountRestrictionModificationActionEnum'; -import { AccountRestrictionTypeEnum } from './accountRestrictionTypeEnum'; +import { AccountRestrictionFlagsEnum } from './accountRestrictionFlagsEnum'; import { AccountRestrictionsDTO } from './accountRestrictionsDTO'; import { AccountRestrictionsInfoDTO } from './accountRestrictionsInfoDTO'; import { AccountTypeEnum } from './accountTypeEnum'; @@ -195,15 +189,12 @@ import { AccountsNamesDTO } from './accountsNamesDTO'; import { ActivityBucketDTO } from './activityBucketDTO'; import { AddressAliasTransactionBodyDTO } from './addressAliasTransactionBodyDTO'; import { AddressAliasTransactionDTO } from './addressAliasTransactionDTO'; -import { AggregateBondedTransactionDTO } from './aggregateBondedTransactionDTO'; -import { AggregateCompleteTransactionDTO } from './aggregateCompleteTransactionDTO'; import { AggregateTransactionBodyDTO } from './aggregateTransactionBodyDTO'; +import { AggregateTransactionDTO } from './aggregateTransactionDTO'; import { AliasActionEnum } from './aliasActionEnum'; import { AliasDTO } from './aliasDTO'; import { AliasTypeEnum } from './aliasTypeEnum'; import { AnnounceTransactionInfoDTO } from './announceTransactionInfoDTO'; -import { ArtifactExpiryReceiptDTO } from './artifactExpiryReceiptDTO'; -import { ArtifactExpiryReceiptDTOAllOf } from './artifactExpiryReceiptDTOAllOf'; import { BalanceChangeReceiptDTO } from './balanceChangeReceiptDTO'; import { BalanceChangeReceiptDTOAllOf } from './balanceChangeReceiptDTOAllOf'; import { BalanceTransferReceiptDTO } from './balanceTransferReceiptDTO'; @@ -214,8 +205,6 @@ import { BlockInfoDTO } from './blockInfoDTO'; import { BlockMetaDTO } from './blockMetaDTO'; import { ChainScoreDTO } from './chainScoreDTO'; import { CommunicationTimestampsDTO } from './communicationTimestampsDTO'; -import { CosignatoryModificationActionEnum } from './cosignatoryModificationActionEnum'; -import { CosignatoryModificationDTO } from './cosignatoryModificationDTO'; import { Cosignature } from './cosignature'; import { CosignatureDTO } from './cosignatureDTO'; import { CosignatureDTOAllOf } from './cosignatureDTOAllOf'; @@ -248,7 +237,7 @@ import { HeightInfoDTO } from './heightInfoDTO'; import { InflationReceiptDTO } from './inflationReceiptDTO'; import { InflationReceiptDTOAllOf } from './inflationReceiptDTOAllOf'; import { LockHashAlgorithmEnum } from './lockHashAlgorithmEnum'; -import { MerklePathItem } from './merklePathItem'; +import { MerklePathItemDTO } from './merklePathItemDTO'; import { MerkleProofInfoDTO } from './merkleProofInfoDTO'; import { MessageDTO } from './messageDTO'; import { MessageTypeEnum } from './messageTypeEnum'; @@ -268,6 +257,8 @@ import { MosaicAliasTransactionDTO } from './mosaicAliasTransactionDTO'; import { MosaicDTO } from './mosaicDTO'; import { MosaicDefinitionTransactionBodyDTO } from './mosaicDefinitionTransactionBodyDTO'; import { MosaicDefinitionTransactionDTO } from './mosaicDefinitionTransactionDTO'; +import { MosaicExpiryReceiptDTO } from './mosaicExpiryReceiptDTO'; +import { MosaicExpiryReceiptDTOAllOf } from './mosaicExpiryReceiptDTOAllOf'; import { MosaicGlobalRestrictionDTO } from './mosaicGlobalRestrictionDTO'; import { MosaicGlobalRestrictionEntryDTO } from './mosaicGlobalRestrictionEntryDTO'; import { MosaicGlobalRestrictionEntryRestrictionDTO } from './mosaicGlobalRestrictionEntryRestrictionDTO'; @@ -284,6 +275,7 @@ import { MosaicRestrictionTypeEnum } from './mosaicRestrictionTypeEnum'; import { MosaicSupplyChangeActionEnum } from './mosaicSupplyChangeActionEnum'; import { MosaicSupplyChangeTransactionBodyDTO } from './mosaicSupplyChangeTransactionBodyDTO'; import { MosaicSupplyChangeTransactionDTO } from './mosaicSupplyChangeTransactionDTO'; +import { MosaicsInfoDTO } from './mosaicsInfoDTO'; import { MosaicsNamesDTO } from './mosaicsNamesDTO'; import { MultisigAccountGraphInfoDTO } from './multisigAccountGraphInfoDTO'; import { MultisigAccountInfoDTO } from './multisigAccountInfoDTO'; @@ -291,6 +283,8 @@ import { MultisigAccountModificationTransactionBodyDTO } from './multisigAccount import { MultisigAccountModificationTransactionDTO } from './multisigAccountModificationTransactionDTO'; import { MultisigDTO } from './multisigDTO'; import { NamespaceDTO } from './namespaceDTO'; +import { NamespaceExpiryReceiptDTO } from './namespaceExpiryReceiptDTO'; +import { NamespaceExpiryReceiptDTOAllOf } from './namespaceExpiryReceiptDTOAllOf'; import { NamespaceIds } from './namespaceIds'; import { NamespaceInfoDTO } from './namespaceInfoDTO'; import { NamespaceMetaDTO } from './namespaceMetaDTO'; @@ -300,7 +294,9 @@ import { NamespaceNameDTO } from './namespaceNameDTO'; import { NamespaceRegistrationTransactionBodyDTO } from './namespaceRegistrationTransactionBodyDTO'; import { NamespaceRegistrationTransactionDTO } from './namespaceRegistrationTransactionDTO'; import { NamespaceRegistrationTypeEnum } from './namespaceRegistrationTypeEnum'; +import { NamespacesInfoDTO } from './namespacesInfoDTO'; import { NetworkTypeDTO } from './networkTypeDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { NodeInfoDTO } from './nodeInfoDTO'; import { NodeTimeDTO } from './nodeTimeDTO'; import { ReceiptDTO } from './receiptDTO'; @@ -348,12 +344,10 @@ let primitives = [ let enumsMap: {[index: string]: any} = { "AccountLinkActionEnum": AccountLinkActionEnum, - "AccountRestrictionModificationActionEnum": AccountRestrictionModificationActionEnum, - "AccountRestrictionTypeEnum": AccountRestrictionTypeEnum, + "AccountRestrictionFlagsEnum": AccountRestrictionFlagsEnum, "AccountTypeEnum": AccountTypeEnum, "AliasActionEnum": AliasActionEnum, "AliasTypeEnum": AliasTypeEnum, - "CosignatoryModificationActionEnum": CosignatoryModificationActionEnum, "LockHashAlgorithmEnum": LockHashAlgorithmEnum, "MessageTypeEnum": MessageTypeEnum, "MetadataTypeEnum": MetadataTypeEnum, @@ -361,13 +355,13 @@ let enumsMap: {[index: string]: any} = { "MosaicRestrictionTypeEnum": MosaicRestrictionTypeEnum, "MosaicSupplyChangeActionEnum": MosaicSupplyChangeActionEnum, "NamespaceRegistrationTypeEnum": NamespaceRegistrationTypeEnum, + "NetworkTypeEnum": NetworkTypeEnum, "ReceiptTypeEnum": ReceiptTypeEnum, "RolesTypeEnum": RolesTypeEnum, "TransactionTypeEnum": TransactionTypeEnum, } let typeMap: {[index: string]: any} = { - "AccountAddressRestrictionModificationDTO": AccountAddressRestrictionModificationDTO, "AccountAddressRestrictionTransactionBodyDTO": AccountAddressRestrictionTransactionBodyDTO, "AccountAddressRestrictionTransactionDTO": AccountAddressRestrictionTransactionDTO, "AccountDTO": AccountDTO, @@ -377,11 +371,9 @@ let typeMap: {[index: string]: any} = { "AccountLinkTransactionDTO": AccountLinkTransactionDTO, "AccountMetadataTransactionBodyDTO": AccountMetadataTransactionBodyDTO, "AccountMetadataTransactionDTO": AccountMetadataTransactionDTO, - "AccountMosaicRestrictionModificationDTO": AccountMosaicRestrictionModificationDTO, "AccountMosaicRestrictionTransactionBodyDTO": AccountMosaicRestrictionTransactionBodyDTO, "AccountMosaicRestrictionTransactionDTO": AccountMosaicRestrictionTransactionDTO, "AccountNamesDTO": AccountNamesDTO, - "AccountOperationRestrictionModificationDTO": AccountOperationRestrictionModificationDTO, "AccountOperationRestrictionTransactionBodyDTO": AccountOperationRestrictionTransactionBodyDTO, "AccountOperationRestrictionTransactionDTO": AccountOperationRestrictionTransactionDTO, "AccountRestrictionDTO": AccountRestrictionDTO, @@ -391,13 +383,10 @@ let typeMap: {[index: string]: any} = { "ActivityBucketDTO": ActivityBucketDTO, "AddressAliasTransactionBodyDTO": AddressAliasTransactionBodyDTO, "AddressAliasTransactionDTO": AddressAliasTransactionDTO, - "AggregateBondedTransactionDTO": AggregateBondedTransactionDTO, - "AggregateCompleteTransactionDTO": AggregateCompleteTransactionDTO, "AggregateTransactionBodyDTO": AggregateTransactionBodyDTO, + "AggregateTransactionDTO": AggregateTransactionDTO, "AliasDTO": AliasDTO, "AnnounceTransactionInfoDTO": AnnounceTransactionInfoDTO, - "ArtifactExpiryReceiptDTO": ArtifactExpiryReceiptDTO, - "ArtifactExpiryReceiptDTOAllOf": ArtifactExpiryReceiptDTOAllOf, "BalanceChangeReceiptDTO": BalanceChangeReceiptDTO, "BalanceChangeReceiptDTOAllOf": BalanceChangeReceiptDTOAllOf, "BalanceTransferReceiptDTO": BalanceTransferReceiptDTO, @@ -408,7 +397,6 @@ let typeMap: {[index: string]: any} = { "BlockMetaDTO": BlockMetaDTO, "ChainScoreDTO": ChainScoreDTO, "CommunicationTimestampsDTO": CommunicationTimestampsDTO, - "CosignatoryModificationDTO": CosignatoryModificationDTO, "Cosignature": Cosignature, "CosignatureDTO": CosignatureDTO, "CosignatureDTOAllOf": CosignatureDTOAllOf, @@ -440,7 +428,7 @@ let typeMap: {[index: string]: any} = { "HeightInfoDTO": HeightInfoDTO, "InflationReceiptDTO": InflationReceiptDTO, "InflationReceiptDTOAllOf": InflationReceiptDTOAllOf, - "MerklePathItem": MerklePathItem, + "MerklePathItemDTO": MerklePathItemDTO, "MerkleProofInfoDTO": MerkleProofInfoDTO, "MessageDTO": MessageDTO, "MetadataDTO": MetadataDTO, @@ -458,6 +446,8 @@ let typeMap: {[index: string]: any} = { "MosaicDTO": MosaicDTO, "MosaicDefinitionTransactionBodyDTO": MosaicDefinitionTransactionBodyDTO, "MosaicDefinitionTransactionDTO": MosaicDefinitionTransactionDTO, + "MosaicExpiryReceiptDTO": MosaicExpiryReceiptDTO, + "MosaicExpiryReceiptDTOAllOf": MosaicExpiryReceiptDTOAllOf, "MosaicGlobalRestrictionDTO": MosaicGlobalRestrictionDTO, "MosaicGlobalRestrictionEntryDTO": MosaicGlobalRestrictionEntryDTO, "MosaicGlobalRestrictionEntryRestrictionDTO": MosaicGlobalRestrictionEntryRestrictionDTO, @@ -471,6 +461,7 @@ let typeMap: {[index: string]: any} = { "MosaicNamesDTO": MosaicNamesDTO, "MosaicSupplyChangeTransactionBodyDTO": MosaicSupplyChangeTransactionBodyDTO, "MosaicSupplyChangeTransactionDTO": MosaicSupplyChangeTransactionDTO, + "MosaicsInfoDTO": MosaicsInfoDTO, "MosaicsNamesDTO": MosaicsNamesDTO, "MultisigAccountGraphInfoDTO": MultisigAccountGraphInfoDTO, "MultisigAccountInfoDTO": MultisigAccountInfoDTO, @@ -478,6 +469,8 @@ let typeMap: {[index: string]: any} = { "MultisigAccountModificationTransactionDTO": MultisigAccountModificationTransactionDTO, "MultisigDTO": MultisigDTO, "NamespaceDTO": NamespaceDTO, + "NamespaceExpiryReceiptDTO": NamespaceExpiryReceiptDTO, + "NamespaceExpiryReceiptDTOAllOf": NamespaceExpiryReceiptDTOAllOf, "NamespaceIds": NamespaceIds, "NamespaceInfoDTO": NamespaceInfoDTO, "NamespaceMetaDTO": NamespaceMetaDTO, @@ -486,6 +479,7 @@ let typeMap: {[index: string]: any} = { "NamespaceNameDTO": NamespaceNameDTO, "NamespaceRegistrationTransactionBodyDTO": NamespaceRegistrationTransactionBodyDTO, "NamespaceRegistrationTransactionDTO": NamespaceRegistrationTransactionDTO, + "NamespacesInfoDTO": NamespacesInfoDTO, "NetworkTypeDTO": NetworkTypeDTO, "NodeInfoDTO": NodeInfoDTO, "NodeTimeDTO": NodeTimeDTO, diff --git a/src/infrastructure/model/mosaic.ts b/src/infrastructure/model/mosaic.ts index 1a61893001..371e1d027c 100644 --- a/src/infrastructure/model/mosaic.ts +++ b/src/infrastructure/model/mosaic.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/mosaicAddressRestrictionDTO.ts b/src/infrastructure/model/mosaicAddressRestrictionDTO.ts index efb951accd..c2ad85cef3 100644 --- a/src/infrastructure/model/mosaicAddressRestrictionDTO.ts +++ b/src/infrastructure/model/mosaicAddressRestrictionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/mosaicAddressRestrictionEntryDTO.ts b/src/infrastructure/model/mosaicAddressRestrictionEntryDTO.ts index 61ab124a3e..1eba898d83 100644 --- a/src/infrastructure/model/mosaicAddressRestrictionEntryDTO.ts +++ b/src/infrastructure/model/mosaicAddressRestrictionEntryDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/mosaicAddressRestrictionEntryWrapperDTO.ts b/src/infrastructure/model/mosaicAddressRestrictionEntryWrapperDTO.ts index a7607d94a3..86545936e9 100644 --- a/src/infrastructure/model/mosaicAddressRestrictionEntryWrapperDTO.ts +++ b/src/infrastructure/model/mosaicAddressRestrictionEntryWrapperDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/mosaicAddressRestrictionTransactionBodyDTO.ts b/src/infrastructure/model/mosaicAddressRestrictionTransactionBodyDTO.ts index 09935f4cf8..90730ff900 100644 --- a/src/infrastructure/model/mosaicAddressRestrictionTransactionBodyDTO.ts +++ b/src/infrastructure/model/mosaicAddressRestrictionTransactionBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,7 +28,7 @@ export class MosaicAddressRestrictionTransactionBodyDTO { /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. */ 'mosaicId': string; /** @@ -36,17 +36,17 @@ export class MosaicAddressRestrictionTransactionBodyDTO { */ 'restrictionKey': string; /** - * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. - */ - 'targetAddress': string; - /** - * Previous restriction value. + * A value in a restriction transaction. */ 'previousRestrictionValue': string; /** - * New restriction value. + * A value in a restriction transaction. */ 'newRestrictionValue': string; + /** + * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. + */ + 'targetAddress': string; static discriminator: string | undefined = undefined; @@ -61,11 +61,6 @@ export class MosaicAddressRestrictionTransactionBodyDTO { "baseName": "restrictionKey", "type": "string" }, - { - "name": "targetAddress", - "baseName": "targetAddress", - "type": "string" - }, { "name": "previousRestrictionValue", "baseName": "previousRestrictionValue", @@ -75,6 +70,11 @@ export class MosaicAddressRestrictionTransactionBodyDTO { "name": "newRestrictionValue", "baseName": "newRestrictionValue", "type": "string" + }, + { + "name": "targetAddress", + "baseName": "targetAddress", + "type": "string" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/mosaicAddressRestrictionTransactionDTO.ts b/src/infrastructure/model/mosaicAddressRestrictionTransactionDTO.ts index 143da8766b..03e8ccb245 100644 --- a/src/infrastructure/model/mosaicAddressRestrictionTransactionDTO.ts +++ b/src/infrastructure/model/mosaicAddressRestrictionTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -26,6 +26,7 @@ */ import { MosaicAddressRestrictionTransactionBodyDTO } from './mosaicAddressRestrictionTransactionBodyDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { TransactionDTO } from './transactionDTO'; /** @@ -38,9 +39,10 @@ export class MosaicAddressRestrictionTransactionDTO { 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -51,7 +53,7 @@ export class MosaicAddressRestrictionTransactionDTO { */ 'deadline': string; /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. */ 'mosaicId': string; /** @@ -59,17 +61,17 @@ export class MosaicAddressRestrictionTransactionDTO { */ 'restrictionKey': string; /** - * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. - */ - 'targetAddress': string; - /** - * Previous restriction value. + * A value in a restriction transaction. */ 'previousRestrictionValue': string; /** - * New restriction value. + * A value in a restriction transaction. */ 'newRestrictionValue': string; + /** + * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. + */ + 'targetAddress': string; static discriminator: string | undefined = undefined; @@ -89,6 +91,11 @@ export class MosaicAddressRestrictionTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -114,11 +121,6 @@ export class MosaicAddressRestrictionTransactionDTO { "baseName": "restrictionKey", "type": "string" }, - { - "name": "targetAddress", - "baseName": "targetAddress", - "type": "string" - }, { "name": "previousRestrictionValue", "baseName": "previousRestrictionValue", @@ -128,6 +130,11 @@ export class MosaicAddressRestrictionTransactionDTO { "name": "newRestrictionValue", "baseName": "newRestrictionValue", "type": "string" + }, + { + "name": "targetAddress", + "baseName": "targetAddress", + "type": "string" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/mosaicAliasTransactionBodyDTO.ts b/src/infrastructure/model/mosaicAliasTransactionBodyDTO.ts index 28607e51d4..97f40e06a8 100644 --- a/src/infrastructure/model/mosaicAliasTransactionBodyDTO.ts +++ b/src/infrastructure/model/mosaicAliasTransactionBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,7 +28,6 @@ import { AliasActionEnum } from './aliasActionEnum'; export class MosaicAliasTransactionBodyDTO { - 'aliasAction': AliasActionEnum; /** * Namespace identifier. */ @@ -37,15 +36,11 @@ export class MosaicAliasTransactionBodyDTO { * Mosaic identifier. */ 'mosaicId': string; + 'aliasAction': AliasActionEnum; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "aliasAction", - "baseName": "aliasAction", - "type": "AliasActionEnum" - }, { "name": "namespaceId", "baseName": "namespaceId", @@ -55,6 +50,11 @@ export class MosaicAliasTransactionBodyDTO { "name": "mosaicId", "baseName": "mosaicId", "type": "string" + }, + { + "name": "aliasAction", + "baseName": "aliasAction", + "type": "AliasActionEnum" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/mosaicAliasTransactionDTO.ts b/src/infrastructure/model/mosaicAliasTransactionDTO.ts index 236281ab4e..407ab63626 100644 --- a/src/infrastructure/model/mosaicAliasTransactionDTO.ts +++ b/src/infrastructure/model/mosaicAliasTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,6 +27,7 @@ import { AliasActionEnum } from './aliasActionEnum'; import { MosaicAliasTransactionBodyDTO } from './mosaicAliasTransactionBodyDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { TransactionDTO } from './transactionDTO'; /** @@ -39,9 +40,10 @@ export class MosaicAliasTransactionDTO { 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -51,7 +53,6 @@ export class MosaicAliasTransactionDTO { * Duration expressed in number of blocks. */ 'deadline': string; - 'aliasAction': AliasActionEnum; /** * Namespace identifier. */ @@ -60,6 +61,7 @@ export class MosaicAliasTransactionDTO { * Mosaic identifier. */ 'mosaicId': string; + 'aliasAction': AliasActionEnum; static discriminator: string | undefined = undefined; @@ -79,6 +81,11 @@ export class MosaicAliasTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -94,11 +101,6 @@ export class MosaicAliasTransactionDTO { "baseName": "deadline", "type": "string" }, - { - "name": "aliasAction", - "baseName": "aliasAction", - "type": "AliasActionEnum" - }, { "name": "namespaceId", "baseName": "namespaceId", @@ -108,6 +110,11 @@ export class MosaicAliasTransactionDTO { "name": "mosaicId", "baseName": "mosaicId", "type": "string" + }, + { + "name": "aliasAction", + "baseName": "aliasAction", + "type": "AliasActionEnum" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/mosaicDTO.ts b/src/infrastructure/model/mosaicDTO.ts index 64aaa4be1a..a0961b6223 100644 --- a/src/infrastructure/model/mosaicDTO.ts +++ b/src/infrastructure/model/mosaicDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -40,6 +40,9 @@ export class MosaicDTO { */ 'startHeight': string; 'ownerPublicKey': string; + /** + * Decoded address. + */ 'ownerAddress': string; /** * Number of definitions for the same mosaic. diff --git a/src/infrastructure/model/mosaicDefinitionTransactionBodyDTO.ts b/src/infrastructure/model/mosaicDefinitionTransactionBodyDTO.ts index 14a57cfe09..bb844a2f57 100644 --- a/src/infrastructure/model/mosaicDefinitionTransactionBodyDTO.ts +++ b/src/infrastructure/model/mosaicDefinitionTransactionBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,15 +27,19 @@ export class MosaicDefinitionTransactionBodyDTO { - /** - * Random nonce used to generate the mosaic id. - */ - 'nonce': number; /** * Mosaic identifier. */ 'id': string; /** + * Duration expressed in number of blocks. + */ + 'duration': string; + /** + * Random nonce used to generate the mosaic id. + */ + 'nonce': number; + /** * - 0x00 (none) - No flags present. - 0x01 (supplyMutable) - Mosaic supports supply changes even when mosaic owner owns partial supply. - 0x02 (transferable) - Mosaic supports transfers between arbitrary accounts. When not set, mosaic can only be transferred to and from mosaic owner. - 0x04 (restrictable) - Mosaic supports custom restrictions configured by mosaic owner. */ 'flags': number; @@ -43,24 +47,25 @@ export class MosaicDefinitionTransactionBodyDTO { * Determines up to what decimal place the mosaic can be divided. Divisibility of 3 means that a mosaic can be divided into smallest parts of 0.001 mosaics. The divisibility must be in the range of 0 and 6. */ 'divisibility': number; - /** - * Duration expressed in number of blocks. - */ - 'duration': string; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "nonce", - "baseName": "nonce", - "type": "number" - }, { "name": "id", "baseName": "id", "type": "string" }, + { + "name": "duration", + "baseName": "duration", + "type": "string" + }, + { + "name": "nonce", + "baseName": "nonce", + "type": "number" + }, { "name": "flags", "baseName": "flags", @@ -70,11 +75,6 @@ export class MosaicDefinitionTransactionBodyDTO { "name": "divisibility", "baseName": "divisibility", "type": "number" - }, - { - "name": "duration", - "baseName": "duration", - "type": "string" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/mosaicDefinitionTransactionDTO.ts b/src/infrastructure/model/mosaicDefinitionTransactionDTO.ts index e7d5a22bcd..e4818dcf04 100644 --- a/src/infrastructure/model/mosaicDefinitionTransactionDTO.ts +++ b/src/infrastructure/model/mosaicDefinitionTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -26,6 +26,7 @@ */ import { MosaicDefinitionTransactionBodyDTO } from './mosaicDefinitionTransactionBodyDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { TransactionDTO } from './transactionDTO'; /** @@ -38,9 +39,10 @@ export class MosaicDefinitionTransactionDTO { 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -51,14 +53,18 @@ export class MosaicDefinitionTransactionDTO { */ 'deadline': string; /** - * Random nonce used to generate the mosaic id. - */ - 'nonce': number; - /** * Mosaic identifier. */ 'id': string; /** + * Duration expressed in number of blocks. + */ + 'duration': string; + /** + * Random nonce used to generate the mosaic id. + */ + 'nonce': number; + /** * - 0x00 (none) - No flags present. - 0x01 (supplyMutable) - Mosaic supports supply changes even when mosaic owner owns partial supply. - 0x02 (transferable) - Mosaic supports transfers between arbitrary accounts. When not set, mosaic can only be transferred to and from mosaic owner. - 0x04 (restrictable) - Mosaic supports custom restrictions configured by mosaic owner. */ 'flags': number; @@ -66,10 +72,6 @@ export class MosaicDefinitionTransactionDTO { * Determines up to what decimal place the mosaic can be divided. Divisibility of 3 means that a mosaic can be divided into smallest parts of 0.001 mosaics. The divisibility must be in the range of 0 and 6. */ 'divisibility': number; - /** - * Duration expressed in number of blocks. - */ - 'duration': string; static discriminator: string | undefined = undefined; @@ -89,6 +91,11 @@ export class MosaicDefinitionTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -104,16 +111,21 @@ export class MosaicDefinitionTransactionDTO { "baseName": "deadline", "type": "string" }, - { - "name": "nonce", - "baseName": "nonce", - "type": "number" - }, { "name": "id", "baseName": "id", "type": "string" }, + { + "name": "duration", + "baseName": "duration", + "type": "string" + }, + { + "name": "nonce", + "baseName": "nonce", + "type": "number" + }, { "name": "flags", "baseName": "flags", @@ -123,11 +135,6 @@ export class MosaicDefinitionTransactionDTO { "name": "divisibility", "baseName": "divisibility", "type": "number" - }, - { - "name": "duration", - "baseName": "duration", - "type": "string" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/accountMosaicRestrictionModificationDTO.ts b/src/infrastructure/model/mosaicExpiryReceiptDTO.ts similarity index 60% rename from src/infrastructure/model/accountMosaicRestrictionModificationDTO.ts rename to src/infrastructure/model/mosaicExpiryReceiptDTO.ts index 31bbb90a84..89b12750ca 100644 --- a/src/infrastructure/model/accountMosaicRestrictionModificationDTO.ts +++ b/src/infrastructure/model/mosaicExpiryReceiptDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,31 +25,45 @@ * Do not edit the class manually. */ -import { AccountRestrictionModificationActionEnum } from './accountRestrictionModificationActionEnum'; +import { MosaicExpiryReceiptDTOAllOf } from './mosaicExpiryReceiptDTOAllOf'; +import { ReceiptDTO } from './receiptDTO'; +import { ReceiptTypeEnum } from './receiptTypeEnum'; -export class AccountMosaicRestrictionModificationDTO { - 'modificationAction': AccountRestrictionModificationActionEnum; +/** +* A mosaic expired in this block. +*/ +export class MosaicExpiryReceiptDTO { + /** + * Version of the receipt. + */ + 'version': number; + 'type': ReceiptTypeEnum; /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + * Mosaic identifier. */ - 'value': string; + 'artifactId': string; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - "name": "modificationAction", - "baseName": "modificationAction", - "type": "AccountRestrictionModificationActionEnum" + "name": "version", + "baseName": "version", + "type": "number" + }, + { + "name": "type", + "baseName": "type", + "type": "ReceiptTypeEnum" }, { - "name": "value", - "baseName": "value", + "name": "artifactId", + "baseName": "artifactId", "type": "string" } ]; static getAttributeTypeMap() { - return AccountMosaicRestrictionModificationDTO.attributeTypeMap; + return MosaicExpiryReceiptDTO.attributeTypeMap; } } diff --git a/src/infrastructure/model/artifactExpiryReceiptDTOAllOf.ts b/src/infrastructure/model/mosaicExpiryReceiptDTOAllOf.ts similarity index 82% rename from src/infrastructure/model/artifactExpiryReceiptDTOAllOf.ts rename to src/infrastructure/model/mosaicExpiryReceiptDTOAllOf.ts index 43444119dc..5ccc8d3185 100644 --- a/src/infrastructure/model/artifactExpiryReceiptDTOAllOf.ts +++ b/src/infrastructure/model/mosaicExpiryReceiptDTOAllOf.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,8 +25,12 @@ * Do not edit the class manually. */ -export class ArtifactExpiryReceiptDTOAllOf { - 'artifactId': any; + +export class MosaicExpiryReceiptDTOAllOf { + /** + * Mosaic identifier. + */ + 'artifactId': string; static discriminator: string | undefined = undefined; @@ -34,11 +38,11 @@ export class ArtifactExpiryReceiptDTOAllOf { { "name": "artifactId", "baseName": "artifactId", - "type": "any" + "type": "string" } ]; static getAttributeTypeMap() { - return ArtifactExpiryReceiptDTOAllOf.attributeTypeMap; + return MosaicExpiryReceiptDTOAllOf.attributeTypeMap; } } diff --git a/src/infrastructure/model/mosaicGlobalRestrictionDTO.ts b/src/infrastructure/model/mosaicGlobalRestrictionDTO.ts index 9861d040b5..9ce5a5c337 100644 --- a/src/infrastructure/model/mosaicGlobalRestrictionDTO.ts +++ b/src/infrastructure/model/mosaicGlobalRestrictionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/mosaicGlobalRestrictionEntryDTO.ts b/src/infrastructure/model/mosaicGlobalRestrictionEntryDTO.ts index ea9d788aff..ccc1825520 100644 --- a/src/infrastructure/model/mosaicGlobalRestrictionEntryDTO.ts +++ b/src/infrastructure/model/mosaicGlobalRestrictionEntryDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/mosaicGlobalRestrictionEntryRestrictionDTO.ts b/src/infrastructure/model/mosaicGlobalRestrictionEntryRestrictionDTO.ts index d87d2109d6..242c1c18ab 100644 --- a/src/infrastructure/model/mosaicGlobalRestrictionEntryRestrictionDTO.ts +++ b/src/infrastructure/model/mosaicGlobalRestrictionEntryRestrictionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -33,7 +33,7 @@ export class MosaicGlobalRestrictionEntryRestrictionDTO { */ 'referenceMosaicId': string; /** - * Restriction value. + * A value in a restriction transaction. */ 'restrictionValue': string; 'restrictionType': MosaicRestrictionTypeEnum; diff --git a/src/infrastructure/model/mosaicGlobalRestrictionEntryWrapperDTO.ts b/src/infrastructure/model/mosaicGlobalRestrictionEntryWrapperDTO.ts index f6a4e3f96c..b06a0333dd 100644 --- a/src/infrastructure/model/mosaicGlobalRestrictionEntryWrapperDTO.ts +++ b/src/infrastructure/model/mosaicGlobalRestrictionEntryWrapperDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/mosaicGlobalRestrictionTransactionBodyDTO.ts b/src/infrastructure/model/mosaicGlobalRestrictionTransactionBodyDTO.ts index 2736a934ae..592fc32962 100644 --- a/src/infrastructure/model/mosaicGlobalRestrictionTransactionBodyDTO.ts +++ b/src/infrastructure/model/mosaicGlobalRestrictionTransactionBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -29,11 +29,11 @@ import { MosaicRestrictionTypeEnum } from './mosaicRestrictionTypeEnum'; export class MosaicGlobalRestrictionTransactionBodyDTO { /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. */ 'mosaicId': string; /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. */ 'referenceMosaicId': string; /** @@ -41,14 +41,14 @@ export class MosaicGlobalRestrictionTransactionBodyDTO { */ 'restrictionKey': string; /** - * Previous restriction value. + * A value in a restriction transaction. */ 'previousRestrictionValue': string; - 'previousRestrictionType': MosaicRestrictionTypeEnum; /** - * New restriction value. + * A value in a restriction transaction. */ 'newRestrictionValue': string; + 'previousRestrictionType': MosaicRestrictionTypeEnum; 'newRestrictionType': MosaicRestrictionTypeEnum; static discriminator: string | undefined = undefined; @@ -74,16 +74,16 @@ export class MosaicGlobalRestrictionTransactionBodyDTO { "baseName": "previousRestrictionValue", "type": "string" }, - { - "name": "previousRestrictionType", - "baseName": "previousRestrictionType", - "type": "MosaicRestrictionTypeEnum" - }, { "name": "newRestrictionValue", "baseName": "newRestrictionValue", "type": "string" }, + { + "name": "previousRestrictionType", + "baseName": "previousRestrictionType", + "type": "MosaicRestrictionTypeEnum" + }, { "name": "newRestrictionType", "baseName": "newRestrictionType", diff --git a/src/infrastructure/model/mosaicGlobalRestrictionTransactionDTO.ts b/src/infrastructure/model/mosaicGlobalRestrictionTransactionDTO.ts index 2a9b4ba62d..2f7e4b99d4 100644 --- a/src/infrastructure/model/mosaicGlobalRestrictionTransactionDTO.ts +++ b/src/infrastructure/model/mosaicGlobalRestrictionTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,6 +27,7 @@ import { MosaicGlobalRestrictionTransactionBodyDTO } from './mosaicGlobalRestrictionTransactionBodyDTO'; import { MosaicRestrictionTypeEnum } from './mosaicRestrictionTypeEnum'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { TransactionDTO } from './transactionDTO'; /** @@ -39,9 +40,10 @@ export class MosaicGlobalRestrictionTransactionDTO { 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -52,11 +54,11 @@ export class MosaicGlobalRestrictionTransactionDTO { */ 'deadline': string; /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. */ 'mosaicId': string; /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. */ 'referenceMosaicId': string; /** @@ -64,14 +66,14 @@ export class MosaicGlobalRestrictionTransactionDTO { */ 'restrictionKey': string; /** - * Previous restriction value. + * A value in a restriction transaction. */ 'previousRestrictionValue': string; - 'previousRestrictionType': MosaicRestrictionTypeEnum; /** - * New restriction value. + * A value in a restriction transaction. */ 'newRestrictionValue': string; + 'previousRestrictionType': MosaicRestrictionTypeEnum; 'newRestrictionType': MosaicRestrictionTypeEnum; static discriminator: string | undefined = undefined; @@ -92,6 +94,11 @@ export class MosaicGlobalRestrictionTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -127,16 +134,16 @@ export class MosaicGlobalRestrictionTransactionDTO { "baseName": "previousRestrictionValue", "type": "string" }, - { - "name": "previousRestrictionType", - "baseName": "previousRestrictionType", - "type": "MosaicRestrictionTypeEnum" - }, { "name": "newRestrictionValue", "baseName": "newRestrictionValue", "type": "string" }, + { + "name": "previousRestrictionType", + "baseName": "previousRestrictionType", + "type": "MosaicRestrictionTypeEnum" + }, { "name": "newRestrictionType", "baseName": "newRestrictionType", diff --git a/src/infrastructure/model/mosaicIds.ts b/src/infrastructure/model/mosaicIds.ts index 7d85291c34..77c2bee587 100644 --- a/src/infrastructure/model/mosaicIds.ts +++ b/src/infrastructure/model/mosaicIds.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/mosaicInfoDTO.ts b/src/infrastructure/model/mosaicInfoDTO.ts index 6ca084077c..1c445e9ef6 100644 --- a/src/infrastructure/model/mosaicInfoDTO.ts +++ b/src/infrastructure/model/mosaicInfoDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/mosaicMetadataTransactionBodyDTO.ts b/src/infrastructure/model/mosaicMetadataTransactionBodyDTO.ts index 0b3481280c..06ff11e3ea 100644 --- a/src/infrastructure/model/mosaicMetadataTransactionBodyDTO.ts +++ b/src/infrastructure/model/mosaicMetadataTransactionBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -33,7 +33,7 @@ export class MosaicMetadataTransactionBodyDTO { */ 'scopedMetadataKey': string; /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. */ 'targetMosaicId': string; /** diff --git a/src/infrastructure/model/mosaicMetadataTransactionDTO.ts b/src/infrastructure/model/mosaicMetadataTransactionDTO.ts index 6548e283d8..04a9ecac79 100644 --- a/src/infrastructure/model/mosaicMetadataTransactionDTO.ts +++ b/src/infrastructure/model/mosaicMetadataTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -26,6 +26,7 @@ */ import { MosaicMetadataTransactionBodyDTO } from './mosaicMetadataTransactionBodyDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { TransactionDTO } from './transactionDTO'; /** @@ -38,9 +39,10 @@ export class MosaicMetadataTransactionDTO { 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -56,7 +58,7 @@ export class MosaicMetadataTransactionDTO { */ 'scopedMetadataKey': string; /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. */ 'targetMosaicId': string; /** @@ -90,6 +92,11 @@ export class MosaicMetadataTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", diff --git a/src/infrastructure/model/mosaicNamesDTO.ts b/src/infrastructure/model/mosaicNamesDTO.ts index a62b2e1e31..8de4656020 100644 --- a/src/infrastructure/model/mosaicNamesDTO.ts +++ b/src/infrastructure/model/mosaicNamesDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/mosaicRestrictionEntryTypeEnum.ts b/src/infrastructure/model/mosaicRestrictionEntryTypeEnum.ts index 2fc22569e1..652043daec 100644 --- a/src/infrastructure/model/mosaicRestrictionEntryTypeEnum.ts +++ b/src/infrastructure/model/mosaicRestrictionEntryTypeEnum.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/mosaicRestrictionTypeEnum.ts b/src/infrastructure/model/mosaicRestrictionTypeEnum.ts index f717ce1fab..4dee8157e0 100644 --- a/src/infrastructure/model/mosaicRestrictionTypeEnum.ts +++ b/src/infrastructure/model/mosaicRestrictionTypeEnum.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ /** -* Type of mosaic restriction. * 0 - Uninitialized value indicating no restriction. * 1(EQ) - Allow if equal. * 2 (NE) - Allow if not equal. * 3 (LT) - Allow if less than. * 4 (LE) - Allow if less than or equal. * 5 (GT) - Allow if greater than. * 6 (GE) - Allow if greater than or equal. +* Type of mosaic restriction. * 0 - Uninitialized value indicating no restriction. * 1 (EQ) - Allow if equal. * 2 (NE) - Allow if not equal. * 3 (LT) - Allow if less than. * 4 (LE) - Allow if less than or equal. * 5 (GT) - Allow if greater than. * 6 (GE) - Allow if greater than or equal. */ export enum MosaicRestrictionTypeEnum { NUMBER_0 = 0, diff --git a/src/infrastructure/model/mosaicSupplyChangeActionEnum.ts b/src/infrastructure/model/mosaicSupplyChangeActionEnum.ts index 671d3ebd16..3700e44ab6 100644 --- a/src/infrastructure/model/mosaicSupplyChangeActionEnum.ts +++ b/src/infrastructure/model/mosaicSupplyChangeActionEnum.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/mosaicSupplyChangeTransactionBodyDTO.ts b/src/infrastructure/model/mosaicSupplyChangeTransactionBodyDTO.ts index 0843027b3d..14fa267837 100644 --- a/src/infrastructure/model/mosaicSupplyChangeTransactionBodyDTO.ts +++ b/src/infrastructure/model/mosaicSupplyChangeTransactionBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -29,14 +29,14 @@ import { MosaicSupplyChangeActionEnum } from './mosaicSupplyChangeActionEnum'; export class MosaicSupplyChangeTransactionBodyDTO { /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. */ 'mosaicId': string; - 'action': MosaicSupplyChangeActionEnum; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). */ 'delta': string; + 'action': MosaicSupplyChangeActionEnum; static discriminator: string | undefined = undefined; @@ -46,15 +46,15 @@ export class MosaicSupplyChangeTransactionBodyDTO { "baseName": "mosaicId", "type": "string" }, - { - "name": "action", - "baseName": "action", - "type": "MosaicSupplyChangeActionEnum" - }, { "name": "delta", "baseName": "delta", "type": "string" + }, + { + "name": "action", + "baseName": "action", + "type": "MosaicSupplyChangeActionEnum" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/mosaicSupplyChangeTransactionDTO.ts b/src/infrastructure/model/mosaicSupplyChangeTransactionDTO.ts index 06e95a3651..63ccbafd28 100644 --- a/src/infrastructure/model/mosaicSupplyChangeTransactionDTO.ts +++ b/src/infrastructure/model/mosaicSupplyChangeTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,6 +27,7 @@ import { MosaicSupplyChangeActionEnum } from './mosaicSupplyChangeActionEnum'; import { MosaicSupplyChangeTransactionBodyDTO } from './mosaicSupplyChangeTransactionBodyDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { TransactionDTO } from './transactionDTO'; /** @@ -39,9 +40,10 @@ export class MosaicSupplyChangeTransactionDTO { 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -52,14 +54,14 @@ export class MosaicSupplyChangeTransactionDTO { */ 'deadline': string; /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. */ 'mosaicId': string; - 'action': MosaicSupplyChangeActionEnum; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). */ 'delta': string; + 'action': MosaicSupplyChangeActionEnum; static discriminator: string | undefined = undefined; @@ -79,6 +81,11 @@ export class MosaicSupplyChangeTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -99,15 +106,15 @@ export class MosaicSupplyChangeTransactionDTO { "baseName": "mosaicId", "type": "string" }, - { - "name": "action", - "baseName": "action", - "type": "MosaicSupplyChangeActionEnum" - }, { "name": "delta", "baseName": "delta", "type": "string" + }, + { + "name": "action", + "baseName": "action", + "type": "MosaicSupplyChangeActionEnum" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/accountRestrictionModificationActionEnum.ts b/src/infrastructure/model/mosaicsInfoDTO.ts similarity index 61% rename from src/infrastructure/model/accountRestrictionModificationActionEnum.ts rename to src/infrastructure/model/mosaicsInfoDTO.ts index b2c406ace6..4c09ec428f 100644 --- a/src/infrastructure/model/accountRestrictionModificationActionEnum.ts +++ b/src/infrastructure/model/mosaicsInfoDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,11 +25,25 @@ * Do not edit the class manually. */ +import { MosaicDTO } from './mosaicDTO'; -/** -* Type of action: * 0 - Remove property. * 1 - Add property. -*/ -export enum AccountRestrictionModificationActionEnum { - NUMBER_0 = 0, - NUMBER_1 = 1 +export class MosaicsInfoDTO { + /** + * Array of mosaics information. + */ + 'mosaics': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "mosaics", + "baseName": "mosaics", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return MosaicsInfoDTO.attributeTypeMap; + } } + diff --git a/src/infrastructure/model/mosaicsNamesDTO.ts b/src/infrastructure/model/mosaicsNamesDTO.ts index d71e159f0a..eb97e2816f 100644 --- a/src/infrastructure/model/mosaicsNamesDTO.ts +++ b/src/infrastructure/model/mosaicsNamesDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/multisigAccountGraphInfoDTO.ts b/src/infrastructure/model/multisigAccountGraphInfoDTO.ts index fa1e9b285a..f719ef68d0 100644 --- a/src/infrastructure/model/multisigAccountGraphInfoDTO.ts +++ b/src/infrastructure/model/multisigAccountGraphInfoDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/multisigAccountInfoDTO.ts b/src/infrastructure/model/multisigAccountInfoDTO.ts index 264048744c..b0f14dadc4 100644 --- a/src/infrastructure/model/multisigAccountInfoDTO.ts +++ b/src/infrastructure/model/multisigAccountInfoDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/multisigAccountModificationTransactionBodyDTO.ts b/src/infrastructure/model/multisigAccountModificationTransactionBodyDTO.ts index e3b659d432..a52908497a 100644 --- a/src/infrastructure/model/multisigAccountModificationTransactionBodyDTO.ts +++ b/src/infrastructure/model/multisigAccountModificationTransactionBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,7 +25,6 @@ * Do not edit the class manually. */ -import { CosignatoryModificationDTO } from './cosignatoryModificationDTO'; export class MultisigAccountModificationTransactionBodyDTO { /** @@ -37,9 +36,13 @@ export class MultisigAccountModificationTransactionBodyDTO { */ 'minApprovalDelta': number; /** - * Array of cosignatory accounts to add or delete. + * Array of cosignatory accounts to add. */ - 'modifications': Array; + 'publicKeyAdditions': Array; + /** + * Array of cosignatory accounts to delete. + */ + 'publicKeyDeletions': Array; static discriminator: string | undefined = undefined; @@ -55,9 +58,14 @@ export class MultisigAccountModificationTransactionBodyDTO { "type": "number" }, { - "name": "modifications", - "baseName": "modifications", - "type": "Array" + "name": "publicKeyAdditions", + "baseName": "publicKeyAdditions", + "type": "Array" + }, + { + "name": "publicKeyDeletions", + "baseName": "publicKeyDeletions", + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/multisigAccountModificationTransactionDTO.ts b/src/infrastructure/model/multisigAccountModificationTransactionDTO.ts index 0dbd24af69..c062ef94f9 100644 --- a/src/infrastructure/model/multisigAccountModificationTransactionDTO.ts +++ b/src/infrastructure/model/multisigAccountModificationTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,8 +25,8 @@ * Do not edit the class manually. */ -import { CosignatoryModificationDTO } from './cosignatoryModificationDTO'; import { MultisigAccountModificationTransactionBodyDTO } from './multisigAccountModificationTransactionBodyDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { TransactionDTO } from './transactionDTO'; /** @@ -39,9 +39,10 @@ export class MultisigAccountModificationTransactionDTO { 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -60,9 +61,13 @@ export class MultisigAccountModificationTransactionDTO { */ 'minApprovalDelta': number; /** - * Array of cosignatory accounts to add or delete. + * Array of cosignatory accounts to add. */ - 'modifications': Array; + 'publicKeyAdditions': Array; + /** + * Array of cosignatory accounts to delete. + */ + 'publicKeyDeletions': Array; static discriminator: string | undefined = undefined; @@ -82,6 +87,11 @@ export class MultisigAccountModificationTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -108,9 +118,14 @@ export class MultisigAccountModificationTransactionDTO { "type": "number" }, { - "name": "modifications", - "baseName": "modifications", - "type": "Array" + "name": "publicKeyAdditions", + "baseName": "publicKeyAdditions", + "type": "Array" + }, + { + "name": "publicKeyDeletions", + "baseName": "publicKeyDeletions", + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/multisigDTO.ts b/src/infrastructure/model/multisigDTO.ts index cb5c6db4c0..b5abb4436f 100644 --- a/src/infrastructure/model/multisigDTO.ts +++ b/src/infrastructure/model/multisigDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/namespaceDTO.ts b/src/infrastructure/model/namespaceDTO.ts index 649b211740..42d674f4a3 100644 --- a/src/infrastructure/model/namespaceDTO.ts +++ b/src/infrastructure/model/namespaceDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/accountAddressRestrictionModificationDTO.ts b/src/infrastructure/model/namespaceExpiryReceiptDTO.ts similarity index 59% rename from src/infrastructure/model/accountAddressRestrictionModificationDTO.ts rename to src/infrastructure/model/namespaceExpiryReceiptDTO.ts index 49778df63c..317c3f7499 100644 --- a/src/infrastructure/model/accountAddressRestrictionModificationDTO.ts +++ b/src/infrastructure/model/namespaceExpiryReceiptDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,31 +25,45 @@ * Do not edit the class manually. */ -import { AccountRestrictionModificationActionEnum } from './accountRestrictionModificationActionEnum'; +import { NamespaceExpiryReceiptDTOAllOf } from './namespaceExpiryReceiptDTOAllOf'; +import { ReceiptDTO } from './receiptDTO'; +import { ReceiptTypeEnum } from './receiptTypeEnum'; -export class AccountAddressRestrictionModificationDTO { - 'modificationAction': AccountRestrictionModificationActionEnum; +/** +* An namespace expired in this block. +*/ +export class NamespaceExpiryReceiptDTO { + /** + * Version of the receipt. + */ + 'version': number; + 'type': ReceiptTypeEnum; /** - * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. + * Namespace identifier. */ - 'value': string; + 'artifactId': string; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - "name": "modificationAction", - "baseName": "modificationAction", - "type": "AccountRestrictionModificationActionEnum" + "name": "version", + "baseName": "version", + "type": "number" + }, + { + "name": "type", + "baseName": "type", + "type": "ReceiptTypeEnum" }, { - "name": "value", - "baseName": "value", + "name": "artifactId", + "baseName": "artifactId", "type": "string" } ]; static getAttributeTypeMap() { - return AccountAddressRestrictionModificationDTO.attributeTypeMap; + return NamespaceExpiryReceiptDTO.attributeTypeMap; } } diff --git a/src/infrastructure/model/cosignatoryModificationDTO.ts b/src/infrastructure/model/namespaceExpiryReceiptDTOAllOf.ts similarity index 66% rename from src/infrastructure/model/cosignatoryModificationDTO.ts rename to src/infrastructure/model/namespaceExpiryReceiptDTOAllOf.ts index 5113585756..3b474aad73 100644 --- a/src/infrastructure/model/cosignatoryModificationDTO.ts +++ b/src/infrastructure/model/namespaceExpiryReceiptDTOAllOf.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,28 +25,24 @@ * Do not edit the class manually. */ -import { CosignatoryModificationActionEnum } from './cosignatoryModificationActionEnum'; -export class CosignatoryModificationDTO { - 'modificationAction': CosignatoryModificationActionEnum; - 'cosignatoryPublicKey': string; +export class NamespaceExpiryReceiptDTOAllOf { + /** + * Namespace identifier. + */ + 'artifactId': string; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - "name": "modificationAction", - "baseName": "modificationAction", - "type": "CosignatoryModificationActionEnum" - }, - { - "name": "cosignatoryPublicKey", - "baseName": "cosignatoryPublicKey", + "name": "artifactId", + "baseName": "artifactId", "type": "string" } ]; static getAttributeTypeMap() { - return CosignatoryModificationDTO.attributeTypeMap; + return NamespaceExpiryReceiptDTOAllOf.attributeTypeMap; } } diff --git a/src/infrastructure/model/namespaceIds.ts b/src/infrastructure/model/namespaceIds.ts index a1df641d16..30c8c48de4 100644 --- a/src/infrastructure/model/namespaceIds.ts +++ b/src/infrastructure/model/namespaceIds.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/namespaceInfoDTO.ts b/src/infrastructure/model/namespaceInfoDTO.ts index e5add49ddf..8b35598321 100644 --- a/src/infrastructure/model/namespaceInfoDTO.ts +++ b/src/infrastructure/model/namespaceInfoDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/namespaceMetaDTO.ts b/src/infrastructure/model/namespaceMetaDTO.ts index d06292de30..39ae9b5d2d 100644 --- a/src/infrastructure/model/namespaceMetaDTO.ts +++ b/src/infrastructure/model/namespaceMetaDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/namespaceMetadataTransactionBodyDTO.ts b/src/infrastructure/model/namespaceMetadataTransactionBodyDTO.ts index 6c6114c3a3..775a4596e4 100644 --- a/src/infrastructure/model/namespaceMetadataTransactionBodyDTO.ts +++ b/src/infrastructure/model/namespaceMetadataTransactionBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/namespaceMetadataTransactionDTO.ts b/src/infrastructure/model/namespaceMetadataTransactionDTO.ts index d96015635e..928fb9f1ff 100644 --- a/src/infrastructure/model/namespaceMetadataTransactionDTO.ts +++ b/src/infrastructure/model/namespaceMetadataTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -26,6 +26,7 @@ */ import { NamespaceMetadataTransactionBodyDTO } from './namespaceMetadataTransactionBodyDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { TransactionDTO } from './transactionDTO'; /** @@ -38,9 +39,10 @@ export class NamespaceMetadataTransactionDTO { 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -90,6 +92,11 @@ export class NamespaceMetadataTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", diff --git a/src/infrastructure/model/namespaceNameDTO.ts b/src/infrastructure/model/namespaceNameDTO.ts index 70dc5c29f3..0199052754 100644 --- a/src/infrastructure/model/namespaceNameDTO.ts +++ b/src/infrastructure/model/namespaceNameDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/namespaceRegistrationTransactionBodyDTO.ts b/src/infrastructure/model/namespaceRegistrationTransactionBodyDTO.ts index 252dc827d7..b84513060a 100644 --- a/src/infrastructure/model/namespaceRegistrationTransactionBodyDTO.ts +++ b/src/infrastructure/model/namespaceRegistrationTransactionBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,7 +28,6 @@ import { NamespaceRegistrationTypeEnum } from './namespaceRegistrationTypeEnum'; export class NamespaceRegistrationTransactionBodyDTO { - 'registrationType': NamespaceRegistrationTypeEnum; /** * Duration expressed in number of blocks. */ @@ -41,6 +40,7 @@ export class NamespaceRegistrationTransactionBodyDTO { * Namespace identifier. */ 'id': string; + 'registrationType': NamespaceRegistrationTypeEnum; /** * Namespace name. */ @@ -49,11 +49,6 @@ export class NamespaceRegistrationTransactionBodyDTO { static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "registrationType", - "baseName": "registrationType", - "type": "NamespaceRegistrationTypeEnum" - }, { "name": "duration", "baseName": "duration", @@ -69,6 +64,11 @@ export class NamespaceRegistrationTransactionBodyDTO { "baseName": "id", "type": "string" }, + { + "name": "registrationType", + "baseName": "registrationType", + "type": "NamespaceRegistrationTypeEnum" + }, { "name": "name", "baseName": "name", diff --git a/src/infrastructure/model/namespaceRegistrationTransactionDTO.ts b/src/infrastructure/model/namespaceRegistrationTransactionDTO.ts index 77719732e5..0df8c35dd9 100644 --- a/src/infrastructure/model/namespaceRegistrationTransactionDTO.ts +++ b/src/infrastructure/model/namespaceRegistrationTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,6 +27,7 @@ import { NamespaceRegistrationTransactionBodyDTO } from './namespaceRegistrationTransactionBodyDTO'; import { NamespaceRegistrationTypeEnum } from './namespaceRegistrationTypeEnum'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { TransactionDTO } from './transactionDTO'; /** @@ -39,9 +40,10 @@ export class NamespaceRegistrationTransactionDTO { 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -51,7 +53,6 @@ export class NamespaceRegistrationTransactionDTO { * Duration expressed in number of blocks. */ 'deadline': string; - 'registrationType': NamespaceRegistrationTypeEnum; /** * Duration expressed in number of blocks. */ @@ -64,6 +65,7 @@ export class NamespaceRegistrationTransactionDTO { * Namespace identifier. */ 'id': string; + 'registrationType': NamespaceRegistrationTypeEnum; /** * Namespace name. */ @@ -87,6 +89,11 @@ export class NamespaceRegistrationTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -102,11 +109,6 @@ export class NamespaceRegistrationTransactionDTO { "baseName": "deadline", "type": "string" }, - { - "name": "registrationType", - "baseName": "registrationType", - "type": "NamespaceRegistrationTypeEnum" - }, { "name": "duration", "baseName": "duration", @@ -122,6 +124,11 @@ export class NamespaceRegistrationTransactionDTO { "baseName": "id", "type": "string" }, + { + "name": "registrationType", + "baseName": "registrationType", + "type": "NamespaceRegistrationTypeEnum" + }, { "name": "name", "baseName": "name", diff --git a/src/infrastructure/model/namespaceRegistrationTypeEnum.ts b/src/infrastructure/model/namespaceRegistrationTypeEnum.ts index 1beff44b0a..5296396a68 100644 --- a/src/infrastructure/model/namespaceRegistrationTypeEnum.ts +++ b/src/infrastructure/model/namespaceRegistrationTypeEnum.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/accountOperationRestrictionModificationDTO.ts b/src/infrastructure/model/namespacesInfoDTO.ts similarity index 60% rename from src/infrastructure/model/accountOperationRestrictionModificationDTO.ts rename to src/infrastructure/model/namespacesInfoDTO.ts index 66b4d82388..f218660106 100644 --- a/src/infrastructure/model/accountOperationRestrictionModificationDTO.ts +++ b/src/infrastructure/model/namespacesInfoDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,29 +25,25 @@ * Do not edit the class manually. */ -import { AccountRestrictionModificationActionEnum } from './accountRestrictionModificationActionEnum'; -import { TransactionTypeEnum } from './transactionTypeEnum'; +import { NamespaceInfoDTO } from './namespaceInfoDTO'; -export class AccountOperationRestrictionModificationDTO { - 'modificationAction': AccountRestrictionModificationActionEnum; - 'value': TransactionTypeEnum; +export class NamespacesInfoDTO { + /** + * Array of namespaces information. + */ + 'namespaces': Array; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - "name": "modificationAction", - "baseName": "modificationAction", - "type": "AccountRestrictionModificationActionEnum" - }, - { - "name": "value", - "baseName": "value", - "type": "TransactionTypeEnum" + "name": "namespaces", + "baseName": "namespaces", + "type": "Array" } ]; static getAttributeTypeMap() { - return AccountOperationRestrictionModificationDTO.attributeTypeMap; + return NamespacesInfoDTO.attributeTypeMap; } } diff --git a/src/infrastructure/model/networkTypeDTO.ts b/src/infrastructure/model/networkTypeDTO.ts index b3c55f56cd..32d0cdf811 100644 --- a/src/infrastructure/model/networkTypeDTO.ts +++ b/src/infrastructure/model/networkTypeDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/cosignatoryModificationActionEnum.ts b/src/infrastructure/model/networkTypeEnum.ts similarity index 70% rename from src/infrastructure/model/cosignatoryModificationActionEnum.ts rename to src/infrastructure/model/networkTypeEnum.ts index 58e076efbb..74cf7fe28b 100644 --- a/src/infrastructure/model/cosignatoryModificationActionEnum.ts +++ b/src/infrastructure/model/networkTypeEnum.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,9 +27,11 @@ /** -* Type of modification: * 0 - Remove cosignatory. * 1 - Add cosignatory. +* Network type: * 0x60 (96 decimal) - Private network. * 0x90 (144 decimal) - Private test network. * 0x68 (104 decimal) - Public main network. * 0x98 (152 decimal) - Public test network. */ -export enum CosignatoryModificationActionEnum { - NUMBER_0 = 0, - NUMBER_1 = 1 +export enum NetworkTypeEnum { + NUMBER_104 = 104, + NUMBER_152 = 152, + NUMBER_96 = 96, + NUMBER_144 = 144 } diff --git a/src/infrastructure/model/nodeInfoDTO.ts b/src/infrastructure/model/nodeInfoDTO.ts index 0f77c4a7b5..e0bf5b9033 100644 --- a/src/infrastructure/model/nodeInfoDTO.ts +++ b/src/infrastructure/model/nodeInfoDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,34 +28,44 @@ import { RolesTypeEnum } from './rolesTypeEnum'; export class NodeInfoDTO { + /** + * Version of the application. + */ + 'version': number; 'publicKey': string; + 'roles': RolesTypeEnum; /** * Port used for the communication. */ 'port': number; 'networkIdentifier': number; /** - * Version of the application. + * Node friendly name. */ - 'version': number; - 'roles': RolesTypeEnum; + 'friendlyName': string; /** * Node IP address. */ 'host': string; - /** - * Node friendly name. - */ - 'friendlyName': string; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "version", + "baseName": "version", + "type": "number" + }, { "name": "publicKey", "baseName": "publicKey", "type": "string" }, + { + "name": "roles", + "baseName": "roles", + "type": "RolesTypeEnum" + }, { "name": "port", "baseName": "port", @@ -67,24 +77,14 @@ export class NodeInfoDTO { "type": "number" }, { - "name": "version", - "baseName": "version", - "type": "number" - }, - { - "name": "roles", - "baseName": "roles", - "type": "RolesTypeEnum" + "name": "friendlyName", + "baseName": "friendlyName", + "type": "string" }, { "name": "host", "baseName": "host", "type": "string" - }, - { - "name": "friendlyName", - "baseName": "friendlyName", - "type": "string" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/nodeTimeDTO.ts b/src/infrastructure/model/nodeTimeDTO.ts index 8b69368e73..dceba2da20 100644 --- a/src/infrastructure/model/nodeTimeDTO.ts +++ b/src/infrastructure/model/nodeTimeDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/receiptDTO.ts b/src/infrastructure/model/receiptDTO.ts index bf803e98a9..5bacbc7a40 100644 --- a/src/infrastructure/model/receiptDTO.ts +++ b/src/infrastructure/model/receiptDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/receiptTypeEnum.ts b/src/infrastructure/model/receiptTypeEnum.ts index af56e639ac..44cf31eb87 100644 --- a/src/infrastructure/model/receiptTypeEnum.ts +++ b/src/infrastructure/model/receiptTypeEnum.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/resolutionEntryDTO.ts b/src/infrastructure/model/resolutionEntryDTO.ts index 9e20122271..56a1368d26 100644 --- a/src/infrastructure/model/resolutionEntryDTO.ts +++ b/src/infrastructure/model/resolutionEntryDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/resolutionStatementBodyDTO.ts b/src/infrastructure/model/resolutionStatementBodyDTO.ts index a2265b1808..831445357c 100644 --- a/src/infrastructure/model/resolutionStatementBodyDTO.ts +++ b/src/infrastructure/model/resolutionStatementBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -34,7 +34,7 @@ export class ResolutionStatementBodyDTO { 'height': string; 'unresolved': any; /** - * Array of resolution entries linked to the unresolved namespaceId. It is an array instead of a single resolution entry since within one block the resolution might change for different sources due to alias related transactions. + * Array of resolution entries linked to the unresolved namespaceId. It is an array instead of a single resolution entry since within one block the resolution might change for different sources due to alias related transactions. */ 'resolutionEntries': Array; diff --git a/src/infrastructure/model/resolutionStatementDTO.ts b/src/infrastructure/model/resolutionStatementDTO.ts index a72eddf8e8..5e1706cf1a 100644 --- a/src/infrastructure/model/resolutionStatementDTO.ts +++ b/src/infrastructure/model/resolutionStatementDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,7 +28,7 @@ import { ResolutionStatementBodyDTO } from './resolutionStatementBodyDTO'; /** -* A resolution statement keeps the relation between a namespace alias used in a transaction and the real address or mosaicId. +* A resolution statement keeps the relation between a namespace alias used in a transaction and the real address or mosaicId. */ export class ResolutionStatementDTO { 'statement': ResolutionStatementBodyDTO; diff --git a/src/infrastructure/model/rolesTypeEnum.ts b/src/infrastructure/model/rolesTypeEnum.ts index 3beb003264..4aac6137da 100644 --- a/src/infrastructure/model/rolesTypeEnum.ts +++ b/src/infrastructure/model/rolesTypeEnum.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/secretLockTransactionBodyDTO.ts b/src/infrastructure/model/secretLockTransactionBodyDTO.ts index f6607ba19c..ad1b29fd92 100644 --- a/src/infrastructure/model/secretLockTransactionBodyDTO.ts +++ b/src/infrastructure/model/secretLockTransactionBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,20 +28,20 @@ import { LockHashAlgorithmEnum } from './lockHashAlgorithmEnum'; export class SecretLockTransactionBodyDTO { + 'secret': string; /** - * Duration expressed in number of blocks. - */ - 'duration': string; - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. */ 'mosaicId': string; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). */ 'amount': string; + /** + * Duration expressed in number of blocks. + */ + 'duration': string; 'hashAlgorithm': LockHashAlgorithmEnum; - 'secret': string; /** * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. */ @@ -51,8 +51,8 @@ export class SecretLockTransactionBodyDTO { static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - "name": "duration", - "baseName": "duration", + "name": "secret", + "baseName": "secret", "type": "string" }, { @@ -65,16 +65,16 @@ export class SecretLockTransactionBodyDTO { "baseName": "amount", "type": "string" }, + { + "name": "duration", + "baseName": "duration", + "type": "string" + }, { "name": "hashAlgorithm", "baseName": "hashAlgorithm", "type": "LockHashAlgorithmEnum" }, - { - "name": "secret", - "baseName": "secret", - "type": "string" - }, { "name": "recipientAddress", "baseName": "recipientAddress", diff --git a/src/infrastructure/model/secretLockTransactionDTO.ts b/src/infrastructure/model/secretLockTransactionDTO.ts index 820ead5247..0e1adb4175 100644 --- a/src/infrastructure/model/secretLockTransactionDTO.ts +++ b/src/infrastructure/model/secretLockTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -26,6 +26,7 @@ */ import { LockHashAlgorithmEnum } from './lockHashAlgorithmEnum'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { SecretLockTransactionBodyDTO } from './secretLockTransactionBodyDTO'; import { TransactionDTO } from './transactionDTO'; @@ -39,9 +40,10 @@ export class SecretLockTransactionDTO { 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -51,20 +53,20 @@ export class SecretLockTransactionDTO { * Duration expressed in number of blocks. */ 'deadline': string; + 'secret': string; /** - * Duration expressed in number of blocks. - */ - 'duration': string; - /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. */ 'mosaicId': string; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). */ 'amount': string; + /** + * Duration expressed in number of blocks. + */ + 'duration': string; 'hashAlgorithm': LockHashAlgorithmEnum; - 'secret': string; /** * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. */ @@ -88,6 +90,11 @@ export class SecretLockTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -104,8 +111,8 @@ export class SecretLockTransactionDTO { "type": "string" }, { - "name": "duration", - "baseName": "duration", + "name": "secret", + "baseName": "secret", "type": "string" }, { @@ -118,16 +125,16 @@ export class SecretLockTransactionDTO { "baseName": "amount", "type": "string" }, + { + "name": "duration", + "baseName": "duration", + "type": "string" + }, { "name": "hashAlgorithm", "baseName": "hashAlgorithm", "type": "LockHashAlgorithmEnum" }, - { - "name": "secret", - "baseName": "secret", - "type": "string" - }, { "name": "recipientAddress", "baseName": "recipientAddress", diff --git a/src/infrastructure/model/secretProofTransactionBodyDTO.ts b/src/infrastructure/model/secretProofTransactionBodyDTO.ts index f0aa4691b0..89c727fb16 100644 --- a/src/infrastructure/model/secretProofTransactionBodyDTO.ts +++ b/src/infrastructure/model/secretProofTransactionBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,8 +28,8 @@ import { LockHashAlgorithmEnum } from './lockHashAlgorithmEnum'; export class SecretProofTransactionBodyDTO { - 'hashAlgorithm': LockHashAlgorithmEnum; 'secret': string; + 'hashAlgorithm': LockHashAlgorithmEnum; /** * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. */ @@ -42,16 +42,16 @@ export class SecretProofTransactionBodyDTO { static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "hashAlgorithm", - "baseName": "hashAlgorithm", - "type": "LockHashAlgorithmEnum" - }, { "name": "secret", "baseName": "secret", "type": "string" }, + { + "name": "hashAlgorithm", + "baseName": "hashAlgorithm", + "type": "LockHashAlgorithmEnum" + }, { "name": "recipientAddress", "baseName": "recipientAddress", diff --git a/src/infrastructure/model/secretProofTransactionDTO.ts b/src/infrastructure/model/secretProofTransactionDTO.ts index 1f669dfa00..0e4a43bb1d 100644 --- a/src/infrastructure/model/secretProofTransactionDTO.ts +++ b/src/infrastructure/model/secretProofTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -26,6 +26,7 @@ */ import { LockHashAlgorithmEnum } from './lockHashAlgorithmEnum'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { SecretProofTransactionBodyDTO } from './secretProofTransactionBodyDTO'; import { TransactionDTO } from './transactionDTO'; @@ -39,9 +40,10 @@ export class SecretProofTransactionDTO { 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -51,8 +53,8 @@ export class SecretProofTransactionDTO { * Duration expressed in number of blocks. */ 'deadline': string; - 'hashAlgorithm': LockHashAlgorithmEnum; 'secret': string; + 'hashAlgorithm': LockHashAlgorithmEnum; /** * Address decoded. If the bit 0 of byte 0 is not set (like in 0x90), then it is a regular address. Else (e.g. 0x91) it represents a namespace id which starts at byte 1. */ @@ -80,6 +82,11 @@ export class SecretProofTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -95,16 +102,16 @@ export class SecretProofTransactionDTO { "baseName": "deadline", "type": "string" }, - { - "name": "hashAlgorithm", - "baseName": "hashAlgorithm", - "type": "LockHashAlgorithmEnum" - }, { "name": "secret", "baseName": "secret", "type": "string" }, + { + "name": "hashAlgorithm", + "baseName": "hashAlgorithm", + "type": "LockHashAlgorithmEnum" + }, { "name": "recipientAddress", "baseName": "recipientAddress", diff --git a/src/infrastructure/model/serverDTO.ts b/src/infrastructure/model/serverDTO.ts index 6ca3ec34c3..26001233ad 100644 --- a/src/infrastructure/model/serverDTO.ts +++ b/src/infrastructure/model/serverDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,18 +25,29 @@ * Do not edit the class manually. */ -import { ServerInfoDTO } from './serverInfoDTO'; export class ServerDTO { - 'serverInfo': ServerInfoDTO; + /** + * catapult-rest component version. + */ + 'restVersion': string; + /** + * catapult-sdk component version. + */ + 'sdkVersion': string; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - "name": "serverInfo", - "baseName": "serverInfo", - "type": "ServerInfoDTO" + "name": "restVersion", + "baseName": "restVersion", + "type": "string" + }, + { + "name": "sdkVersion", + "baseName": "sdkVersion", + "type": "string" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/serverInfoDTO.ts b/src/infrastructure/model/serverInfoDTO.ts index 7477cdec40..e36d184b4b 100644 --- a/src/infrastructure/model/serverInfoDTO.ts +++ b/src/infrastructure/model/serverInfoDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,29 +25,18 @@ * Do not edit the class manually. */ +import { ServerDTO } from './serverDTO'; export class ServerInfoDTO { - /** - * catapult-rest component version. - */ - 'restVersion': string; - /** - * catapult-sdk component version. - */ - 'sdkVersion': string; + 'serverInfo': ServerDTO; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - "name": "restVersion", - "baseName": "restVersion", - "type": "string" - }, - { - "name": "sdkVersion", - "baseName": "sdkVersion", - "type": "string" + "name": "serverInfo", + "baseName": "serverInfo", + "type": "ServerDTO" } ]; static getAttributeTypeMap() { diff --git a/src/infrastructure/model/sourceDTO.ts b/src/infrastructure/model/sourceDTO.ts index 5a0da10f50..d9cc6fa741 100644 --- a/src/infrastructure/model/sourceDTO.ts +++ b/src/infrastructure/model/sourceDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -35,7 +35,7 @@ export class SourceDTO { */ 'primaryId': number; /** - * Transaction index inside within the aggregate transaction. If the transaction is not an inner transaction, then the secondary id is set to 0. + * Transaction index inside within the aggregate transaction. If the transaction is not an inner transaction, then the secondary id is set to 0. */ 'secondaryId': number; diff --git a/src/infrastructure/model/statementsDTO.ts b/src/infrastructure/model/statementsDTO.ts index 19826a445c..ef5c82fc34 100644 --- a/src/infrastructure/model/statementsDTO.ts +++ b/src/infrastructure/model/statementsDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/storageInfoDTO.ts b/src/infrastructure/model/storageInfoDTO.ts index 80d9c34e30..342f15c8f3 100644 --- a/src/infrastructure/model/storageInfoDTO.ts +++ b/src/infrastructure/model/storageInfoDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/transactionBodyDTO.ts b/src/infrastructure/model/transactionBodyDTO.ts index 0c1e60c8dc..9719359902 100644 --- a/src/infrastructure/model/transactionBodyDTO.ts +++ b/src/infrastructure/model/transactionBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/transactionDTO.ts b/src/infrastructure/model/transactionDTO.ts index a7b021d308..60fffdc811 100644 --- a/src/infrastructure/model/transactionDTO.ts +++ b/src/infrastructure/model/transactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -26,6 +26,7 @@ */ import { EntityDTO } from './entityDTO'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { TransactionBodyDTO } from './transactionBodyDTO'; import { VerifiableEntityDTO } from './verifiableEntityDTO'; @@ -36,9 +37,10 @@ export class TransactionDTO { 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -67,6 +69,11 @@ export class TransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", diff --git a/src/infrastructure/model/transactionHashes.ts b/src/infrastructure/model/transactionHashes.ts index 01575458a1..fa2a5781cb 100644 --- a/src/infrastructure/model/transactionHashes.ts +++ b/src/infrastructure/model/transactionHashes.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/transactionIds.ts b/src/infrastructure/model/transactionIds.ts index 8b5d3b430a..8e3f939a37 100644 --- a/src/infrastructure/model/transactionIds.ts +++ b/src/infrastructure/model/transactionIds.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,7 +28,7 @@ export class TransactionIds { /** - * Array of transaction ids. + * Array of transaction identifiers. */ 'transactionIds'?: Array; diff --git a/src/infrastructure/model/transactionInfoDTO.ts b/src/infrastructure/model/transactionInfoDTO.ts index bdd38fcae1..97755b450a 100644 --- a/src/infrastructure/model/transactionInfoDTO.ts +++ b/src/infrastructure/model/transactionInfoDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/transactionMetaDTO.ts b/src/infrastructure/model/transactionMetaDTO.ts index d2db983cba..2b94185fd7 100644 --- a/src/infrastructure/model/transactionMetaDTO.ts +++ b/src/infrastructure/model/transactionMetaDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/transactionPayload.ts b/src/infrastructure/model/transactionPayload.ts index ad924c23f8..f48e39f7e4 100644 --- a/src/infrastructure/model/transactionPayload.ts +++ b/src/infrastructure/model/transactionPayload.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/transactionStatementBodyDTO.ts b/src/infrastructure/model/transactionStatementBodyDTO.ts index eff40b8084..5a27ffa22c 100644 --- a/src/infrastructure/model/transactionStatementBodyDTO.ts +++ b/src/infrastructure/model/transactionStatementBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/transactionStatementDTO.ts b/src/infrastructure/model/transactionStatementDTO.ts index d67ec877d7..ac293c02b9 100644 --- a/src/infrastructure/model/transactionStatementDTO.ts +++ b/src/infrastructure/model/transactionStatementDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/transactionStatusDTO.ts b/src/infrastructure/model/transactionStatusDTO.ts index 2175477485..04b1f3eba7 100644 --- a/src/infrastructure/model/transactionStatusDTO.ts +++ b/src/infrastructure/model/transactionStatusDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/transactionTypeEnum.ts b/src/infrastructure/model/transactionTypeEnum.ts index 7ede0e278a..2a49d78b67 100644 --- a/src/infrastructure/model/transactionTypeEnum.ts +++ b/src/infrastructure/model/transactionTypeEnum.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/model/transferTransactionBodyDTO.ts b/src/infrastructure/model/transferTransactionBodyDTO.ts index ec7bd7080f..91ee668752 100644 --- a/src/infrastructure/model/transferTransactionBodyDTO.ts +++ b/src/infrastructure/model/transferTransactionBodyDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -26,7 +26,7 @@ */ import { MessageDTO } from './messageDTO'; -import { Mosaic } from './mosaic'; +import { UnresolvedMosaic } from './unresolvedMosaic'; export class TransferTransactionBodyDTO { /** @@ -34,9 +34,9 @@ export class TransferTransactionBodyDTO { */ 'recipientAddress': string; /** - * Array of mosaics sent to the recipient. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of a instead of a mosaicId corresponds to a mosaicId. + * Array of mosaics sent to the recipient. */ - 'mosaics': Array; + 'mosaics': Array; 'message': MessageDTO; static discriminator: string | undefined = undefined; @@ -50,7 +50,7 @@ export class TransferTransactionBodyDTO { { "name": "mosaics", "baseName": "mosaics", - "type": "Array" + "type": "Array" }, { "name": "message", diff --git a/src/infrastructure/model/transferTransactionDTO.ts b/src/infrastructure/model/transferTransactionDTO.ts index 6d1095dd8a..fd1ed28761 100644 --- a/src/infrastructure/model/transferTransactionDTO.ts +++ b/src/infrastructure/model/transferTransactionDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -26,9 +26,10 @@ */ import { MessageDTO } from './messageDTO'; -import { Mosaic } from './mosaic'; +import { NetworkTypeEnum } from './networkTypeEnum'; import { TransactionDTO } from './transactionDTO'; import { TransferTransactionBodyDTO } from './transferTransactionBodyDTO'; +import { UnresolvedMosaic } from './unresolvedMosaic'; /** * Transaction to transfer mosaics and a message to another account. @@ -40,9 +41,10 @@ export class TransferTransactionDTO { 'signature': string; 'signerPublicKey': string; /** - * Entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. + * Entity version. */ 'version': number; + 'network': NetworkTypeEnum; 'type': number; /** * Absolute amount. An amount of 123456789 (absolute) for a mosaic with divisibility 6 means 123.456789 (relative). @@ -57,9 +59,9 @@ export class TransferTransactionDTO { */ 'recipientAddress': string; /** - * Array of mosaics sent to the recipient. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of a instead of a mosaicId corresponds to a mosaicId. + * Array of mosaics sent to the recipient. */ - 'mosaics': Array; + 'mosaics': Array; 'message': MessageDTO; static discriminator: string | undefined = undefined; @@ -80,6 +82,11 @@ export class TransferTransactionDTO { "baseName": "version", "type": "number" }, + { + "name": "network", + "baseName": "network", + "type": "NetworkTypeEnum" + }, { "name": "type", "baseName": "type", @@ -103,7 +110,7 @@ export class TransferTransactionDTO { { "name": "mosaics", "baseName": "mosaics", - "type": "Array" + "type": "Array" }, { "name": "message", diff --git a/src/infrastructure/model/unresolvedMosaic.ts b/src/infrastructure/model/unresolvedMosaic.ts index 10947f3525..cce9479c2b 100644 --- a/src/infrastructure/model/unresolvedMosaic.ts +++ b/src/infrastructure/model/unresolvedMosaic.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,7 +28,7 @@ export class UnresolvedMosaic { /** - * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. + * Mosaic identifier. If the most significant bit of byte 0 is set, a namespaceId (alias) is used instead of the real mosaic identifier. */ 'id': string; /** diff --git a/src/infrastructure/model/verifiableEntityDTO.ts b/src/infrastructure/model/verifiableEntityDTO.ts index db424ee6b9..240e6f35b2 100644 --- a/src/infrastructure/model/verifiableEntityDTO.ts +++ b/src/infrastructure/model/verifiableEntityDTO.ts @@ -17,7 +17,7 @@ * Catapult REST Endpoints * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: 0.7.19 + * The version of the OpenAPI document: 0.7.21 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/infrastructure/transaction/CreateTransactionFromDTO.ts b/src/infrastructure/transaction/CreateTransactionFromDTO.ts index 768c803cbf..ea6e1802c2 100644 --- a/src/infrastructure/transaction/CreateTransactionFromDTO.ts +++ b/src/infrastructure/transaction/CreateTransactionFromDTO.ts @@ -31,7 +31,6 @@ import { AccountLinkTransaction } from '../../model/transaction/AccountLinkTrans import { AccountMetadataTransaction } from '../../model/transaction/AccountMetadataTransaction'; import {AccountMosaicRestrictionTransaction} from '../../model/transaction/AccountMosaicRestrictionTransaction'; import {AccountOperationRestrictionTransaction} from '../../model/transaction/AccountOperationRestrictionTransaction'; -import {AccountRestrictionModification} from '../../model/transaction/AccountRestrictionModification'; import {AddressAliasTransaction} from '../../model/transaction/AddressAliasTransaction'; import {AggregateTransaction} from '../../model/transaction/AggregateTransaction'; import {AggregateTransactionCosignature} from '../../model/transaction/AggregateTransactionCosignature'; @@ -45,7 +44,6 @@ import { MosaicGlobalRestrictionTransaction } from '../../model/transaction/Mosa import { MosaicMetadataTransaction } from '../../model/transaction/MosaicMetadataTransaction'; import {MosaicSupplyChangeTransaction} from '../../model/transaction/MosaicSupplyChangeTransaction'; import {MultisigAccountModificationTransaction} from '../../model/transaction/MultisigAccountModificationTransaction'; -import {MultisigCosignatoryModification} from '../../model/transaction/MultisigCosignatoryModification'; import { NamespaceMetadataTransaction } from '../../model/transaction/NamespaceMetadataTransaction'; import {NamespaceRegistrationTransaction} from '../../model/transaction/NamespaceRegistrationTransaction'; import {SecretLockTransaction} from '../../model/transaction/SecretLockTransaction'; @@ -80,9 +78,9 @@ export const CreateTransactionFromDTO = (transactionDTO): Transaction => { return CreateStandaloneTransactionFromDTO(innerTransactionDTO.transaction, aggregateTransactionInfo); }); return new AggregateTransaction( - extractNetworkType(transactionDTO.transaction.version), + transactionDTO.transaction.network, transactionDTO.transaction.type, - extractTransactionVersion(transactionDTO.transaction.version), + transactionDTO.transaction.version, Deadline.createFromDTO(transactionDTO.transaction.deadline), UInt64.fromNumericString(transactionDTO.transaction.maxFee || '0'), innerTransactions, @@ -91,11 +89,11 @@ export const CreateTransactionFromDTO = (transactionDTO): Transaction => { return new AggregateTransactionCosignature( aggregateCosignatureDTO.signature, PublicAccount.createFromPublicKey(aggregateCosignatureDTO.signerPublicKey, - extractNetworkType(transactionDTO.transaction.version))); + transactionDTO.transaction.network)); }) : [], transactionDTO.transaction.signature, transactionDTO.transaction.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.transaction.signerPublicKey, - extractNetworkType(transactionDTO.transaction.version)) : undefined, + transactionDTO.transaction.network) : undefined, transactionDTO.meta ? new TransactionInfo( UInt64.fromNumericString(transactionDTO.meta.height), transactionDTO.meta.index, @@ -127,8 +125,8 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr if (transactionDTO.type === TransactionType.TRANSFER) { return new TransferTransaction( - extractNetworkType(transactionDTO.version), - extractTransactionVersion(transactionDTO.version), + transactionDTO.network, + transactionDTO.version, Deadline.createFromDTO(transactionDTO.deadline), UInt64.fromNumericString(transactionDTO.maxFee || '0'), extractRecipient(transactionDTO.recipientAddress), @@ -136,13 +134,13 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr extractMessage(transactionDTO.message !== undefined ? transactionDTO.message : undefined), transactionDTO.signature, transactionDTO.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey, - extractNetworkType(transactionDTO.version)) : undefined, + transactionDTO.network) : undefined, transactionInfo, ); } else if (transactionDTO.type === TransactionType.REGISTER_NAMESPACE) { return new NamespaceRegistrationTransaction( - extractNetworkType(transactionDTO.version), - extractTransactionVersion(transactionDTO.version), + transactionDTO.network, + transactionDTO.version, Deadline.createFromDTO(transactionDTO.deadline), UInt64.fromNumericString(transactionDTO.maxFee || '0'), transactionDTO.registrationType, @@ -152,13 +150,13 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr transactionDTO.registrationType === 1 ? NamespaceId.createFromEncoded(transactionDTO.parentId) : undefined, transactionDTO.signature, transactionDTO.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey, - extractNetworkType(transactionDTO.version)) : undefined, + transactionDTO.network) : undefined, transactionInfo, ); } else if (transactionDTO.type === TransactionType.MOSAIC_DEFINITION) { return new MosaicDefinitionTransaction( - extractNetworkType(transactionDTO.version), - extractTransactionVersion(transactionDTO.version), + transactionDTO.network, + transactionDTO.version, Deadline.createFromDTO(transactionDTO.deadline), UInt64.fromNumericString(transactionDTO.maxFee || '0'), transactionDTO.nonce, @@ -168,13 +166,13 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr UInt64.fromNumericString(transactionDTO.duration), transactionDTO.signature, transactionDTO.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey, - extractNetworkType(transactionDTO.version)) : undefined, + transactionDTO.network) : undefined, transactionInfo, ); } else if (transactionDTO.type === TransactionType.MOSAIC_SUPPLY_CHANGE) { return new MosaicSupplyChangeTransaction( - extractNetworkType(transactionDTO.version), - extractTransactionVersion(transactionDTO.version), + transactionDTO.network, + transactionDTO.version, Deadline.createFromDTO(transactionDTO.deadline), UInt64.fromNumericString(transactionDTO.maxFee || '0'), new MosaicId(transactionDTO.mosaicId), @@ -182,31 +180,31 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr UInt64.fromNumericString(transactionDTO.delta), transactionDTO.signature, transactionDTO.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey, - extractNetworkType(transactionDTO.version)) : undefined, + transactionDTO.network) : undefined, transactionInfo, ); } else if (transactionDTO.type === TransactionType.MODIFY_MULTISIG_ACCOUNT) { return new MultisigAccountModificationTransaction( - extractNetworkType(transactionDTO.version), - extractTransactionVersion(transactionDTO.version), + transactionDTO.network, + transactionDTO.version, Deadline.createFromDTO(transactionDTO.deadline), UInt64.fromNumericString(transactionDTO.maxFee || '0'), transactionDTO.minApprovalDelta, transactionDTO.minRemovalDelta, transactionDTO.publicKeyAdditions ? transactionDTO.publicKeyAdditions.map((addition) => - PublicAccount.createFromPublicKey(addition, extractNetworkType(transactionDTO.version))) : [], + PublicAccount.createFromPublicKey(addition, transactionDTO.network)) : [], transactionDTO.publicKeyDeletions ? transactionDTO.publicKeyDeletions.map((deletion) => - PublicAccount.createFromPublicKey(deletion, extractNetworkType(transactionDTO.version))) : [], + PublicAccount.createFromPublicKey(deletion, transactionDTO.network)) : [], transactionDTO.signature, transactionDTO.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey, - extractNetworkType(transactionDTO.version)) : undefined, + transactionDTO.network) : undefined, transactionInfo, ); } else if (transactionDTO.type === TransactionType.LOCK) { - const networkType = extractNetworkType(transactionDTO.version); + const networkType = transactionDTO.network; return new LockFundsTransaction( networkType, - extractTransactionVersion(transactionDTO.version), + transactionDTO.version, Deadline.createFromDTO(transactionDTO.deadline), UInt64.fromNumericString(transactionDTO.maxFee || '0'), new Mosaic(new MosaicId(transactionDTO.mosaicId), UInt64.fromNumericString(transactionDTO.amount)), @@ -220,8 +218,8 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr const recipientAddress = transactionDTO.recipientAddress; const mosaicId = UnresolvedMapping.toUnresolvedMosaic(transactionDTO.mosaicId); return new SecretLockTransaction( - extractNetworkType(transactionDTO.version), - extractTransactionVersion(transactionDTO.version), + transactionDTO.network, + transactionDTO.version, Deadline.createFromDTO(transactionDTO.deadline), UInt64.fromNumericString(transactionDTO.maxFee || '0'), new Mosaic(mosaicId, UInt64.fromNumericString(transactionDTO.amount)), @@ -231,14 +229,14 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr extractRecipient(recipientAddress), transactionDTO.signature, transactionDTO.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey, - extractNetworkType(transactionDTO.version)) : undefined, + transactionDTO.network) : undefined, transactionInfo, ); } else if (transactionDTO.type === TransactionType.SECRET_PROOF) { const recipientAddress = transactionDTO.recipientAddress; return new SecretProofTransaction( - extractNetworkType(transactionDTO.version), - extractTransactionVersion(transactionDTO.version), + transactionDTO.network, + transactionDTO.version, Deadline.createFromDTO(transactionDTO.deadline), UInt64.fromNumericString(transactionDTO.maxFee || '0'), transactionDTO.hashAlgorithm, @@ -247,13 +245,13 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr transactionDTO.proof, transactionDTO.signature, transactionDTO.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey, - extractNetworkType(transactionDTO.version)) : undefined, + transactionDTO.network) : undefined, transactionInfo, ); } else if (transactionDTO.type === TransactionType.MOSAIC_ALIAS) { return new MosaicAliasTransaction( - extractNetworkType(transactionDTO.version), - extractTransactionVersion(transactionDTO.version), + transactionDTO.network, + transactionDTO.version, Deadline.createFromDTO(transactionDTO.deadline), UInt64.fromNumericString(transactionDTO.maxFee || '0'), transactionDTO.aliasAction, @@ -261,13 +259,13 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr new MosaicId(transactionDTO.mosaicId), transactionDTO.signature, transactionDTO.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey, - extractNetworkType(transactionDTO.version)) : undefined, + transactionDTO.network) : undefined, transactionInfo, ); } else if (transactionDTO.type === TransactionType.ADDRESS_ALIAS) { return new AddressAliasTransaction( - extractNetworkType(transactionDTO.version), - extractTransactionVersion(transactionDTO.version), + transactionDTO.network, + transactionDTO.version, Deadline.createFromDTO(transactionDTO.deadline), UInt64.fromNumericString(transactionDTO.maxFee || '0'), transactionDTO.aliasAction, @@ -275,13 +273,13 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr extractRecipient(transactionDTO.address) as Address, transactionDTO.signature, transactionDTO.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey, - extractNetworkType(transactionDTO.version)) : undefined, + transactionDTO.network) : undefined, transactionInfo, ); } else if (transactionDTO.type === TransactionType.ACCOUNT_RESTRICTION_ADDRESS) { return new AccountAddressRestrictionTransaction( - extractNetworkType(transactionDTO.version), - extractTransactionVersion(transactionDTO.version), + transactionDTO.network, + transactionDTO.version, Deadline.createFromDTO(transactionDTO.deadline), UInt64.fromNumericString(transactionDTO.maxFee || '0'), transactionDTO.restrictionFlags, @@ -291,13 +289,13 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr extractRecipient(deletion)) : [], transactionDTO.signature, transactionDTO.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey, - extractNetworkType(transactionDTO.version)) : undefined, + transactionDTO.network) : undefined, transactionInfo, ); } else if (transactionDTO.type === TransactionType.ACCOUNT_RESTRICTION_OPERATION) { return new AccountOperationRestrictionTransaction( - extractNetworkType(transactionDTO.version), - extractTransactionVersion(transactionDTO.version), + transactionDTO.network, + transactionDTO.version, Deadline.createFromDTO(transactionDTO.deadline), UInt64.fromNumericString(transactionDTO.maxFee || '0'), transactionDTO.restrictionFlags, @@ -305,13 +303,13 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr transactionDTO.restrictionDeletions ? transactionDTO.restrictionDeletions : [], transactionDTO.signature, transactionDTO.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey, - extractNetworkType(transactionDTO.version)) : undefined, + transactionDTO.network) : undefined, transactionInfo, ); } else if (transactionDTO.type === TransactionType.ACCOUNT_RESTRICTION_MOSAIC) { return new AccountMosaicRestrictionTransaction( - extractNetworkType(transactionDTO.version), - extractTransactionVersion(transactionDTO.version), + transactionDTO.network, + transactionDTO.version, Deadline.createFromDTO(transactionDTO.deadline), UInt64.fromNumericString(transactionDTO.maxFee || '0'), transactionDTO.restrictionFlags, @@ -321,26 +319,26 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr UnresolvedMapping.toUnresolvedMosaic(deletion)) : [], transactionDTO.signature, transactionDTO.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey, - extractNetworkType(transactionDTO.version)) : undefined, + transactionDTO.network) : undefined, transactionInfo, ); } else if (transactionDTO.type === TransactionType.LINK_ACCOUNT) { return new AccountLinkTransaction( - extractNetworkType(transactionDTO.version), - extractTransactionVersion(transactionDTO.version), + transactionDTO.network, + transactionDTO.version, Deadline.createFromDTO(transactionDTO.deadline), UInt64.fromNumericString(transactionDTO.maxFee || '0'), transactionDTO.remotePublicKey, transactionDTO.linkAction, transactionDTO.signature, transactionDTO.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey, - extractNetworkType(transactionDTO.version)) : undefined, + transactionDTO.network) : undefined, transactionInfo, ); } else if (transactionDTO.type === TransactionType.MOSAIC_GLOBAL_RESTRICTION) { return new MosaicGlobalRestrictionTransaction( - extractNetworkType(transactionDTO.version), - extractTransactionVersion(transactionDTO.version), + transactionDTO.network, + transactionDTO.version, Deadline.createFromDTO(transactionDTO.deadline), UInt64.fromNumericString(transactionDTO.maxFee || '0'), UnresolvedMapping.toUnresolvedMosaic(transactionDTO.mosaicId), @@ -352,14 +350,13 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr transactionDTO.newRestrictionType, transactionDTO.signature, transactionDTO.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey, - extractNetworkType(transactionDTO.version)) : undefined, + transactionDTO.network) : undefined, transactionInfo, ); } else if (transactionDTO.type === TransactionType.MOSAIC_ADDRESS_RESTRICTION) { - const targetAddress = transactionDTO.targetAddress; return new MosaicAddressRestrictionTransaction( - extractNetworkType(transactionDTO.version), - extractTransactionVersion(transactionDTO.version), + transactionDTO.network, + transactionDTO.version, Deadline.createFromDTO(transactionDTO.deadline), UInt64.fromNumericString(transactionDTO.maxFee || '0'), UnresolvedMapping.toUnresolvedMosaic(transactionDTO.mosaicId), @@ -369,13 +366,13 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr UInt64.fromNumericString(transactionDTO.newRestrictionValue), transactionDTO.signature, transactionDTO.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey, - extractNetworkType(transactionDTO.version)) : undefined, + transactionDTO.network) : undefined, transactionInfo, ); } else if (transactionDTO.type === TransactionType.ACCOUNT_METADATA_TRANSACTION) { return new AccountMetadataTransaction( - extractNetworkType(transactionDTO.version), - extractTransactionVersion(transactionDTO.version), + transactionDTO.network, + transactionDTO.version, Deadline.createFromDTO(transactionDTO.deadline), UInt64.fromNumericString(transactionDTO.maxFee || '0'), transactionDTO.targetPublicKey, @@ -384,13 +381,13 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr convert.decodeHex(transactionDTO.value), transactionDTO.signature, transactionDTO.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey, - extractNetworkType(transactionDTO.version)) : undefined, + transactionDTO.network) : undefined, transactionInfo, ); } else if (transactionDTO.type === TransactionType.MOSAIC_METADATA_TRANSACTION) { return new MosaicMetadataTransaction( - extractNetworkType(transactionDTO.version), - extractTransactionVersion(transactionDTO.version), + transactionDTO.network, + transactionDTO.version, Deadline.createFromDTO(transactionDTO.deadline), UInt64.fromNumericString(transactionDTO.maxFee || '0'), transactionDTO.targetPublicKey, @@ -400,13 +397,13 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr convert.decodeHex(transactionDTO.value), transactionDTO.signature, transactionDTO.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey, - extractNetworkType(transactionDTO.version)) : undefined, + transactionDTO.network) : undefined, transactionInfo, ); } else if (transactionDTO.type === TransactionType.NAMESPACE_METADATA_TRANSACTION) { return new NamespaceMetadataTransaction( - extractNetworkType(transactionDTO.version), - extractTransactionVersion(transactionDTO.version), + transactionDTO.network, + transactionDTO.version, Deadline.createFromDTO(transactionDTO.deadline), UInt64.fromNumericString(transactionDTO.maxFee || '0'), transactionDTO.targetPublicKey, @@ -416,31 +413,13 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr convert.decodeHex(transactionDTO.value), transactionDTO.signature, transactionDTO.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey, - extractNetworkType(transactionDTO.version)) : undefined, + transactionDTO.network) : undefined, transactionInfo, ); } throw new Error('Unimplemented transaction with type ' + transactionDTO.type); }; -export const extractNetworkType = (version: number): NetworkType => { - const networkType = parseInt(version.toString(16).substr(0, 2), 16); - if (networkType === NetworkType.MAIN_NET) { - return NetworkType.MAIN_NET; - } else if (networkType === NetworkType.TEST_NET) { - return NetworkType.TEST_NET; - } else if (networkType === NetworkType.MIJIN) { - return NetworkType.MIJIN; - } else if (networkType === NetworkType.MIJIN_TEST) { - return NetworkType.MIJIN_TEST; - } - throw new Error('Unimplemented network type'); -}; - -export const extractTransactionVersion = (version: number): number => { - return parseInt(version.toString(16).substr(2, 2), 16); -}; - /** * Extract recipientAddress value from encoded hexadecimal notation. * diff --git a/src/model/account/Address.ts b/src/model/account/Address.ts index 9dc7d7fd78..ca7ff14fc3 100644 --- a/src/model/account/Address.ts +++ b/src/model/account/Address.ts @@ -13,10 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Convert, RawAddress, RawArray } from '../../core/format'; +import { Convert, RawAddress } from '../../core/format'; import { NetworkType } from '../blockchain/NetworkType'; -import { SHA3Hasher, SignSchema } from "../../core/crypto"; -import { keccak256, sha3_256 } from "js-sha3"; /** * The address structure describes an address with its network @@ -75,7 +73,6 @@ export class Address { .addressToString(Convert.hexToUint8(encoded))); } - /** * Determines the validity of an raw address string. * @param {string} rawAddress The raw address string. Expected format SCHCZBZ6QVJAHGJTKYVPW5FBSO2IXXJQBPV5XE6P diff --git a/src/model/metadata/MetadataEntry.ts b/src/model/metadata/MetadataEntry.ts index c1dc0317ba..e740b301b2 100644 --- a/src/model/metadata/MetadataEntry.ts +++ b/src/model/metadata/MetadataEntry.ts @@ -32,7 +32,6 @@ export class MetadataEntry { * @param {string} targetPublicKey - The metadata target public key * @param {UInt64} scopedMetadataKey - The key scoped to source, target and type * @param {MetadatType} metadataType - The metadata type (Account | Mosaic | Namespace) - * @param {number} valueSize - The metadata value size * @param {string} value - The metadata value * @param {MosaicId | NamespaceId | undefined} targetId - The target mosaic or namespace identifier */ @@ -57,10 +56,6 @@ export class MetadataEntry { * The metadata type */ public readonly metadataType: MetadataType, - /** - * The metadata value size - */ - public readonly valueSize: number, /** * The metadata value */ diff --git a/src/model/receipt/BalanceChangeReceipt.ts b/src/model/receipt/BalanceChangeReceipt.ts index 3f35f42c0a..83159b621c 100644 --- a/src/model/receipt/BalanceChangeReceipt.ts +++ b/src/model/receipt/BalanceChangeReceipt.ts @@ -65,9 +65,9 @@ export class BalanceChangeReceipt extends Receipt { const buffer = new Uint8Array(52); buffer.set(GeneratorUtils.uintToBuffer(ReceiptVersion.BALANCE_CHANGE, 2)); buffer.set(GeneratorUtils.uintToBuffer(this.type, 2), 2); - buffer.set(Convert.hexToUint8(this.targetPublicAccount.publicKey), 4); - buffer.set(GeneratorUtils.uint64ToBuffer(UInt64.fromHex(this.mosaicId.toHex()).toDTO()), 36); - buffer.set(GeneratorUtils.uint64ToBuffer(UInt64.fromHex(this.amount.toHex()).toDTO()), 44); + buffer.set(GeneratorUtils.uint64ToBuffer(UInt64.fromHex(this.mosaicId.toHex()).toDTO()), 4); + buffer.set(GeneratorUtils.uint64ToBuffer(UInt64.fromHex(this.amount.toHex()).toDTO()), 12); + buffer.set(Convert.hexToUint8(this.targetPublicAccount.publicKey), 20); return buffer; } } diff --git a/src/model/receipt/BalanceTransferReceipt.ts b/src/model/receipt/BalanceTransferReceipt.ts index 83de2e960f..1442fe3e82 100644 --- a/src/model/receipt/BalanceTransferReceipt.ts +++ b/src/model/receipt/BalanceTransferReceipt.ts @@ -74,10 +74,10 @@ export class BalanceTransferReceipt extends Receipt { const buffer = new Uint8Array(52 + recipient.length); buffer.set(GeneratorUtils.uintToBuffer(ReceiptVersion.BALANCE_TRANSFER, 2)); buffer.set(GeneratorUtils.uintToBuffer(this.type, 2), 2); - buffer.set(Convert.hexToUint8(this.sender.publicKey), 4); - buffer.set(recipient, 36); - buffer.set(GeneratorUtils.uint64ToBuffer(UInt64.fromHex(this.mosaicId.toHex()).toDTO()), 36 + recipient.length); - buffer.set(GeneratorUtils.uint64ToBuffer(UInt64.fromHex(this.amount.toHex()).toDTO()), 44 + recipient.length); + buffer.set(GeneratorUtils.uint64ToBuffer(UInt64.fromHex(this.mosaicId.toHex()).toDTO()), 4); + buffer.set(GeneratorUtils.uint64ToBuffer(UInt64.fromHex(this.amount.toHex()).toDTO()), 12); + buffer.set(Convert.hexToUint8(this.sender.publicKey), 20); + buffer.set(recipient, 52); return buffer; } diff --git a/src/model/transaction/Transaction.ts b/src/model/transaction/Transaction.ts index ae59254d7e..6f1c87ac84 100644 --- a/src/model/transaction/Transaction.ts +++ b/src/model/transaction/Transaction.ts @@ -300,7 +300,7 @@ export abstract class Transaction { public toJSON() { const commonTransactionObject = { type: this.type, - networkType: this.networkType, + network: this.networkType, version: this.versionToDTO(), maxFee: this.maxFee.toString(), deadline: this.deadline.toString(), diff --git a/src/service/AggregateTransactionService.ts b/src/service/AggregateTransactionService.ts index b5e931dd64..99997f0f77 100644 --- a/src/service/AggregateTransactionService.ts +++ b/src/service/AggregateTransactionService.ts @@ -18,6 +18,7 @@ import {from as observableFrom , Observable, of as observableOf} from 'rxjs'; import { flatMap, map, mergeMap, toArray} from 'rxjs/operators'; import { TransactionMapping } from '../core/utils/TransactionMapping'; import { AccountHttp } from '../infrastructure/AccountHttp'; +import { MultisigHttp } from '../infrastructure/MultisigHttp'; import { MultisigAccountGraphInfo } from '../model/account/MultisigAccountGraphInfo'; import { AggregateTransaction } from '../model/transaction/AggregateTransaction'; import { CosignatoryModificationAction } from '../model/transaction/CosignatoryModificationAction'; @@ -33,9 +34,9 @@ export class AggregateTransactionService { /** * Constructor - * @param accountHttp + * @param multisigHttp */ - constructor(private readonly accountHttp: AccountHttp) { + constructor(private readonly multisigHttp: MultisigHttp) { } /** @@ -53,13 +54,13 @@ export class AggregateTransactionService { signers.push(signedTransaction.signerPublicKey); } return observableFrom(aggregateTransaction.innerTransactions).pipe( - mergeMap((innerTransaction) => this.accountHttp.getMultisigAccountInfo(innerTransaction.signer!.address) + mergeMap((innerTransaction) => this.multisigHttp.getMultisigAccountInfo(innerTransaction.signer!.address) .pipe( /** * For multisig account, we need to get the graph info in case it has multiple levels */ mergeMap((_) => _.minApproval !== 0 && _.minRemoval !== 0 ? - this.accountHttp.getMultisigAccountGraphInfo(_.account.address) + this.multisigHttp.getMultisigAccountGraphInfo(_.account.address) .pipe( map((graphInfo) => this.validateCosignatories(graphInfo, signers, innerTransaction)), ) : observableOf(signers.find((s) => s === _.account.publicKey ) !== undefined), diff --git a/src/service/MosaicRestrictionTransactionService.ts b/src/service/MosaicRestrictionTransactionService.ts index 4d35365e89..3838352e5a 100644 --- a/src/service/MosaicRestrictionTransactionService.ts +++ b/src/service/MosaicRestrictionTransactionService.ts @@ -16,7 +16,7 @@ import { Observable, of } from 'rxjs'; import { catchError, map, switchMap } from 'rxjs/operators'; -import { RestrictionHttp } from '../infrastructure/RestrictionHttp'; +import { RestrictionMosaicHttp } from '../infrastructure/RestrictionMosaicHttp'; import { Address } from '../model/account/Address'; import { NetworkType } from '../model/blockchain/NetworkType'; import { MosaicId } from '../model/mosaic/MosaicId'; @@ -41,7 +41,7 @@ export class MosaicRestrictionTransactionService { * Constructor * @param restrictionHttp */ - constructor(private readonly restrictionHttp: RestrictionHttp) { + constructor(private readonly restrictionHttp: RestrictionMosaicHttp) { } /** diff --git a/test/model/blockchain/BlockInfo.spec.ts b/test/model/blockchain/BlockInfo.spec.ts index 2fa0e5f777..aaa03b9352 100644 --- a/test/model/blockchain/BlockInfo.spec.ts +++ b/test/model/blockchain/BlockInfo.spec.ts @@ -38,7 +38,8 @@ describe('BlockInfo', () => { beneficiaryPublicKey: 'B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF', timestamp: new UInt64([ 0, 0 ]), type: 32768, - version: 36865, + version: 1, + network: 144, }, meta: { generationHash: '57F7DA205008026C776CB6AED843393F04CD458E0AA2D9F1D5F31A402072B2D6', @@ -48,16 +49,15 @@ describe('BlockInfo', () => { }, }; - const network = parseInt(blockDTO.block.version.toString(16).substr(0, 2), 16); const blockInfo = new BlockInfo( blockDTO.meta.hash, blockDTO.meta.generationHash, blockDTO.meta.totalFee, blockDTO.meta.numTransactions, blockDTO.block.signature, - PublicAccount.createFromPublicKey(blockDTO.block.signerPublicKey, network), - network, - parseInt(blockDTO.block.version.toString(16).substr(2, 2), 16), // Tx version + PublicAccount.createFromPublicKey(blockDTO.block.signerPublicKey, blockDTO.block.network), + blockDTO.block.network, + blockDTO.block.version, // Tx version blockDTO.block.type, blockDTO.block.height, blockDTO.block.timestamp, @@ -67,7 +67,7 @@ describe('BlockInfo', () => { blockDTO.block.blockTransactionsHash, blockDTO.block.blockReceiptsHash, blockDTO.block.stateHash, - PublicAccount.createFromPublicKey(blockDTO.block.beneficiaryPublicKey, network), + PublicAccount.createFromPublicKey(blockDTO.block.beneficiaryPublicKey, blockDTO.block.network), ); expect(blockInfo.hash).to.be.equal(blockDTO.meta.hash); @@ -76,8 +76,8 @@ describe('BlockInfo', () => { expect(blockInfo.numTransactions).to.be.equal(blockDTO.meta.numTransactions); expect(blockInfo.signature).to.be.equal(blockDTO.block.signature); expect(blockInfo.signer.publicKey).to.be.equal(blockDTO.block.signerPublicKey); - expect(blockInfo.networkType).to.be.equal(parseInt(blockDTO.block.version.toString(16).substr(0, 2), 16)); - expect(blockInfo.version).to.be.equal(parseInt(blockDTO.block.version.toString(16).substr(2, 2), 16)); + expect(blockInfo.networkType).to.be.equal(blockDTO.block.network); + expect(blockInfo.version).to.be.equal(blockDTO.block.version); expect(blockInfo.type).to.be.equal(blockDTO.block.type); deepEqual(blockInfo.height, blockDTO.block.height); deepEqual(blockInfo.timestamp, blockDTO.block.timestamp); diff --git a/test/model/metadata/Metadata.spec.ts b/test/model/metadata/Metadata.spec.ts index 4137a0c520..f4be431246 100644 --- a/test/model/metadata/Metadata.spec.ts +++ b/test/model/metadata/Metadata.spec.ts @@ -37,7 +37,6 @@ describe('Metadata', () => { scopedMetadataKey: '85BBEA6CC462B244', targetId: undefined, metadataType: 0, - valueSize: 5, value: '12345', }; const metadataDTO = { @@ -55,7 +54,6 @@ describe('Metadata', () => { metadataDTO.metadataEntry.targetPublicKey, UInt64.fromHex(metadataDTO.metadataEntry.scopedMetadataKey), metadataDTO.metadataEntry.metadataType, - metadataDTO.metadataEntry.valueSize, metadataDTO.metadataEntry.value, ), ); @@ -67,7 +65,6 @@ describe('Metadata', () => { deepEqual(metadata.metadataEntry.scopedMetadataKey, UInt64.fromHex('85BBEA6CC462B244')); deepEqual(metadata.metadataEntry.targetId, undefined); deepEqual(metadata.metadataEntry.metadataType, MetadataType.Account); - deepEqual(metadata.metadataEntry.valueSize, 5); deepEqual(metadata.metadataEntry.value, '12345'); }); }); diff --git a/test/model/metadata/MetadataEntry.spec.ts b/test/model/metadata/MetadataEntry.spec.ts index c69c77ef8f..3932f4485f 100644 --- a/test/model/metadata/MetadataEntry.spec.ts +++ b/test/model/metadata/MetadataEntry.spec.ts @@ -37,7 +37,6 @@ describe('MetadataEntry', () => { scopedMetadataKey: '85BBEA6CC462B244', targetId: undefined, metadataType: 0, - valueSize: 5, value: '12345', }; @@ -47,7 +46,6 @@ describe('MetadataEntry', () => { metadataEntryDTO.targetPublicKey, UInt64.fromHex(metadataEntryDTO.scopedMetadataKey), metadataEntryDTO.metadataType, - metadataEntryDTO.valueSize, metadataEntryDTO.value, ); @@ -57,7 +55,6 @@ describe('MetadataEntry', () => { deepEqual(metadata.scopedMetadataKey, UInt64.fromHex('85BBEA6CC462B244')); deepEqual(metadata.targetId, undefined); deepEqual(metadata.metadataType, MetadataType.Account); - deepEqual(metadata.valueSize, 5); deepEqual(metadata.value, '12345'); }); @@ -79,7 +76,6 @@ describe('MetadataEntry', () => { metadataEntryDTO.targetPublicKey, UInt64.fromHex(metadataEntryDTO.scopedMetadataKey), metadataEntryDTO.metadataType, - metadataEntryDTO.valueSize, metadataEntryDTO.value, new MosaicId(metadataEntryDTO.targetId), ); @@ -90,7 +86,6 @@ describe('MetadataEntry', () => { deepEqual(metadata.scopedMetadataKey, UInt64.fromHex('85BBEA6CC462B244')); deepEqual((metadata.targetId as MosaicId).toHex(), '85BBEA6CC462B244'); deepEqual(metadata.metadataType, MetadataType.Mosaic); - deepEqual(metadata.valueSize, 5); deepEqual(metadata.value, '12345'); }); @@ -102,7 +97,6 @@ describe('MetadataEntry', () => { scopedMetadataKey: '85BBEA6CC462B244', targetId: '85BBEA6CC462B244', metadataType: 2, - valueSize: 5, value: '12345', }; @@ -112,7 +106,6 @@ describe('MetadataEntry', () => { metadataEntryDTO.targetPublicKey, UInt64.fromHex(metadataEntryDTO.scopedMetadataKey), metadataEntryDTO.metadataType, - metadataEntryDTO.valueSize, metadataEntryDTO.value, NamespaceId.createFromEncoded(metadataEntryDTO.targetId), ); @@ -123,7 +116,6 @@ describe('MetadataEntry', () => { deepEqual(metadata.scopedMetadataKey, UInt64.fromHex('85BBEA6CC462B244')); deepEqual((metadata.targetId as NamespaceId).toHex(), '85BBEA6CC462B244'); deepEqual(metadata.metadataType, MetadataType.Namespace); - deepEqual(metadata.valueSize, 5); deepEqual(metadata.value, '12345'); }); }); diff --git a/test/model/receipt/Receipt.spec.ts b/test/model/receipt/Receipt.spec.ts index 115cab320d..d689180a17 100644 --- a/test/model/receipt/Receipt.spec.ts +++ b/test/model/receipt/Receipt.spec.ts @@ -361,6 +361,6 @@ describe('Receipt', () => { const statement = CreateStatementFromDTO(statementDTO, netWorkType); const receipt = statement.transactionStatements[0]; const hash = receipt.generateHash(); - expect(hash).to.be.equal('C2D0F6CD303912B98943BA8D0407FE24AB7103403FE11C994C485206D5123F96'); + expect(hash).to.be.equal('78E5F66EC55D1331646528F9BF7EC247C68F58E651223E7F05CBD4FBF0BF88FA'); }); }); diff --git a/test/model/transaction/AggregateTransaction.spec.ts b/test/model/transaction/AggregateTransaction.spec.ts index 25baf8c8dc..eb4c4ea872 100644 --- a/test/model/transaction/AggregateTransaction.spec.ts +++ b/test/model/transaction/AggregateTransaction.spec.ts @@ -325,12 +325,14 @@ describe('AggregateTransaction', () => { ], signerPublicKey: 'B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF', type: 16725, - version: 36865, + version: 1, + network: 144, }, }, ], type: 16705, - version: 36865, + version: 1, + network: 144, }, }; diff --git a/test/service/AggregateTransactionService.spec.ts b/test/service/AggregateTransactionService.spec.ts index 70ed80477a..ea02e713a8 100644 --- a/test/service/AggregateTransactionService.spec.ts +++ b/test/service/AggregateTransactionService.spec.ts @@ -18,7 +18,7 @@ import { expect } from 'chai'; import { ChronoUnit } from 'js-joda'; import {of as observableOf} from 'rxjs'; import {deepEqual, instance, mock, when} from 'ts-mockito'; -import { AccountHttp } from '../../src/infrastructure/AccountHttp'; +import { MultisigHttp } from '../../src/infrastructure/MultisigHttp'; import { Account } from '../../src/model/account/Account'; import { Address } from '../../src/model/account/Address'; import { MultisigAccountGraphInfo } from '../../src/model/account/MultisigAccountGraphInfo'; @@ -26,10 +26,8 @@ import { MultisigAccountInfo } from '../../src/model/account/MultisigAccountInfo import {NetworkType} from '../../src/model/blockchain/NetworkType'; import { PlainMessage } from '../../src/model/message/PlainMessage'; import { AggregateTransaction } from '../../src/model/transaction/AggregateTransaction'; -import { CosignatoryModificationAction } from '../../src/model/transaction/CosignatoryModificationAction'; import { Deadline } from '../../src/model/transaction/Deadline'; import { MultisigAccountModificationTransaction } from '../../src/model/transaction/MultisigAccountModificationTransaction'; -import { MultisigCosignatoryModification } from '../../src/model/transaction/MultisigCosignatoryModification'; import { TransferTransaction } from '../../src/model/transaction/TransferTransaction'; import { AggregateTransactionService } from '../../src/service/AggregateTransactionService'; @@ -77,7 +75,7 @@ describe('AggregateTransactionService', () => { const generationHash = '57F7DA205008026C776CB6AED843393F04CD458E0AA2D9F1D5F31A402072B2D6'; before(() => { - const mockedAccountHttp = mock(AccountHttp); + const mockedAccountHttp = mock(MultisigHttp); when(mockedAccountHttp.getMultisigAccountInfo(deepEqual(account1.address))) .thenReturn(observableOf(givenAccount1Info())); diff --git a/test/service/MetadataTransactionservice.spec.ts b/test/service/MetadataTransactionservice.spec.ts index d8b7ee9dad..f5ef326dd2 100644 --- a/test/service/MetadataTransactionservice.spec.ts +++ b/test/service/MetadataTransactionservice.spec.ts @@ -175,7 +175,6 @@ describe('MetadataTransactionService', () => { account.publicKey, key, MetadataType.Account, - 4, value, targetId), ); diff --git a/test/service/MosaicRestrictionTransactionservice.spec.ts b/test/service/MosaicRestrictionTransactionservice.spec.ts index 8a08455ef4..1ff3e2db21 100644 --- a/test/service/MosaicRestrictionTransactionservice.spec.ts +++ b/test/service/MosaicRestrictionTransactionservice.spec.ts @@ -18,7 +18,7 @@ import {expect} from 'chai'; import {of as observableOf} from 'rxjs'; import {deepEqual, instance, mock, when} from 'ts-mockito'; import { KeyGenerator } from '../../src/core/format/KeyGenerator'; -import { RestrictionHttp } from '../../src/infrastructure/RestrictionHttp'; +import { RestrictionMosaicHttp } from '../../src/infrastructure/RestrictionMosaicHttp'; import { Account } from '../../src/model/account/Account'; import {NetworkType} from '../../src/model/blockchain/NetworkType'; import { MosaicId } from '../../src/model/mosaic/MosaicId'; @@ -52,7 +52,7 @@ describe('MosaicRestrictionTransactionService', () => { mosaicId = new MosaicId('85BBEA6CC462B244'); mosaicIdWrongKey = new MosaicId('85BBEA6CC462B288'); referenceMosaicId = new MosaicId('1AB129B545561E6A'); - const mockRestrictionHttp = mock(RestrictionHttp); + const mockRestrictionHttp = mock(RestrictionMosaicHttp); when(mockRestrictionHttp .getMosaicGlobalRestriction(deepEqual(mosaicId)))