From ec3f199ee3d46fd6763c93c5a0c1dc232a58ceb5 Mon Sep 17 00:00:00 2001 From: slackve Date: Sat, 23 May 2020 19:54:19 -0500 Subject: [PATCH] update version to 0.0.5+3 --- CHANGELOG.md | 4 + README.md | 2 +- lib/imp/buffer.dart | 2 +- lib/imp/buffer/model.dart | 4 +- ...ccount_properties_transaction_buffer.dart} | 33 +++++--- .../model/aggregate_transaction_buffer.dart | 8 ++ .../model/alias_transaction_buffer.dart | 8 ++ .../model/exchange_transaction_buffer.dart | 79 +++++++++++++------ .../model/lock_funds_transaction_buffer.dart | 10 +++ .../modify_contract_transaction_buffer.dart | 15 ++++ .../modify_metadata_transaction_buffer.dart | 14 ++++ ...y_multisig_account_transaction_buffer.dart | 10 +++ .../mosaic_alias_transaction_buffer.dart | 9 +++ .../mosaic_definition_transaction_buffer.dart | 23 ++++-- ...saic_supply_change_transaction_buffer.dart | 9 +++ ...register_namespace_transaction_buffer.dart | 11 +++ .../model/secret_lock_transaction_buffer.dart | 12 +++ .../secret_proof_transaction_buffer.dart | 10 +++ .../model/transfer_transaction_buffer.dart | 29 +++++-- lib/imp/buffer/schema.dart | 12 +-- lib/src/api/api.dart | 16 ++-- lib/src/model/account.dart | 12 ++- lib/src/model/account/account_dto.dart | 1 + lib/src/model/account/account_model.dart | 1 + .../account/account_properties_type.dart | 2 +- lib/src/model/alias.dart | 2 +- lib/src/model/blockchain.dart | 2 +- lib/src/model/exchange.dart | 7 +- lib/src/model/exchange/exchange_dto.dart | 2 + lib/src/model/message.dart | 2 +- lib/src/model/mosaic.dart | 8 +- lib/src/model/mosaic/mosaic_internal.dart | 4 +- lib/src/model/multisig.dart | 4 +- lib/src/model/namespace.dart | 7 +- lib/src/model/transaction.dart | 39 ++++----- ...ransaciton_account_properties_address.dart | 1 + ...aciton_account_properties_entity_type.dart | 1 + ...transaciton_account_properties_mosaic.dart | 1 + .../transaction/transaction_aggregate.dart | 1 + .../model/transaction/transaction_alias.dart | 1 + .../transaction/transaction_lockfund.dart | 1 + .../model/transaction/transaction_model.dart | 6 +- .../model/transaction/transaction_mosaic.dart | 2 + .../transaction/transaction_multisig.dart | 1 + lib/src/model/uint64/uint64_model.dart | 2 +- pubspec.yaml | 2 +- 46 files changed, 313 insertions(+), 119 deletions(-) rename lib/imp/buffer/model/{account_properties_transaction_catapult.dart => account_properties_transaction_buffer.dart} (91%) diff --git a/CHANGELOG.md b/CHANGELOG.md index e13af0c..80d8a2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.5+3 +### Updates +[UPDATE] format code. + ## 0.0.5+2 ### New Features [ADD] AccountPropertiesAddressTransaction. diff --git a/README.md b/README.md index 7b55619..2168e88 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Add this to your package's pubspec.yaml file: ```dart dependencies: - xpx_chain_sdk: 0.0.5+2 + xpx_chain_sdk: 0.0.5+3 ``` **2. Install it** diff --git a/lib/imp/buffer.dart b/lib/imp/buffer.dart index 2836a23..ee7463b 100644 --- a/lib/imp/buffer.dart +++ b/lib/imp/buffer.dart @@ -1,4 +1,4 @@ library xpx_chain_sdk.buffer; -export 'package:xpx_chain_sdk/imp/buffer/schema.dart'; export 'package:xpx_chain_sdk/imp/buffer/model.dart'; +export 'package:xpx_chain_sdk/imp/buffer/schema.dart'; diff --git a/lib/imp/buffer/model.dart b/lib/imp/buffer/model.dart index 4028382..480f084 100644 --- a/lib/imp/buffer/model.dart +++ b/lib/imp/buffer/model.dart @@ -4,7 +4,7 @@ import 'dart:typed_data'; import 'package:flat_buffers/flat_buffers.dart' as fb; -part 'model/account_properties_transaction_catapult.dart'; +part 'model/account_properties_transaction_buffer.dart'; part 'model/aggregate_transaction_buffer.dart'; part 'model/alias_transaction_buffer.dart'; part 'model/exchange_transaction_buffer.dart'; @@ -18,5 +18,5 @@ part 'model/mosaic_supply_change_transaction_buffer.dart'; part 'model/register_namespace_transaction_buffer.dart'; part 'model/secret_lock_transaction_buffer.dart'; part 'model/secret_proof_transaction_buffer.dart'; -part 'model/transfer_transaction_buffer.dart'; part 'model/transactions_buffer.dart'; +part 'model/transfer_transaction_buffer.dart'; diff --git a/lib/imp/buffer/model/account_properties_transaction_catapult.dart b/lib/imp/buffer/model/account_properties_transaction_buffer.dart similarity index 91% rename from lib/imp/buffer/model/account_properties_transaction_catapult.dart rename to lib/imp/buffer/model/account_properties_transaction_buffer.dart index 939b292..774b1a3 100644 --- a/lib/imp/buffer/model/account_properties_transaction_catapult.dart +++ b/lib/imp/buffer/model/account_properties_transaction_buffer.dart @@ -2,14 +2,14 @@ part of xpx_chain_sdk.buffer.model; class PropertyModificationBuffer { factory PropertyModificationBuffer(List bytes) { - final fb.BufferContext rootRef = new fb.BufferContext.fromBytes(bytes); + final fb.BufferContext rootRef = fb.BufferContext.fromBytes(bytes); return reader.read(rootRef, 0); } PropertyModificationBuffer._(this._bc, this._bcOffset); static const fb.Reader reader = - const _PropertyModificationBufferReader(); + _PropertyModificationBufferReader(); final fb.BufferContext _bc; final int _bcOffset; @@ -19,7 +19,7 @@ class PropertyModificationBuffer { /// In case of address it is 25 bytes array. In case of mosaic it is 8 byte array(or 2 uint32 array). /// In case of transaction it is 2 byte array(ushort) - List get value => const fb.ListReader(const fb.Uint8Reader()) + List get value => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 6, null); @override @@ -33,7 +33,7 @@ class _PropertyModificationBufferReader @override PropertyModificationBuffer createObject(fb.BufferContext bc, int offset) => - new PropertyModificationBuffer._(bc, offset); + PropertyModificationBuffer._(bc, offset); } class PropertyModificationBufferBuilder { @@ -86,7 +86,7 @@ class PropertyModificationBufferObjectBuilder extends fb.ObjectBuilder { /// Convenience method to serialize to byte list. @override Uint8List toBytes([String fileIdentifier]) { - final fb.Builder fbBuilder = new fb.Builder(); + final fb.Builder fbBuilder = fb.Builder(); final int offset = finish(fbBuilder); return fbBuilder.finish(offset, fileIdentifier); } @@ -94,7 +94,7 @@ class PropertyModificationBufferObjectBuilder extends fb.ObjectBuilder { class AccountPropertiesTransactionBuffer { factory AccountPropertiesTransactionBuffer(List bytes) { - final fb.BufferContext rootRef = new fb.BufferContext.fromBytes(bytes); + final fb.BufferContext rootRef = fb.BufferContext.fromBytes(bytes); return reader.read(rootRef, 0); } @@ -107,20 +107,29 @@ class AccountPropertiesTransactionBuffer { final int _bcOffset; int get size => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 4, 0); - List get signature => const fb.ListReader(const fb.Uint8Reader()) + + List get signature => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 6, null); - List get signer => const fb.ListReader(const fb.Uint8Reader()) + + List get signer => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 8, null); + int get version => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 10, 0); + int get type => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 12, 0); - List get maxFee => const fb.ListReader(const fb.Uint32Reader()) + + List get maxFee => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 14, null); - List get deadline => const fb.ListReader(const fb.Uint32Reader()) + + List get deadline => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 16, null); + int get propertyType => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 18, 0); + int get modificationCount => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 20, 0); + List get modifications => const fb.ListReader( PropertyModificationBuffer.reader) @@ -138,7 +147,7 @@ class _AccountPropertiesTransactionBufferReader @override AccountPropertiesTransactionBuffer createObject( fb.BufferContext bc, int offset) => - new AccountPropertiesTransactionBuffer._(bc, offset); + AccountPropertiesTransactionBuffer._(bc, offset); } class AccountPropertiesTransactionBufferBuilder { @@ -284,7 +293,7 @@ class AccountPropertiesTransactionBufferObjectBuilder extends fb.ObjectBuilder { /// Convenience method to serialize to byte list. @override Uint8List toBytes([String fileIdentifier]) { - final fb.Builder fbBuilder = new fb.Builder(); + final fb.Builder fbBuilder = fb.Builder(); final int offset = finish(fbBuilder); return fbBuilder.finish(offset, fileIdentifier); } diff --git a/lib/imp/buffer/model/aggregate_transaction_buffer.dart b/lib/imp/buffer/model/aggregate_transaction_buffer.dart index b9fb2d2..9df3734 100644 --- a/lib/imp/buffer/model/aggregate_transaction_buffer.dart +++ b/lib/imp/buffer/model/aggregate_transaction_buffer.dart @@ -15,18 +15,26 @@ class AggregateTransactionBuffer { final int _bcOffset; int get size => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 4, 0); + List get signature => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 6, null); + List get signer => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 8, null); + int get version => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 10, 0); + int get type => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 12, 0); + List get fee => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 14, null); + List get deadline => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 16, null); + int get transactionsSize => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 18, 0); + List get transactions => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 20, null); diff --git a/lib/imp/buffer/model/alias_transaction_buffer.dart b/lib/imp/buffer/model/alias_transaction_buffer.dart index f65d0e4..cf53abb 100644 --- a/lib/imp/buffer/model/alias_transaction_buffer.dart +++ b/lib/imp/buffer/model/alias_transaction_buffer.dart @@ -15,17 +15,25 @@ class AliasTransactionBuffer { final int _bcOffset; int get size => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 4, 0); + List get signature => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 6, null); + List get signer => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 8, null); + int get version => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 10, 0); + int get type => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 12, 0); + List get maxFee => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 14, null); + List get deadline => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 16, null); + int get actionType => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 18, 0); + List get namespaceId => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 20, null); diff --git a/lib/imp/buffer/model/exchange_transaction_buffer.dart b/lib/imp/buffer/model/exchange_transaction_buffer.dart index 1199524..12a7bd1 100644 --- a/lib/imp/buffer/model/exchange_transaction_buffer.dart +++ b/lib/imp/buffer/model/exchange_transaction_buffer.dart @@ -2,31 +2,39 @@ part of xpx_chain_sdk.buffer.model; class AddExchangeOfferTransactionBuffer { factory AddExchangeOfferTransactionBuffer(List bytes) { - final fb.BufferContext rootRef = new fb.BufferContext.fromBytes(bytes); + final fb.BufferContext rootRef = fb.BufferContext.fromBytes(bytes); return reader.read(rootRef, 0); } AddExchangeOfferTransactionBuffer._(this._bc, this._bcOffset); static const fb.Reader reader = - const _AddExchangeOfferTransactionBufferReader(); + _AddExchangeOfferTransactionBufferReader(); final fb.BufferContext _bc; final int _bcOffset; int get size => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 4, 0); - List get signature => const fb.ListReader(const fb.Uint8Reader()) + + List get signature => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 6, null); - List get signer => const fb.ListReader(const fb.Uint8Reader()) + + List get signer => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 8, null); + int get version => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 10, 0); + int get type => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 12, 0); - List get maxFee => const fb.ListReader(const fb.Uint32Reader()) + + List get maxFee => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 14, null); - List get deadline => const fb.ListReader(const fb.Uint32Reader()) + + List get deadline => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 16, null); + int get offersCount => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 18, 0); + List get offers => const fb.ListReader(AddExchangeOfferBuffer.reader) .vTableGet(_bc, _bcOffset, 20, null); @@ -43,7 +51,7 @@ class _AddExchangeOfferTransactionBufferReader @override AddExchangeOfferTransactionBuffer createObject( fb.BufferContext bc, int offset) => - new AddExchangeOfferTransactionBuffer._(bc, offset); + AddExchangeOfferTransactionBuffer._(bc, offset); } class AddExchangeOfferTransactionBufferBuilder { @@ -180,7 +188,7 @@ class AddExchangeOfferTransactionBufferObjectBuilder extends fb.ObjectBuilder { /// Convenience method to serialize to byte list. @override Uint8List toBytes([String fileIdentifier]) { - final fb.Builder fbBuilder = new fb.Builder(); + final fb.Builder fbBuilder = fb.Builder(); final int offset = finish(fbBuilder); return fbBuilder.finish(offset, fileIdentifier); } @@ -188,7 +196,7 @@ class AddExchangeOfferTransactionBufferObjectBuilder extends fb.ObjectBuilder { class ExchangeOfferTransactionBuffer { factory ExchangeOfferTransactionBuffer(List bytes) { - final fb.BufferContext rootRef = new fb.BufferContext.fromBytes(bytes); + final fb.BufferContext rootRef = fb.BufferContext.fromBytes(bytes); return reader.read(rootRef, 0); } @@ -201,18 +209,26 @@ class ExchangeOfferTransactionBuffer { final int _bcOffset; int get size => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 4, 0); + List get signature => const fb.ListReader(const fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 6, null); + List get signer => const fb.ListReader(const fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 8, null); + int get version => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 10, 0); + int get type => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 12, 0); + List get maxFee => const fb.ListReader(const fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 14, null); + List get deadline => const fb.ListReader(const fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 16, null); + int get offersCount => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 18, 0); + List get offers => const fb.ListReader(ExchangeOfferBuffer.reader) .vTableGet(_bc, _bcOffset, 20, null); @@ -229,7 +245,7 @@ class _ExchangeOfferTransactionBufferReader @override ExchangeOfferTransactionBuffer createObject( fb.BufferContext bc, int offset) => - new ExchangeOfferTransactionBuffer._(bc, offset); + ExchangeOfferTransactionBuffer._(bc, offset); } class ExchangeOfferTransactionBufferBuilder { @@ -366,7 +382,7 @@ class ExchangeOfferTransactionBufferObjectBuilder extends fb.ObjectBuilder { /// Convenience method to serialize to byte list. @override Uint8List toBytes([String fileIdentifier]) { - final fb.Builder fbBuilder = new fb.Builder(); + final fb.Builder fbBuilder = fb.Builder(); final int offset = finish(fbBuilder); return fbBuilder.finish(offset, fileIdentifier); } @@ -374,7 +390,7 @@ class ExchangeOfferTransactionBufferObjectBuilder extends fb.ObjectBuilder { class RemoveExchangeOfferTransactionBuffer { factory RemoveExchangeOfferTransactionBuffer(List bytes) { - final fb.BufferContext rootRef = new fb.BufferContext.fromBytes(bytes); + final fb.BufferContext rootRef = fb.BufferContext.fromBytes(bytes); return reader.read(rootRef, 0); } @@ -387,18 +403,26 @@ class RemoveExchangeOfferTransactionBuffer { final int _bcOffset; int get size => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 4, 0); + List get signature => const fb.ListReader(const fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 6, null); + List get signer => const fb.ListReader(const fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 8, null); + int get version => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 10, 0); + int get type => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 12, 0); + List get maxFee => const fb.ListReader(const fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 14, null); + List get deadline => const fb.ListReader(const fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 16, null); + int get offersCount => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 18, 0); + List get offers => const fb.ListReader( RemoveExchangeOfferBuffer.reader) @@ -416,7 +440,7 @@ class _RemoveExchangeOfferTransactionBufferReader @override RemoveExchangeOfferTransactionBuffer createObject( fb.BufferContext bc, int offset) => - new RemoveExchangeOfferTransactionBuffer._(bc, offset); + RemoveExchangeOfferTransactionBuffer._(bc, offset); } class RemoveExchangeOfferTransactionBufferBuilder { @@ -554,7 +578,7 @@ class RemoveExchangeOfferTransactionBufferObjectBuilder /// Convenience method to serialize to byte list. @override Uint8List toBytes([String fileIdentifier]) { - final fb.Builder fbBuilder = new fb.Builder(); + final fb.Builder fbBuilder = fb.Builder(); final int offset = finish(fbBuilder); return fbBuilder.finish(offset, fileIdentifier); } @@ -562,7 +586,7 @@ class RemoveExchangeOfferTransactionBufferObjectBuilder class AddExchangeOfferBuffer { factory AddExchangeOfferBuffer(List bytes) { - final fb.BufferContext rootRef = new fb.BufferContext.fromBytes(bytes); + final fb.BufferContext rootRef = fb.BufferContext.fromBytes(bytes); return reader.read(rootRef, 0); } @@ -576,12 +600,16 @@ class AddExchangeOfferBuffer { List get mosaicId => const fb.ListReader(const fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 4, null); + List get mosaicAmount => const fb.ListReader(const fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 6, null); + List get cost => const fb.ListReader(const fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 8, null); + int get type => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 10, 0); + List get duration => const fb.ListReader(const fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 12, null); @@ -596,7 +624,7 @@ class _AddExchangeOfferBufferReader @override AddExchangeOfferBuffer createObject(fb.BufferContext bc, int offset) => - new AddExchangeOfferBuffer._(bc, offset); + AddExchangeOfferBuffer._(bc, offset); } class AddExchangeOfferBufferBuilder { @@ -691,7 +719,7 @@ class AddExchangeOfferBufferObjectBuilder extends fb.ObjectBuilder { /// Convenience method to serialize to byte list. @override Uint8List toBytes([String fileIdentifier]) { - final fb.Builder fbBuilder = new fb.Builder(); + final fb.Builder fbBuilder = fb.Builder(); final int offset = finish(fbBuilder); return fbBuilder.finish(offset, fileIdentifier); } @@ -699,7 +727,7 @@ class AddExchangeOfferBufferObjectBuilder extends fb.ObjectBuilder { class ExchangeOfferBuffer { factory ExchangeOfferBuffer(List bytes) { - final fb.BufferContext rootRef = new fb.BufferContext.fromBytes(bytes); + final fb.BufferContext rootRef = fb.BufferContext.fromBytes(bytes); return reader.read(rootRef, 0); } @@ -713,12 +741,16 @@ class ExchangeOfferBuffer { List get mosaicId => const fb.ListReader(const fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 4, null); + List get mosaicAmount => const fb.ListReader(const fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 6, null); + List get cost => const fb.ListReader(const fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 8, null); + int get type => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 10, 0); + List get owner => const fb.ListReader(const fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 12, null); @@ -732,7 +764,7 @@ class _ExchangeOfferBufferReader extends fb.TableReader { @override ExchangeOfferBuffer createObject(fb.BufferContext bc, int offset) => - new ExchangeOfferBuffer._(bc, offset); + ExchangeOfferBuffer._(bc, offset); } class ExchangeOfferBufferBuilder { @@ -826,7 +858,7 @@ class ExchangeOfferBufferObjectBuilder extends fb.ObjectBuilder { /// Convenience method to serialize to byte list. @override Uint8List toBytes([String fileIdentifier]) { - final fb.Builder fbBuilder = new fb.Builder(); + final fb.Builder fbBuilder = fb.Builder(); final int offset = finish(fbBuilder); return fbBuilder.finish(offset, fileIdentifier); } @@ -834,7 +866,7 @@ class ExchangeOfferBufferObjectBuilder extends fb.ObjectBuilder { class RemoveExchangeOfferBuffer { factory RemoveExchangeOfferBuffer(List bytes) { - final fb.BufferContext rootRef = new fb.BufferContext.fromBytes(bytes); + final fb.BufferContext rootRef = fb.BufferContext.fromBytes(bytes); return reader.read(rootRef, 0); } @@ -848,6 +880,7 @@ class RemoveExchangeOfferBuffer { List get mosaicId => const fb.ListReader(const fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 4, null); + int get type => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 6, 0); @override @@ -861,7 +894,7 @@ class _RemoveExchangeOfferBufferReader @override RemoveExchangeOfferBuffer createObject(fb.BufferContext bc, int offset) => - new RemoveExchangeOfferBuffer._(bc, offset); + RemoveExchangeOfferBuffer._(bc, offset); } class RemoveExchangeOfferBufferBuilder { @@ -915,7 +948,7 @@ class RemoveExchangeOfferBufferObjectBuilder extends fb.ObjectBuilder { /// Convenience method to serialize to byte list. @override Uint8List toBytes([String fileIdentifier]) { - final fb.Builder fbBuilder = new fb.Builder(); + final fb.Builder fbBuilder = fb.Builder(); final int offset = finish(fbBuilder); return fbBuilder.finish(offset, fileIdentifier); } diff --git a/lib/imp/buffer/model/lock_funds_transaction_buffer.dart b/lib/imp/buffer/model/lock_funds_transaction_buffer.dart index 64e60a3..278f323 100644 --- a/lib/imp/buffer/model/lock_funds_transaction_buffer.dart +++ b/lib/imp/buffer/model/lock_funds_transaction_buffer.dart @@ -15,22 +15,32 @@ class LockFundsTransactionBuffer { final int _bcOffset; int get size => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 4, 0); + List get signature => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 6, null); + List get signer => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 8, null); + int get version => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 10, 0); + int get type => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 12, 0); + List get fee => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 14, null); + List get deadline => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 16, null); + List get mosaicId => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 18, null); + List get mosaicAmount => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 20, null); + List get duration => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 22, null); + List get hash => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 24, null); diff --git a/lib/imp/buffer/model/modify_contract_transaction_buffer.dart b/lib/imp/buffer/model/modify_contract_transaction_buffer.dart index 7229428..26c75a6 100644 --- a/lib/imp/buffer/model/modify_contract_transaction_buffer.dart +++ b/lib/imp/buffer/model/modify_contract_transaction_buffer.dart @@ -15,6 +15,7 @@ class CosignatoryModificationBuffer { final int _bcOffset; int get type => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 4, 0); + List get cosignatoryPublicKey => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 6, null); @@ -108,34 +109,48 @@ class ModifyContractTransactionBuffer { final int _bcOffset; int get size => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 4, 0); + List get signature => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 6, null); + List get signer => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 8, null); + int get version => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 10, 0); + int get type => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 12, 0); + List get fee => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 14, null); + List get deadline => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 16, null); + List get durationDelta => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 18, null); + List get hash => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 20, null); + int get numCustomers => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 22, 0); + int get numExecutors => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 24, 0); + int get numVerifiers => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 26, 0); + List get customers => const fb.ListReader( CosignatoryModificationBuffer.reader) .vTableGet(_bc, _bcOffset, 28, null); + List get executors => const fb.ListReader( CosignatoryModificationBuffer.reader) .vTableGet(_bc, _bcOffset, 30, null); + List get verifiers => const fb.ListReader( CosignatoryModificationBuffer.reader) diff --git a/lib/imp/buffer/model/modify_metadata_transaction_buffer.dart b/lib/imp/buffer/model/modify_metadata_transaction_buffer.dart index 63b7e15..0f23f8e 100644 --- a/lib/imp/buffer/model/modify_metadata_transaction_buffer.dart +++ b/lib/imp/buffer/model/modify_metadata_transaction_buffer.dart @@ -15,13 +15,18 @@ class MetadataModificationBuffer { final int _bcOffset; int get size => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 4, 0); + int get modificationType => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 6, 0); + int get keySize => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 8, 0); + List get valueSize => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 10, null); + List get key => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 12, null); + List get value => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 14, null); @@ -161,20 +166,29 @@ class ModifyMetadataTransactionBuffer { final int _bcOffset; int get size => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 4, 0); + List get signature => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 6, null); + List get signer => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 8, null); + int get version => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 10, 0); + int get type => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 12, 0); + List get fee => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 14, null); + List get deadline => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 16, null); + int get metadataType => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 18, 0); + List get metadataId => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 20, null); + List get modifications => const fb.ListReader( MetadataModificationBuffer.reader) diff --git a/lib/imp/buffer/model/modify_multisig_account_transaction_buffer.dart b/lib/imp/buffer/model/modify_multisig_account_transaction_buffer.dart index 0f8303f..0dfe651 100644 --- a/lib/imp/buffer/model/modify_multisig_account_transaction_buffer.dart +++ b/lib/imp/buffer/model/modify_multisig_account_transaction_buffer.dart @@ -15,22 +15,32 @@ class ModifyMultisigAccountTransactionBuffer { final int _bcOffset; int get size => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 4, 0); + List get signature => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 6, null); + List get signer => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 8, null); + int get version => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 10, 0); + int get type => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 12, 0); + List get fee => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 14, null); + List get deadline => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 16, null); + int get minRemovalDelta => const fb.Int8Reader().vTableGet(_bc, _bcOffset, 18, 0); + int get minApprovalDelta => const fb.Int8Reader().vTableGet(_bc, _bcOffset, 20, 0); + int get numModifications => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 22, 0); + List get modifications => const fb.ListReader( CosignatoryModificationBuffer.reader) diff --git a/lib/imp/buffer/model/mosaic_alias_transaction_buffer.dart b/lib/imp/buffer/model/mosaic_alias_transaction_buffer.dart index 240055c..ee7fe1a 100644 --- a/lib/imp/buffer/model/mosaic_alias_transaction_buffer.dart +++ b/lib/imp/buffer/model/mosaic_alias_transaction_buffer.dart @@ -15,20 +15,29 @@ class MosaicAliasDefinitionTransactionBuffer { final int _bcOffset; int get size => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 4, 0); + List get signature => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 6, null); + List get signer => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 8, null); + int get version => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 10, 0); + int get type => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 12, 0); + List get fee => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 14, null); + List get deadline => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 16, null); + List get namespaceId => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 18, null); + List get mosaicId => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 20, null); + int get aliasAction => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 22, 0); diff --git a/lib/imp/buffer/model/mosaic_definition_transaction_buffer.dart b/lib/imp/buffer/model/mosaic_definition_transaction_buffer.dart index 2ccf1a8..a1b9d2c 100644 --- a/lib/imp/buffer/model/mosaic_definition_transaction_buffer.dart +++ b/lib/imp/buffer/model/mosaic_definition_transaction_buffer.dart @@ -15,6 +15,7 @@ class MosaicPropertyB { int get mosaicPropertyId => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 4, 0); + List get value => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 6, null); @@ -102,25 +103,37 @@ class MosaicDefinitionTransactionBuffer { final int _bcOffset; int get size => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 4, 0); - List get signature => const fb.ListReader(const fb.Uint8Reader()) + + List get signature => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 6, null); - List get signer => const fb.ListReader(const fb.Uint8Reader()) + + List get signer => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 8, null); + int get version => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 10, 0); + int get type => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 12, 0); - List get maxFee => const fb.ListReader(const fb.Uint32Reader()) + + List get maxFee => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 14, null); - List get deadline => const fb.ListReader(const fb.Uint32Reader()) + + List get deadline => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 16, null); + int get mosaicNonce => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 18, 0); - List get mosaicId => const fb.ListReader(const fb.Uint32Reader()) + + List get mosaicId => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 20, null); + int get numOptionalProperties => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 22, 0); + int get flags => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 24, 0); + int get divisibility => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 26, 0); + List get optionalProperties => const fb.ListReader(MosaicPropertyB.reader) .vTableGet(_bc, _bcOffset, 28, null); diff --git a/lib/imp/buffer/model/mosaic_supply_change_transaction_buffer.dart b/lib/imp/buffer/model/mosaic_supply_change_transaction_buffer.dart index f8c93d8..7a2d2e3 100644 --- a/lib/imp/buffer/model/mosaic_supply_change_transaction_buffer.dart +++ b/lib/imp/buffer/model/mosaic_supply_change_transaction_buffer.dart @@ -15,19 +15,28 @@ class MosaicSupplyChangeTransactionBuffer { final int _bcOffset; int get size => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 4, 0); + List get signature => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 6, null); + List get signer => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 8, null); + int get version => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 10, 0); + int get type => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 12, 0); + List get fee => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 14, null); + List get deadline => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 16, null); + List get mosaicId => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 18, null); + int get direction => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 20, 0); + List get delta => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 22, null); diff --git a/lib/imp/buffer/model/register_namespace_transaction_buffer.dart b/lib/imp/buffer/model/register_namespace_transaction_buffer.dart index 20b1bd9..e928236 100644 --- a/lib/imp/buffer/model/register_namespace_transaction_buffer.dart +++ b/lib/imp/buffer/model/register_namespace_transaction_buffer.dart @@ -15,24 +15,35 @@ class RegisterNamespaceTransactionBuffer { final int _bcOffset; int get size => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 4, 0); + List get signature => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 6, null); + List get signer => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 8, null); + int get version => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 10, 0); + int get type => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 12, 0); + List get fee => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 14, null); + List get deadline => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 16, null); + int get namespaceType => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 18, 0); + List get durationParentId => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 20, null); + List get namespaceId => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 22, null); + int get namespaceNameSize => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 24, 0); + String get namespaceName => const fb.StringReader().vTableGet(_bc, _bcOffset, 26, null); diff --git a/lib/imp/buffer/model/secret_lock_transaction_buffer.dart b/lib/imp/buffer/model/secret_lock_transaction_buffer.dart index 4caa8f0..f846503 100644 --- a/lib/imp/buffer/model/secret_lock_transaction_buffer.dart +++ b/lib/imp/buffer/model/secret_lock_transaction_buffer.dart @@ -15,26 +15,38 @@ class SecretLockTransactionBuffer { final int _bcOffset; int get size => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 4, 0); + List get signature => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 6, null); + List get signer => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 8, null); + int get version => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 10, 0); + int get type => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 12, 0); + List get fee => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 14, null); + List get deadline => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 16, null); + List get mosaicId => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 18, null); + List get mosaicAmount => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 20, null); + List get duration => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 22, null); + int get hashAlgorithm => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 24, 0); + List get secret => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 26, null); + List get recipient => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 28, null); diff --git a/lib/imp/buffer/model/secret_proof_transaction_buffer.dart b/lib/imp/buffer/model/secret_proof_transaction_buffer.dart index cc1b426..ba8e9e3 100644 --- a/lib/imp/buffer/model/secret_proof_transaction_buffer.dart +++ b/lib/imp/buffer/model/secret_proof_transaction_buffer.dart @@ -15,21 +15,31 @@ class SecretProofTransactionBuffer { final int _bcOffset; int get size => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 4, 0); + List get signature => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 6, null); + List get signer => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 8, null); + int get version => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 10, 0); + int get type => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 12, 0); + List get fee => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 14, null); + List get deadline => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 16, null); + int get hashAlgorithm => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 18, 0); + List get secret => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 20, null); + int get proofSize => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 22, 0); + List get proof => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 24, null); diff --git a/lib/imp/buffer/model/transfer_transaction_buffer.dart b/lib/imp/buffer/model/transfer_transaction_buffer.dart index 9d4e876..4fe1a98 100644 --- a/lib/imp/buffer/model/transfer_transaction_buffer.dart +++ b/lib/imp/buffer/model/transfer_transaction_buffer.dart @@ -14,6 +14,7 @@ class MessageBuffer { final int _bcOffset; int get type => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 4, 0); + List get payload => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 6, null); @@ -94,14 +95,15 @@ class MosaicBuffer { MosaicBuffer._(this._bc, this._bcOffset); - static const fb.Reader reader = const _MosaicBufferReader(); + static const fb.Reader reader = _MosaicBufferReader(); final fb.BufferContext _bc; final int _bcOffset; - List get id => const fb.ListReader(const fb.Uint32Reader()) + List get id => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 4, null); - List get amount => const fb.ListReader(const fb.Uint32Reader()) + + List get amount => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 6, null); @override @@ -191,23 +193,34 @@ class TransferTransactionBuffer { final int _bcOffset; int get size => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 4, 0); - List get signature => const fb.ListReader(const fb.Uint8Reader()) + + List get signature => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 6, null); - List get signer => const fb.ListReader(const fb.Uint8Reader()) + + List get signer => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 8, null); + int get version => const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 10, 0); + int get type => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 12, 0); - List get maxFee => const fb.ListReader(const fb.Uint32Reader()) + + List get maxFee => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 14, null); - List get deadline => const fb.ListReader(const fb.Uint32Reader()) + + List get deadline => const fb.ListReader(fb.Uint32Reader()) .vTableGet(_bc, _bcOffset, 16, null); - List get recipient => const fb.ListReader(const fb.Uint8Reader()) + + List get recipient => const fb.ListReader(fb.Uint8Reader()) .vTableGet(_bc, _bcOffset, 18, null); + int get messageSize => const fb.Uint16Reader().vTableGet(_bc, _bcOffset, 20, 0); + int get numMosaics => const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 22, 0); + MessageBuffer get message => MessageBuffer.reader.vTableGet(_bc, _bcOffset, 24, null); + List get mosaics => const fb.ListReader(MosaicBuffer.reader) .vTableGet(_bc, _bcOffset, 26, null); diff --git a/lib/imp/buffer/schema.dart b/lib/imp/buffer/schema.dart index f32d9f0..a780561 100644 --- a/lib/imp/buffer/schema.dart +++ b/lib/imp/buffer/schema.dart @@ -3,13 +3,13 @@ library xpx_chain_sdk.buffer.schema; import 'dart:typed_data'; part 'schema/buffer_schema.dart'; -part 'schema/buffer_schema_transfer.dart'; part 'schema/buffer_schema_account_property.dart'; -part 'schema/buffer_schema_register_namespace.dart'; -part 'schema/buffer_schema_mosaic_definition.dart'; -part 'schema/buffer_schema_mosaic_supply_change.dart'; part 'schema/buffer_schema_aggregate.dart'; -part 'schema/buffer_schema_multisig.dart'; -part 'schema/buffer_schema_lockFunds.dart'; part 'schema/buffer_schema_alias.dart'; part 'schema/buffer_schema_exchange.dart'; +part 'schema/buffer_schema_lockFunds.dart'; +part 'schema/buffer_schema_mosaic_definition.dart'; +part 'schema/buffer_schema_mosaic_supply_change.dart'; +part 'schema/buffer_schema_multisig.dart'; +part 'schema/buffer_schema_register_namespace.dart'; +part 'schema/buffer_schema_transfer.dart'; diff --git a/lib/src/api/api.dart b/lib/src/api/api.dart index 742852c..c0af5aa 100644 --- a/lib/src/api/api.dart +++ b/lib/src/api/api.dart @@ -2,32 +2,32 @@ library xpx_chain_sdk.api; import 'dart:async'; import 'dart:convert' show json; -import 'package:http/http.dart' as http; -import 'package:xpx_chain_sdk/xpx_sdk_all_errors.dart'; +import 'package:http/http.dart' as http; import 'package:xpx_chain_sdk/src/model/account.dart'; import 'package:xpx_chain_sdk/src/model/alias.dart'; -import 'package:xpx_chain_sdk/src/model/exchange.dart'; import 'package:xpx_chain_sdk/src/model/blockchain.dart'; -import 'package:xpx_chain_sdk/src/model/namespace.dart'; +import 'package:xpx_chain_sdk/src/model/exchange.dart'; import 'package:xpx_chain_sdk/src/model/mosaic.dart'; import 'package:xpx_chain_sdk/src/model/multisig.dart'; +import 'package:xpx_chain_sdk/src/model/namespace.dart'; import 'package:xpx_chain_sdk/src/model/network.dart'; import 'package:xpx_chain_sdk/src/model/node.dart'; import 'package:xpx_chain_sdk/src/model/transaction.dart'; import 'package:xpx_chain_sdk/src/model/uint64.dart'; +import 'package:xpx_chain_sdk/xpx_sdk_all_errors.dart'; -part 'api_conf.dart'; +part 'api_account_routes.dart'; +part 'api_blockchain_routes.dart'; part 'api_client.dart'; +part 'api_conf.dart'; part 'api_exception.dart'; -part 'api_account_routes.dart'; part 'api_exchange_routes.dart'; -part 'api_blockchain_routes.dart'; +part 'api_internal.dart'; part 'api_mosaic_routes.dart'; part 'api_namespace_routes.dart'; part 'api_network_routes.dart'; part 'api_node_routes.dart'; part 'api_transaction_routes.dart'; -part 'api_internal.dart'; _ApiClient defaultApiClient = _ApiClient(null, null); diff --git a/lib/src/model/account.dart b/lib/src/model/account.dart index 4135f83..715a363 100644 --- a/lib/src/model/account.dart +++ b/lib/src/model/account.dart @@ -4,21 +4,19 @@ import 'dart:typed_data'; import 'package:base32/base32.dart'; import 'package:convert/convert.dart' show hex; - -import 'package:xpx_crypto/xpx_crypto.dart' as crypto; - -import 'package:xpx_chain_sdk/xpx_sdk_consts.dart'; -import 'package:xpx_chain_sdk/xpx_sdk_all_errors.dart'; import 'package:xpx_chain_sdk/src/model/mosaic.dart'; import 'package:xpx_chain_sdk/src/model/network.dart'; import 'package:xpx_chain_sdk/src/model/transaction.dart'; import 'package:xpx_chain_sdk/src/model/uint64.dart'; +import 'package:xpx_chain_sdk/xpx_sdk_all_errors.dart'; +import 'package:xpx_chain_sdk/xpx_sdk_consts.dart'; +import 'package:xpx_crypto/xpx_crypto.dart' as crypto; part 'account/account_dto.dart'; -part 'account/account_model.dart'; part 'account/account_internal.dart'; +part 'account/account_model.dart'; part 'account/account_properties.dart'; -part 'account/account_properties_type.dart'; part 'account/account_properties_dto.dart'; +part 'account/account_properties_type.dart'; part 'account/account_property_dto.dart'; part 'account/address_model.dart'; diff --git a/lib/src/model/account/account_dto.dart b/lib/src/model/account/account_dto.dart index c6c1f55..d84ea3e 100644 --- a/lib/src/model/account/account_dto.dart +++ b/lib/src/model/account/account_dto.dart @@ -63,6 +63,7 @@ class AccountNamesDTO { /* The address of the account in hexadecimal. */ String address; + /* The mosaic linked namespace names. */ List _names; } diff --git a/lib/src/model/account/account_model.dart b/lib/src/model/account/account_model.dart index ca0dfac..fb0ba73 100644 --- a/lib/src/model/account/account_model.dart +++ b/lib/src/model/account/account_model.dart @@ -93,6 +93,7 @@ class AccountNames { /* The address of the account in hexadecimal. */ Address address; + /* The mosaic linked namespace names. */ List names; diff --git a/lib/src/model/account/account_properties_type.dart b/lib/src/model/account/account_properties_type.dart index 4178b63..93707a8 100644 --- a/lib/src/model/account/account_properties_type.dart +++ b/lib/src/model/account/account_properties_type.dart @@ -59,7 +59,7 @@ class AccountPropertyType { } } - throw new ArgumentError(unknownAccountPropertyType); + throw ArgumentError(unknownAccountPropertyType); } @override diff --git a/lib/src/model/alias.dart b/lib/src/model/alias.dart index bed9940..edd1082 100644 --- a/lib/src/model/alias.dart +++ b/lib/src/model/alias.dart @@ -6,5 +6,5 @@ import 'package:xpx_chain_sdk/src/model/transaction.dart'; import 'package:xpx_chain_sdk/src/model/uint64.dart'; part 'alias/alias_dto.dart'; -part 'alias/alias_model.dart'; part 'alias/alias_internal.dart'; +part 'alias/alias_model.dart'; diff --git a/lib/src/model/blockchain.dart b/lib/src/model/blockchain.dart index 2d15e37..e15a6ff 100644 --- a/lib/src/model/blockchain.dart +++ b/lib/src/model/blockchain.dart @@ -1,8 +1,8 @@ library xpx_chain_sdk.blockchain; import 'package:xpx_chain_sdk/src/model/account.dart'; -import 'package:xpx_chain_sdk/src/model/uint64.dart'; import 'package:xpx_chain_sdk/src/model/transaction.dart'; +import 'package:xpx_chain_sdk/src/model/uint64.dart'; part 'blockchain/block_dto.dart'; part 'blockchain/block_model.dart'; diff --git a/lib/src/model/exchange.dart b/lib/src/model/exchange.dart index 292f8f3..cad85a3 100644 --- a/lib/src/model/exchange.dart +++ b/lib/src/model/exchange.dart @@ -1,13 +1,12 @@ library xpx_chain_sdk.exchange; import 'package:flat_buffers/flat_buffers.dart' as fb; -import 'package:xpx_chain_sdk/src/model/uint64.dart'; - -import 'package:xpx_chain_sdk/xpx_sdk_all_errors.dart'; import 'package:xpx_chain_sdk/imp/buffer.dart'; import 'package:xpx_chain_sdk/src/model/mosaic.dart'; import 'package:xpx_chain_sdk/src/model/transaction.dart'; +import 'package:xpx_chain_sdk/src/model/uint64.dart'; +import 'package:xpx_chain_sdk/xpx_sdk_all_errors.dart'; part 'exchange/exchange_dto.dart'; -part 'exchange/exchange_model.dart'; part 'exchange/exchange_internal.dart'; +part 'exchange/exchange_model.dart'; diff --git a/lib/src/model/exchange/exchange_dto.dart b/lib/src/model/exchange/exchange_dto.dart index 3e6507b..68ff6e3 100644 --- a/lib/src/model/exchange/exchange_dto.dart +++ b/lib/src/model/exchange/exchange_dto.dart @@ -32,6 +32,7 @@ class AddOfferDTO extends OfferDTO { AddOfferDTO.fromJson(Map json) : super.fromJson(json) { duration = UInt64DTO.fromJson(json['duration']); } + UInt64DTO duration; static List listFromJson(List json) => json == null @@ -44,6 +45,7 @@ class ConfirmationOfferDTO extends OfferDTO { : super.fromJson(json) { owner = json['owner']; } + String owner; static List listFromJson(List json) => diff --git a/lib/src/model/message.dart b/lib/src/model/message.dart index 96b6bd3..ae438bd 100644 --- a/lib/src/model/message.dart +++ b/lib/src/model/message.dart @@ -6,5 +6,5 @@ import 'dart:typed_data'; import 'package:convert/convert.dart' show hex; part 'message/message_dto.dart'; -part 'message/message_model.dart'; part 'message/message_internal.dart'; +part 'message/message_model.dart'; diff --git a/lib/src/model/mosaic.dart b/lib/src/model/mosaic.dart index c394131..4f93c9e 100644 --- a/lib/src/model/mosaic.dart +++ b/lib/src/model/mosaic.dart @@ -4,13 +4,11 @@ import 'dart:math'; import 'dart:typed_data'; import 'package:convert/convert.dart' show hex; - -import 'package:xpx_crypto/imp/sha3.dart' as sha3; - -import 'package:xpx_chain_sdk/xpx_sdk_all_errors.dart'; -import 'package:xpx_chain_sdk/src/model/uint64.dart'; import 'package:xpx_chain_sdk/src/model/namespace.dart' show xpxNamespaceId; import 'package:xpx_chain_sdk/src/model/transaction.dart'; +import 'package:xpx_chain_sdk/src/model/uint64.dart'; +import 'package:xpx_chain_sdk/xpx_sdk_all_errors.dart'; +import 'package:xpx_crypto/imp/sha3.dart' as sha3; part 'mosaic/mosaic_dto.dart'; part 'mosaic/mosaic_internal.dart'; diff --git a/lib/src/model/mosaic/mosaic_internal.dart b/lib/src/model/mosaic/mosaic_internal.dart index e7ed2b4..f180499 100644 --- a/lib/src/model/mosaic/mosaic_internal.dart +++ b/lib/src/model/mosaic/mosaic_internal.dart @@ -22,14 +22,14 @@ bool hasBits(Uint64 number, int bits) => number.toInt() & bits == bits; // Create xpx with using xpx as unit Mosaic xpx(int amount) { if (amount > xpxMaxValue) { - throw new ArgumentError('Maximum xpx value must be $xpxMaxValue'); + throw ArgumentError('Maximum xpx value must be $xpxMaxValue'); } return Mosaic(xpxNamespaceId, Uint64(amount)); } Mosaic xpxRelative(int amount) { if (amount > xpxMaxRelativeValue) { - throw new ArgumentError( + throw ArgumentError( 'Maximum xpx relative value must be $xpxMaxRelativeValue'); } return xpx(amount * xpxDivisibility); diff --git a/lib/src/model/multisig.dart b/lib/src/model/multisig.dart index f1aa2e1..975f726 100644 --- a/lib/src/model/multisig.dart +++ b/lib/src/model/multisig.dart @@ -1,8 +1,8 @@ library xpx_chain_sdk.multisig; -import 'package:xpx_chain_sdk/src/model/transaction.dart'; import 'package:xpx_chain_sdk/src/model/account.dart'; +import 'package:xpx_chain_sdk/src/model/transaction.dart'; import 'package:xpx_chain_sdk/src/model/uint64.dart'; -part 'multisig/multisig_model.dart'; part 'multisig/multisig_dto.dart'; +part 'multisig/multisig_model.dart'; diff --git a/lib/src/model/namespace.dart b/lib/src/model/namespace.dart index b7fbf1b..9c76504 100644 --- a/lib/src/model/namespace.dart +++ b/lib/src/model/namespace.dart @@ -3,13 +3,12 @@ library xpx_chain_sdk.namespace; import 'dart:typed_data'; import 'package:fixnum/fixnum.dart'; -import 'package:xpx_crypto/imp/sha3.dart' as sha3; - -import 'package:xpx_chain_sdk/xpx_sdk_all_errors.dart'; -import 'package:xpx_chain_sdk/src/model/transaction.dart'; import 'package:xpx_chain_sdk/src/model/account.dart'; import 'package:xpx_chain_sdk/src/model/alias.dart'; +import 'package:xpx_chain_sdk/src/model/transaction.dart'; import 'package:xpx_chain_sdk/src/model/uint64.dart'; +import 'package:xpx_chain_sdk/xpx_sdk_all_errors.dart'; +import 'package:xpx_crypto/imp/sha3.dart' as sha3; part 'namespace/namespace_dto.dart'; part 'namespace/namespace_internal.dart'; diff --git a/lib/src/model/transaction.dart b/lib/src/model/transaction.dart index 603b7af..3f891d7 100644 --- a/lib/src/model/transaction.dart +++ b/lib/src/model/transaction.dart @@ -2,44 +2,39 @@ library xpx_chain_sdk.transaction; import 'dart:typed_data'; -import 'package:convert/convert.dart' show hex; import 'package:base32/base32.dart'; - +import 'package:convert/convert.dart' show hex; import 'package:flat_buffers/flat_buffers.dart' as fb; - -import 'package:xpx_crypto/xpx_crypto.dart' as crypto; - -import 'package:xpx_chain_sdk/xpx_sdk_consts.dart'; - +import 'package:xpx_chain_sdk/imp/buffer.dart'; +import 'package:xpx_chain_sdk/src/api/api.dart'; import 'package:xpx_chain_sdk/src/model/account.dart'; import 'package:xpx_chain_sdk/src/model/alias.dart'; import 'package:xpx_chain_sdk/src/model/exchange.dart'; - +import 'package:xpx_chain_sdk/src/model/message.dart'; import 'package:xpx_chain_sdk/src/model/mosaic.dart'; import 'package:xpx_chain_sdk/src/model/multisig.dart'; -import 'package:xpx_chain_sdk/src/model/message.dart'; import 'package:xpx_chain_sdk/src/model/namespace.dart'; -import 'package:xpx_chain_sdk/src/api/api.dart'; import 'package:xpx_chain_sdk/src/model/uint64.dart'; import 'package:xpx_chain_sdk/xpx_sdk_all_errors.dart'; -import 'package:xpx_chain_sdk/imp/buffer.dart'; +import 'package:xpx_chain_sdk/xpx_sdk_consts.dart'; +import 'package:xpx_crypto/xpx_crypto.dart' as crypto; +part 'transaction/announce_transaction_info_dto.dart'; +part 'transaction/asset_id.dart'; +part 'transaction/transaciton_account_properties_address.dart'; +part 'transaction/transaciton_account_properties_entity_type.dart'; +part 'transaction/transaciton_account_properties_mosaic.dart'; +part 'transaction/transaction_aggregate.dart'; +part 'transaction/transaction_alias.dart'; part 'transaction/transaction_dto.dart'; +part 'transaction/transaction_exchange.dart'; part 'transaction/transaction_hashes.dart'; -part 'transaction/asset_id.dart'; part 'transaction/transaction_ids.dart'; part 'transaction/transaction_internal.dart'; +part 'transaction/transaction_lockfund.dart'; part 'transaction/transaction_model.dart'; part 'transaction/transaction_mosaic.dart'; -part 'transaction/transaction_status.dart'; -part 'transaction/announce_transaction_info_dto.dart'; -part 'transaction/transaction_transfer.dart'; -part 'transaction/transaction_aggregate.dart'; -part 'transaction/transaction_lockfund.dart'; -part 'transaction/transaction_alias.dart'; -part 'transaction/transaction_exchange.dart'; part 'transaction/transaction_multisig.dart'; part 'transaction/transaction_namespace.dart'; -part 'transaction/transaciton_account_properties_address.dart'; -part 'transaction/transaciton_account_properties_mosaic.dart'; -part 'transaction/transaciton_account_properties_entity_type.dart'; +part 'transaction/transaction_status.dart'; +part 'transaction/transaction_transfer.dart'; diff --git a/lib/src/model/transaction/transaciton_account_properties_address.dart b/lib/src/model/transaction/transaciton_account_properties_address.dart index 880208f..5ca1735 100644 --- a/lib/src/model/transaction/transaciton_account_properties_address.dart +++ b/lib/src/model/transaction/transaciton_account_properties_address.dart @@ -25,6 +25,7 @@ class AccountPropertiesAddressTransaction extends AbstractTransaction List modifications; int get size => _size(); + AbstractTransaction get abstractTransaction => _abstractTransaction(); @override diff --git a/lib/src/model/transaction/transaciton_account_properties_entity_type.dart b/lib/src/model/transaction/transaciton_account_properties_entity_type.dart index 2fc77ee..5cde75b 100644 --- a/lib/src/model/transaction/transaciton_account_properties_entity_type.dart +++ b/lib/src/model/transaction/transaciton_account_properties_entity_type.dart @@ -25,6 +25,7 @@ class AccountPropertiesEntityTypeTransaction extends AbstractTransaction List modifications; int get size => _size(); + AbstractTransaction get abstractTransaction => _abstractTransaction(); @override diff --git a/lib/src/model/transaction/transaciton_account_properties_mosaic.dart b/lib/src/model/transaction/transaciton_account_properties_mosaic.dart index 06a16f8..710a8f3 100644 --- a/lib/src/model/transaction/transaciton_account_properties_mosaic.dart +++ b/lib/src/model/transaction/transaciton_account_properties_mosaic.dart @@ -25,6 +25,7 @@ class AccountPropertiesMosaicTransaction extends AbstractTransaction List modifications; int get size => _size(); + AbstractTransaction get abstractTransaction => _abstractTransaction(); @override diff --git a/lib/src/model/transaction/transaction_aggregate.dart b/lib/src/model/transaction/transaction_aggregate.dart index 822112d..3f4e6c5 100644 --- a/lib/src/model/transaction/transaction_aggregate.dart +++ b/lib/src/model/transaction/transaction_aggregate.dart @@ -41,6 +41,7 @@ class AggregateTransaction extends AbstractTransaction implements Transaction { List cosignatures; int get size => _size(); + AbstractTransaction get abstractTransaction => _abstractTransaction(); static List listFromDTO( diff --git a/lib/src/model/transaction/transaction_alias.dart b/lib/src/model/transaction/transaction_alias.dart index 8667e5d..bfdb622 100644 --- a/lib/src/model/transaction/transaction_alias.dart +++ b/lib/src/model/transaction/transaction_alias.dart @@ -37,6 +37,7 @@ class AliasTransaction extends AbstractTransaction implements Transaction { NamespaceId namespaceId; int get size => _size(); + AbstractTransaction get abstractTransaction => _abstractTransaction(); String _aliasTransactionToString() { diff --git a/lib/src/model/transaction/transaction_lockfund.dart b/lib/src/model/transaction/transaction_lockfund.dart index 7e56b1e..4760706 100644 --- a/lib/src/model/transaction/transaction_lockfund.dart +++ b/lib/src/model/transaction/transaction_lockfund.dart @@ -37,6 +37,7 @@ class LockFundsTransaction extends AbstractTransaction implements Transaction { SignedTransaction signedTransaction; int get size => _size(); + AbstractTransaction get abstractTransaction => _abstractTransaction(); @override diff --git a/lib/src/model/transaction/transaction_model.dart b/lib/src/model/transaction/transaction_model.dart index e3563b2..3f9b42b 100644 --- a/lib/src/model/transaction/transaction_model.dart +++ b/lib/src/model/transaction/transaction_model.dart @@ -28,8 +28,11 @@ class CosignatureSignedTransaction { abstract class Transaction { AbstractTransaction _abstractTransaction(); + Map toJson(); + Uint8List generateBytes(); + int _size(); } @@ -186,7 +189,7 @@ class TransactionType { throw errUnknownTransactionType; } - Uint8List toBytes(){ + Uint8List toBytes() { final buffer = Uint8List(2).buffer; final s = ByteData.view(buffer); @@ -307,6 +310,7 @@ class AbstractTransaction with TransactionInfo { PublicAccount signer; PublicAccount get toAggregate => signer; + set toAggregate(PublicAccount signer) => this.signer = signer; void _generateMeta(MetaTransactionDTO dto) { diff --git a/lib/src/model/transaction/transaction_mosaic.dart b/lib/src/model/transaction/transaction_mosaic.dart index a350801..97efb8b 100644 --- a/lib/src/model/transaction/transaction_mosaic.dart +++ b/lib/src/model/transaction/transaction_mosaic.dart @@ -37,6 +37,7 @@ class MosaicDefinitionTransaction extends AbstractTransaction MosaicId mosaicId; int get size => _size(); + AbstractTransaction get abstractTransaction => _abstractTransaction(); static List listFromDTO( @@ -169,6 +170,7 @@ class MosaicSupplyChangeTransaction extends AbstractTransaction MosaicId mosaicId; int get size => _size(); + AbstractTransaction get abstractTransaction => _abstractTransaction(); static List listFromDTO( diff --git a/lib/src/model/transaction/transaction_multisig.dart b/lib/src/model/transaction/transaction_multisig.dart index 731b9ab..1fc5660 100644 --- a/lib/src/model/transaction/transaction_multisig.dart +++ b/lib/src/model/transaction/transaction_multisig.dart @@ -96,6 +96,7 @@ class ModifyMultisigAccountTransaction extends AbstractTransaction List modifications; int get size => _size(); + AbstractTransaction get abstractTransaction => _abstractTransaction(); static List listFromDTO( diff --git a/lib/src/model/uint64/uint64_model.dart b/lib/src/model/uint64/uint64_model.dart index db0e25d..8574f28 100644 --- a/lib/src/model/uint64/uint64_model.dart +++ b/lib/src/model/uint64/uint64_model.dart @@ -8,7 +8,7 @@ part of xpx_chain_sdk.uint64; class Uint64 implements Comparable { factory Uint64([final num value = 0, final num value2 = 0]) { if (_minValueSigned > value || _minValueSigned > value2) { - throw new ArgumentError('Minimum value must be $_minValueUnsigned'); + throw ArgumentError('Minimum value must be $_minValueUnsigned'); } // check if user is trying to create using an array of (32-bit) int diff --git a/pubspec.yaml b/pubspec.yaml index 7327a95..7f25367 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: xpx_chain_sdk -version: 0.0.5+2 +version: 0.0.5+3 author: 'Eleazar Garrido ' description: 'The ProximaX Sirius Chain Dart SDK works as a lightweight Dart library for interacting with the Sirius Blockchain.'