diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e658d3d822..2fcf01f090 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,11 +53,7 @@ jobs: - name: Install Packages if: steps.lerna-cache.outputs.cache-hit != 'true' || contains( github.event.pull_request.labels.*.name, 'SKIP_CACHE') - run: yarn install --with-frozen-lockfile - - - name: build packages - if: steps.lerna-cache.outputs.cache-hit == 'true' - run: yarn run postinstall + run: yarn install --with-frozen-lockfile --ignore-scripts - name: Lint Commit Messages run: | @@ -69,6 +65,9 @@ jobs: - name: Dependency Audit run: yarn run improved-yarn-audit --min-severity high + - name: Print prettier version + run: ./node_modules/.bin/prettier --version + - name: Lint Source Code run: yarn run lint @@ -78,6 +77,10 @@ jobs: - name: Check Package Dependencies run: yarn run check-deps + - name: build packages + if: steps.lerna-cache.outputs.cache-hit == 'true' + run: yarn run postinstall + - name: Unit Test run: yarn run unit-test-changed env: diff --git a/.gitignore b/.gitignore index 917f073603..f586e85fc4 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ lab/ .vscode/ .env .yarn -modules/**/dist/ \ No newline at end of file +modules/**/dist/ +dist diff --git a/CODEOWNERS b/CODEOWNERS index 1ed00c2a3e..b66080fa1d 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -47,6 +47,7 @@ /modules/abstract-cosmos/ @BitGo/ethalt-team /modules/sdk-coin-ada/ @BitGo/ethalt-team /modules/sdk-coin-algo/ @BitGo/ethalt-team +/modules/sdk-coin-apt/ @Bitgo/ethalt-team /modules/sdk-coin-arbeth/ @BitGo/ethalt-team /modules/sdk-coin-atom/ @BitGo/ethalt-team /modules/sdk-coin-avaxc/ @BitGo/ethalt-team diff --git a/Dockerfile b/Dockerfile index 3597de6c8f..56d921e1f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,6 +55,7 @@ COPY --from=builder /tmp/bitgo/modules/sdk-api /var/modules/sdk-api/ COPY --from=builder /tmp/bitgo/modules/unspents /var/modules/unspents/ COPY --from=builder /tmp/bitgo/modules/account-lib /var/modules/account-lib/ COPY --from=builder /tmp/bitgo/modules/sdk-coin-algo /var/modules/sdk-coin-algo/ +COPY --from=builder /tmp/bitgo/modules/sdk-coin-apt /var/modules/sdk-coin-apt/ COPY --from=builder /tmp/bitgo/modules/sdk-coin-arbeth /var/modules/sdk-coin-arbeth/ COPY --from=builder /tmp/bitgo/modules/abstract-eth /var/modules/abstract-eth/ COPY --from=builder /tmp/bitgo/modules/sdk-coin-atom /var/modules/sdk-coin-atom/ @@ -126,6 +127,7 @@ cd /var/modules/sdk-api && yarn link && \ cd /var/modules/unspents && yarn link && \ cd /var/modules/account-lib && yarn link && \ cd /var/modules/sdk-coin-algo && yarn link && \ +cd /var/modules/sdk-coin-apt && yarn link && \ cd /var/modules/sdk-coin-arbeth && yarn link && \ cd /var/modules/abstract-eth && yarn link && \ cd /var/modules/sdk-coin-atom && yarn link && \ @@ -200,6 +202,7 @@ RUN cd /var/bitgo-express && \ yarn link @bitgo/unspents && \ yarn link @bitgo/account-lib && \ yarn link @bitgo/sdk-coin-algo && \ + yarn link @bitgo/sdk-coin-apt && \ yarn link @bitgo/sdk-coin-arbeth && \ yarn link @bitgo/abstract-eth && \ yarn link @bitgo/sdk-coin-atom && \ diff --git a/modules/abstract-cosmos/resources/MsgCompiled.js b/modules/abstract-cosmos/resources/MsgCompiled.js index e3e3e2b1ae..4ce4bf91ac 100644 --- a/modules/abstract-cosmos/resources/MsgCompiled.js +++ b/modules/abstract-cosmos/resources/MsgCompiled.js @@ -498,8 +498,8 @@ $root.common = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.decimals) : options.longs === Number - ? new $util.LongBits(message.decimals.low >>> 0, message.decimals.high >>> 0).toNumber() - : message.decimals; + ? new $util.LongBits(message.decimals.low >>> 0, message.decimals.high >>> 0).toNumber() + : message.decimals; return object; }; @@ -1678,8 +1678,8 @@ $root.types = (function () { options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array - ? Array.prototype.slice.call(message.signer) - : message.signer; + ? Array.prototype.slice.call(message.signer) + : message.signer; return object; }; @@ -1945,15 +1945,15 @@ $root.types = (function () { options.bytes === String ? $util.base64.encode(message.fromAddress, 0, message.fromAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.fromAddress) - : message.fromAddress; + ? Array.prototype.slice.call(message.fromAddress) + : message.fromAddress; if (message.toAddress != null && message.hasOwnProperty('toAddress')) object.toAddress = options.bytes === String ? $util.base64.encode(message.toAddress, 0, message.toAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.toAddress) - : message.toAddress; + ? Array.prototype.slice.call(message.toAddress) + : message.toAddress; if (message.amount && message.amount.length) { object.amount = []; for (var j = 0; j < message.amount.length; ++j) diff --git a/modules/abstract-eth/src/abstractEthLikeNewCoins.ts b/modules/abstract-eth/src/abstractEthLikeNewCoins.ts index 3e2d3ba3f7..4fa6a65da2 100644 --- a/modules/abstract-eth/src/abstractEthLikeNewCoins.ts +++ b/modules/abstract-eth/src/abstractEthLikeNewCoins.ts @@ -1367,8 +1367,8 @@ export abstract class AbstractEthLikeNewCoins extends AbstractEthLikeCoin { const gasPrice = params.eip1559 ? new optionalDeps.ethUtil.BN(params.eip1559.maxFeePerGas) : params.gasPrice - ? new optionalDeps.ethUtil.BN(this.setGasPrice(params.gasPrice)) - : await this.getGasPriceFromExternalAPI(); + ? new optionalDeps.ethUtil.BN(this.setGasPrice(params.gasPrice)) + : await this.getGasPriceFromExternalAPI(); const bitgoFeeAddressNonce = await this.getAddressNonce(bitgoFeeAddress); diff --git a/modules/bitgo/.mocharc.yml b/modules/bitgo/.mocharc.yml index e45f770826..4d679fec18 100644 --- a/modules/bitgo/.mocharc.yml +++ b/modules/bitgo/.mocharc.yml @@ -4,4 +4,4 @@ reporter: 'min' reporter-option: - 'cdn=true' - 'json=false' -exit: true \ No newline at end of file +exit: true diff --git a/modules/bitgo/package.json b/modules/bitgo/package.json index f5a93ab64e..3d69b9a70d 100644 --- a/modules/bitgo/package.json +++ b/modules/bitgo/package.json @@ -51,6 +51,7 @@ "@bitgo/sdk-api": "^1.56.3", "@bitgo/sdk-coin-ada": "^4.3.4", "@bitgo/sdk-coin-algo": "^2.1.43", + "@bitgo/sdk-coin-apt": "^1.0.0", "@bitgo/sdk-coin-arbeth": "^21.0.37", "@bitgo/sdk-coin-atom": "^13.1.1", "@bitgo/sdk-coin-avaxc": "^5.1.6", diff --git a/modules/bitgo/src/v2/coinFactory.ts b/modules/bitgo/src/v2/coinFactory.ts index cc5344303a..b2b62cccfe 100644 --- a/modules/bitgo/src/v2/coinFactory.ts +++ b/modules/bitgo/src/v2/coinFactory.ts @@ -13,6 +13,7 @@ import { tokens } from '../config'; import { Ada, Algo, + Apt, Arbeth, ArbethToken, Atom, @@ -74,6 +75,7 @@ import { Ton, Tada, Talgo, + Tapt, Tarbeth, Tatom, TavaxC, @@ -140,6 +142,7 @@ import { function registerCoinConstructors(globalCoinFactory: CoinFactory): void { globalCoinFactory.register('ada', Ada.createInstance); globalCoinFactory.register('algo', Algo.createInstance); + globalCoinFactory.register('apt', Apt.createInstance); globalCoinFactory.register('arbeth', Arbeth.createInstance); globalCoinFactory.register('atom', Atom.createInstance); globalCoinFactory.register('avaxc', AvaxC.createInstance); @@ -191,6 +194,7 @@ function registerCoinConstructors(globalCoinFactory: CoinFactory): void { globalCoinFactory.register('tia', Tia.createInstance); globalCoinFactory.register('ton', Ton.createInstance); globalCoinFactory.register('talgo', Talgo.createInstance); + globalCoinFactory.register('tapt', Tapt.createInstance); globalCoinFactory.register('tarbeth', Tarbeth.createInstance); globalCoinFactory.register('tada', Tada.createInstance); globalCoinFactory.register('tatom', Tatom.createInstance); diff --git a/modules/bitgo/src/v2/coins/index.ts b/modules/bitgo/src/v2/coins/index.ts index 23fe90dcb4..06ca4d441b 100644 --- a/modules/bitgo/src/v2/coins/index.ts +++ b/modules/bitgo/src/v2/coins/index.ts @@ -2,6 +2,7 @@ import { AbstractUtxoCoin } from '@bitgo/abstract-utxo'; import { AbstractLightningCoin } from '@bitgo/abstract-lightning'; import { Ada, Tada } from '@bitgo/sdk-coin-ada'; import { Algo, AlgoToken, Talgo } from '@bitgo/sdk-coin-algo'; +import { Apt, Tapt } from '@bitgo/sdk-coin-apt'; import { Arbeth, Tarbeth, ArbethToken } from '@bitgo/sdk-coin-arbeth'; import { Atom, Tatom } from '@bitgo/sdk-coin-atom'; import { AvaxC, AvaxCToken, TavaxC } from '@bitgo/sdk-coin-avaxc'; @@ -54,6 +55,7 @@ import { Zketh, Tzketh, ZkethToken } from '@bitgo/sdk-coin-zketh'; export { AbstractUtxoCoin }; export { AbstractLightningCoin }; export { Algo, AlgoToken, Talgo }; +export { Apt, Tapt }; export { Arbeth, Tarbeth, ArbethToken }; export { Ada, Tada }; export { Atom, Tatom }; diff --git a/modules/bitgo/test/integration/index.html b/modules/bitgo/test/integration/index.html index 32c4c42e4e..1c7afb24fc 100644 --- a/modules/bitgo/test/integration/index.html +++ b/modules/bitgo/test/integration/index.html @@ -1,4 +1,4 @@ - + Mocha diff --git a/modules/bitgo/test/integration/wallet.ts b/modules/bitgo/test/integration/wallet.ts index 1cea20b960..c5c26154a7 100644 --- a/modules/bitgo/test/integration/wallet.ts +++ b/modules/bitgo/test/integration/wallet.ts @@ -1501,15 +1501,15 @@ describe('Wallet API', function () { amount: 0.01 * 1e8, }); recipients[TestBitGo.TEST_WALLET2_ADDRESS] = 0.01 * 1e8; - return TransactionBuilder.createTransaction({ wallet: wallet1, recipients: recipients }).then(function ( - result - ) { - result.should.have.property('unspents'); - result.txInfo.nP2pkhInputs.should.equal(15); - result.should.have.property('fee'); - result.should.have.property('feeRate'); - result.walletId.should.equal(wallet1.id()); - }); + return TransactionBuilder.createTransaction({ wallet: wallet1, recipients: recipients }).then( + function (result) { + result.should.have.property('unspents'); + result.txInfo.nP2pkhInputs.should.equal(15); + result.should.have.property('fee'); + result.should.have.property('feeRate'); + result.walletId.should.equal(wallet1.id()); + } + ); }); it('Filter uneconomic unspents test, no feerate set', function () { @@ -1658,14 +1658,14 @@ describe('Wallet API', function () { amount: 0.01 * 1e8, }); recipients[TestBitGo.TEST_WALLET2_ADDRESS] = 0.01 * 1e8; - return TransactionBuilder.createTransaction({ wallet: wallet1, recipients: recipients }).then(function ( - result - ) { - result.should.have.property('unspents'); - result.should.have.property('fee'); - result.should.have.property('feeRate'); - result.walletId.should.equal(wallet1.id()); - }); + return TransactionBuilder.createTransaction({ wallet: wallet1, recipients: recipients }).then( + function (result) { + result.should.have.property('unspents'); + result.should.have.property('fee'); + result.should.have.property('feeRate'); + result.walletId.should.equal(wallet1.id()); + } + ); }); }); diff --git a/modules/bitgo/test/v2/unit/coins/utxo/transaction.ts b/modules/bitgo/test/v2/unit/coins/utxo/transaction.ts index ac0c97dcc9..fcdc3314af 100644 --- a/modules/bitgo/test/v2/unit/coins/utxo/transaction.ts +++ b/modules/bitgo/test/v2/unit/coins/utxo/transaction.ts @@ -453,8 +453,8 @@ function run( v === undefined || v instanceof utxolib.bitgo.UtxoPsbt ? undefined : v instanceof utxolib.bitgo.UtxoTransaction - ? transactionToObj(v) - : transactionHexToObj(v.txHex, coin.network, amountType) + ? transactionToObj(v) + : transactionHexToObj(v.txHex, coin.network, amountType) ) as TransactionObjStages; } @@ -563,10 +563,10 @@ function run( stageName === 'prebuild' || pubs === undefined ? 0 : stageName.startsWith('halfSigned') - ? 1 - : stageName.startsWith('fullSigned') - ? 2 - : undefined; + ? 1 + : stageName.startsWith('fullSigned') + ? 2 + : undefined; explanation.inputSignatures.should.eql( // FIXME(BG-35154): implement signature verification for replay protection inputs diff --git a/modules/bitgo/test/v2/unit/internal/tssUtils/ecdsa.ts b/modules/bitgo/test/v2/unit/internal/tssUtils/ecdsa.ts index 7885ac1f20..185c8e012b 100644 --- a/modules/bitgo/test/v2/unit/internal/tssUtils/ecdsa.ts +++ b/modules/bitgo/test/v2/unit/internal/tssUtils/ecdsa.ts @@ -144,9 +144,8 @@ describe('TSS Ecdsa Utils:', async function () { curve: 'secp256k1', }), ]; - [userGpgKey, userLocalBackupGpgKey, thirdPartyBackupGpgKeyPair, bitGoGPGKeyPair] = await Promise.all( - gpgKeyPromises - ); + [userGpgKey, userLocalBackupGpgKey, thirdPartyBackupGpgKeyPair, bitGoGPGKeyPair] = + await Promise.all(gpgKeyPromises); thirdPartyBackupPublicGpgKey = await openpgp.readKey({ armoredKey: thirdPartyBackupGpgKeyPair.publicKey }); bitgoPublicKey = await openpgp.readKey({ armoredKey: bitGoGPGKeyPair.publicKey }); const constants = { diff --git a/modules/bitgo/tsconfig.json b/modules/bitgo/tsconfig.json index cb41ab01da..91a780a291 100644 --- a/modules/bitgo/tsconfig.json +++ b/modules/bitgo/tsconfig.json @@ -44,6 +44,9 @@ { "path": "../sdk-coin-algo" }, + { + "path": "../sdk-coin-apt" + }, { "path": "../sdk-coin-arbeth" }, diff --git a/modules/blake2b-wasm/example.html b/modules/blake2b-wasm/example.html index 273c311dec..33d1fc09f6 100644 --- a/modules/blake2b-wasm/example.html +++ b/modules/blake2b-wasm/example.html @@ -1,4 +1,4 @@ - + Blake2b-WASM Demo diff --git a/modules/blockapis/src/BaseHttpClient.ts b/modules/blockapis/src/BaseHttpClient.ts index 9066ea8853..f03646d552 100644 --- a/modules/blockapis/src/BaseHttpClient.ts +++ b/modules/blockapis/src/BaseHttpClient.ts @@ -2,7 +2,10 @@ import * as superagent from 'superagent'; import * as Bluebird from 'bluebird'; export class ApiRequestError extends Error { - constructor(public url: string, public reason: Error | string) { + constructor( + public url: string, + public reason: Error | string + ) { super(`error in API request: ${url}: ${reason}`); } diff --git a/modules/blockapis/src/CachingHttpClient.ts b/modules/blockapis/src/CachingHttpClient.ts index c6b6cf2b84..5c1ee1b4b9 100644 --- a/modules/blockapis/src/CachingHttpClient.ts +++ b/modules/blockapis/src/CachingHttpClient.ts @@ -15,7 +15,10 @@ export class CachingHttpClient implements HttpClient { client: BaseHttpClient; isHttpEnabled: boolean; - constructor(private cacheDir: string, { client = new BaseHttpClient(), isHttpEnabled = true } = {}) { + constructor( + private cacheDir: string, + { client = new BaseHttpClient(), isHttpEnabled = true } = {} + ) { this.client = client; this.isHttpEnabled = isHttpEnabled; } diff --git a/modules/blockapis/src/impl/BlockchairApi.ts b/modules/blockapis/src/impl/BlockchairApi.ts index 9b6e5af406..035d6bb6d5 100644 --- a/modules/blockapis/src/impl/BlockchairApi.ts +++ b/modules/blockapis/src/impl/BlockchairApi.ts @@ -118,7 +118,10 @@ export class BlockchairApi implements AddressApi, UtxoApi { return new BlockchairApi(httpClient.withBaseUrl(`https://api.blockchair.com/${blockchain}`), params.apiToken); } - constructor(public client: HttpClient, apiToken?: string) { + constructor( + public client: HttpClient, + apiToken?: string + ) { this.apiToken = apiToken ?? process.env.BLOCKCHAIR_TOKEN; } diff --git a/modules/blockapis/test/UtxoApi.ts b/modules/blockapis/test/UtxoApi.ts index fc3249728d..3290f1db42 100644 --- a/modules/blockapis/test/UtxoApi.ts +++ b/modules/blockapis/test/UtxoApi.ts @@ -48,7 +48,11 @@ class TestCase { * @param methodName - method to test * @param args - method arguments */ - constructor(public coinName: string, public methodName: keyof UtxoApi, public args: unknown[]) {} + constructor( + public coinName: string, + public methodName: keyof UtxoApi, + public args: unknown[] + ) {} /** * Call the method on the given API. diff --git a/modules/bls-dkg/index.js b/modules/bls-dkg/index.js index b37eb2cd95..b6c0b8982f 100644 --- a/modules/bls-dkg/index.js +++ b/modules/bls-dkg/index.js @@ -184,9 +184,12 @@ function mergeSecretShares(shares) { /** Merge public shares to produce a common public key. */ function mergePublicShares(shares) { - const sum = shares.slice(1).reduce((sum, share) => { - return sum.add(bls.PointG1.fromCompressedHex(bigIntToBuffer(share))); - }, bls.PointG1.fromCompressedHex(bigIntToBuffer(shares[0]))); + const sum = shares.slice(1).reduce( + (sum, share) => { + return sum.add(bls.PointG1.fromCompressedHex(bigIntToBuffer(share))); + }, + bls.PointG1.fromCompressedHex(bigIntToBuffer(shares[0])) + ); return bufferToBigInt(sum.toCompressedHex()); } diff --git a/modules/express/EXTERNAL_SIGNER.md b/modules/express/EXTERNAL_SIGNER.md index b3939c073b..654cbb6057 100644 --- a/modules/express/EXTERNAL_SIGNER.md +++ b/modules/express/EXTERNAL_SIGNER.md @@ -30,15 +30,15 @@ The file is located at `src/fetchEncryptedPrivKeys.ts`. Before using this tool, 1. Fill in the `TODOs` by providing a valid `accessToken` as well as the list of `walletIds`, grouped by the cryptocurrency. 2. Using the same information as #1, update the .env file with the `accessToken` and `walletIds` information. -| Name | Value | Description | -| ----------------------------------------- | ------ | ---------------------------------------------- | -| BITGO_EXTERNAL_SIGNER_ENV | string | test | -| BITGO_EXTERNAL_SIGNER_ACCESS_TOKEN | string | Access token used for access BitGo Wallets | -| BITGO_EXTERNAL_SIGNER_WALLET_IDS | string | JSON formatted string of wallets and their | -| | | ids, the secret is optional for unencrypted | -| | | private material | -| BITGO_EXTERNAL_SIGNER_WALLET_IDS_WITH_PRV | string | JSON formatted string of wallets ids and | -| | | their encrypted private keys | +| Name | Value | Description | +| ----------------------------------------- | ------ | ------------------------------------------- | +| BITGO_EXTERNAL_SIGNER_ENV | string | test | +| BITGO_EXTERNAL_SIGNER_ACCESS_TOKEN | string | Access token used for access BitGo Wallets | +| BITGO_EXTERNAL_SIGNER_WALLET_IDS | string | JSON formatted string of wallets and their | +| | | ids, the secret is optional for unencrypted | +| | | private material | +| BITGO_EXTERNAL_SIGNER_WALLET_IDS_WITH_PRV | string | JSON formatted string of wallets ids and | +| | | their encrypted private keys | BITGO_EXTERNAL_SIGNER_WALLET_IDS examples: diff --git a/modules/express/README.md b/modules/express/README.md index aa0f4772a4..a9c9fef10c 100644 --- a/modules/express/README.md +++ b/modules/express/README.md @@ -80,6 +80,7 @@ $ docker run -it --volume /path/to/certs:/private -p 4000:4000 bitgo/express:lat ``` An alternative way to provide the ssl certification is to export them as environment variables. + ```bash $ export BITGO_SSL_KEY=$(cat /private/cert.key) $ export BITGO_SSL_CERT=$(cat /private/cert.cert) @@ -217,10 +218,10 @@ BitGo Express is able to take configuration options from either command line arg | -t | --timeout | `BITGO_TIMEOUT` | 305000 | Number of milliseconds to wait before requests made by `bitgo-express` time out. | | -d | --debug | N/A, use `BITGO_DEBUG_NAMESPACE` instead | N/A | Enable debug output for bitgo-express. This is equivalent to passing `--debugnamespace bitgo:express`. | | -D | --debugnamespace | `BITGO_DEBUG_NAMESPACE` | N/A | Enable debug output for a particular debug namespace. Multiple debug namespaces can be given as a comma separated list. See the [`bitgo` package README](https://github.com/BitGo/BitGoJS/blob/master/modules/bitgo/README.md#available-debug-namespaces) for a complete list of recognized options, in addition to those listed in the table below. | -| -k | --keypath | `BITGO_KEYPATH` | N/A | Path to SSL .key file (either `keypath` or `sslkey` required if running against production environment). | -| N/A | --sslkey | `BITGO_SSL_KEY` | N/A | The SSL key (either `keypath` or `sslkey` required if running against production environment). | +| -k | --keypath | `BITGO_KEYPATH` | N/A | Path to SSL .key file (either `keypath` or `sslkey` required if running against production environment). | +| N/A | --sslkey | `BITGO_SSL_KEY` | N/A | The SSL key (either `keypath` or `sslkey` required if running against production environment). | | -c | --crtpath | `BITGO_CRTPATH` | N/A | Path to SSL .crt file (required if running against production environment). | -| N/A | --sslcert | `BITGO_SSL_CERT` | N/A | The SSL cert (either `crtpath` or `sslcert` required if running against production environment). | +| N/A | --sslcert | `BITGO_SSL_CERT` | N/A | The SSL cert (either `crtpath` or `sslcert` required if running against production environment). | | -u | --customrooturi | `BITGO_CUSTOM_ROOT_URI` | N/A | Force a custom BitGo URI. | | -n | --custombitcoinnetwork | `BITGO_CUSTOM_BITCOIN_NETWORK` | N/A | Force a custom BitGo network | | -l | --logfile | `BITGO_LOGFILE` | N/A | Filepath to write access logs. | diff --git a/modules/express/bin/bitgo-express b/modules/express/bin/bitgo-express index 1954fd323b..1598a57a4c 100755 --- a/modules/express/bin/bitgo-express +++ b/modules/express/bin/bitgo-express @@ -11,8 +11,7 @@ process.on('unhandledRejection', (reason, promise) => { const { init } = require('../dist/src/expressApp'); if (require.main === module) { - init() - .catch(err => { + init().catch((err) => { console.log(`Fatal error: ${err.message}`); console.log(err.stack); }); diff --git a/modules/express/src/clientRoutes.ts b/modules/express/src/clientRoutes.ts index a205cee6ba..e7f466e06d 100755 --- a/modules/express/src/clientRoutes.ts +++ b/modules/express/src/clientRoutes.ts @@ -1229,9 +1229,11 @@ function prepareBitGo(config: Config) { } type RequestHandlerResponse = string | unknown | undefined | { status: number; body: unknown }; interface RequestHandler extends express.RequestHandler { - (req: express.Request, res: express.Response, next: express.NextFunction): - | RequestHandlerResponse - | Promise; + ( + req: express.Request, + res: express.Response, + next: express.NextFunction + ): RequestHandlerResponse | Promise; } function handleRequestHandlerError(res: express.Response, error: unknown) { diff --git a/modules/sdk-coin-ada/src/lib/transaction.ts b/modules/sdk-coin-ada/src/lib/transaction.ts index b834b41dc7..46e4248b4c 100644 --- a/modules/sdk-coin-ada/src/lib/transaction.ts +++ b/modules/sdk-coin-ada/src/lib/transaction.ts @@ -387,14 +387,14 @@ export class Transaction extends BaseTransaction { this._type === TransactionType.Send ? 'Transfer' : this._type === TransactionType.StakingActivate - ? 'StakingActivate' - : this._type === TransactionType.StakingWithdraw - ? 'StakingWithdraw' - : this._type === TransactionType.StakingDeactivate - ? 'StakingDeactivate' - : this._type === TransactionType.StakingPledge - ? 'StakingPledge' - : 'undefined'; + ? 'StakingActivate' + : this._type === TransactionType.StakingWithdraw + ? 'StakingWithdraw' + : this._type === TransactionType.StakingDeactivate + ? 'StakingDeactivate' + : this._type === TransactionType.StakingPledge + ? 'StakingPledge' + : 'undefined'; return { displayOrder, id: txJson.id, diff --git a/modules/sdk-coin-algo/src/lib/keyRegistrationBuilder.ts b/modules/sdk-coin-algo/src/lib/keyRegistrationBuilder.ts index a8be069a16..8c4726bf9e 100644 --- a/modules/sdk-coin-algo/src/lib/keyRegistrationBuilder.ts +++ b/modules/sdk-coin-algo/src/lib/keyRegistrationBuilder.ts @@ -130,8 +130,8 @@ export class KeyRegistrationBuilder extends TransactionBuilder { return this.isOfflineKeyRegAccountLibTransaction() ? this.buildOfflineKeyRegTransaction() : this.isNonParticipationKeyRegAccountLibTransaction() - ? this.buildNonParticipationKeyRegTransaction() - : this.buildOnlineKeyRegTransaction(); + ? this.buildNonParticipationKeyRegTransaction() + : this.buildOnlineKeyRegTransaction(); } private buildOfflineKeyRegTransaction(): algosdk.Transaction { diff --git a/modules/sdk-coin-apt/.eslintignore b/modules/sdk-coin-apt/.eslintignore new file mode 100644 index 0000000000..1586a150fa --- /dev/null +++ b/modules/sdk-coin-apt/.eslintignore @@ -0,0 +1,4 @@ +node_modules +.idea +public +dist diff --git a/modules/sdk-coin-apt/.gitignore b/modules/sdk-coin-apt/.gitignore new file mode 100644 index 0000000000..67ccce4c64 --- /dev/null +++ b/modules/sdk-coin-apt/.gitignore @@ -0,0 +1,3 @@ +node_modules/ +.idea/ +dist/ diff --git a/modules/sdk-coin-apt/.mocharc.yml b/modules/sdk-coin-apt/.mocharc.yml new file mode 100644 index 0000000000..95814796d1 --- /dev/null +++ b/modules/sdk-coin-apt/.mocharc.yml @@ -0,0 +1,8 @@ +require: 'ts-node/register' +timeout: '60000' +reporter: 'min' +reporter-option: + - 'cdn=true' + - 'json=false' +exit: true +spec: ['test/unit/**/*.ts'] diff --git a/modules/sdk-coin-apt/.npmignore b/modules/sdk-coin-apt/.npmignore new file mode 100644 index 0000000000..d5fb3a098c --- /dev/null +++ b/modules/sdk-coin-apt/.npmignore @@ -0,0 +1,14 @@ +!dist/ +dist/test/ +dist/tsconfig.tsbuildinfo +.idea/ +.prettierrc.yml +tsconfig.json +src/ +test/ +scripts/ +.nyc_output +CODEOWNERS +node_modules/ +.prettierignore +.mocharc.js diff --git a/modules/sdk-coin-apt/.prettierignore b/modules/sdk-coin-apt/.prettierignore new file mode 100644 index 0000000000..3a11d6af29 --- /dev/null +++ b/modules/sdk-coin-apt/.prettierignore @@ -0,0 +1,2 @@ +.nyc_output/ +dist/ diff --git a/modules/sdk-coin-apt/.prettierrc.yml b/modules/sdk-coin-apt/.prettierrc.yml new file mode 100644 index 0000000000..7c3d8dd32a --- /dev/null +++ b/modules/sdk-coin-apt/.prettierrc.yml @@ -0,0 +1,3 @@ +printWidth: 120 +singleQuote: true +trailingComma: 'es5' diff --git a/modules/sdk-coin-apt/README.md b/modules/sdk-coin-apt/README.md new file mode 100644 index 0000000000..0bfe4304da --- /dev/null +++ b/modules/sdk-coin-apt/README.md @@ -0,0 +1,30 @@ +# BitGo sdk-coin-apt + +SDK coins provide a modular approach to a monolithic architecture. This and all BitGoJS SDK coins allow developers to use only the coins needed for a given project. + +## Installation + +All coins are loaded traditionally through the `bitgo` package. If you are using coins individually, you will be accessing the coin via the `@bitgo/sdk-api` package. + +In your project install both `@bitgo/sdk-api` and `@bitgo/sdk-coin-apt`. + +```shell +npm i @bitgo/sdk-api @bitgo/sdk-coin-apt +``` + +Next, you will be able to initialize an instance of "bitgo" through `@bitgo/sdk-api` instead of `bitgo`. + +```javascript +import { BitGoAPI } from '@bitgo/sdk-api'; +import { Apt } from '@bitgo/sdk-coin-apt'; + +const sdk = new BitGoAPI(); + +sdk.register('apt', Apt.createInstance); +``` + +## Development + +Most of the coin implementations are derived from `@bitgo/sdk-core`, `@bitgo/statics`, and coin specific packages. These implementations are used to interact with the BitGo API and BitGo platform services. + +You will notice that the basic version of common class extensions have been provided to you and must be resolved before the package build will succeed. Upon initiation of a given SDK coin, you will need to verify that your coin has been included in the root `tsconfig.packages.json` and that the linting, formatting, and testing succeeds when run both within the coin and from the root of BitGoJS. diff --git a/modules/sdk-coin-apt/package.json b/modules/sdk-coin-apt/package.json new file mode 100644 index 0000000000..f99a485192 --- /dev/null +++ b/modules/sdk-coin-apt/package.json @@ -0,0 +1,51 @@ +{ + "name": "@bitgo/sdk-coin-apt", + "version": "1.0.0", + "description": "BitGo SDK coin library for APT (Aptos) coin", + "main": "./dist/src/index.js", + "types": "./dist/src/index.d.ts", + "scripts": { + "build": "yarn tsc --build --incremental --verbose .", + "fmt": "prettier --write .", + "check-fmt": "prettier --check .", + "clean": "rm -r ./dist", + "lint": "eslint --quiet .", + "prepare": "npm run build", + "test": "npm run coverage", + "coverage": "nyc -- npm run unit-test", + "unit-test": "mocha" + }, + "author": "BitGo SDK Team ", + "license": "MIT", + "engines": { + "node": ">=16 <21" + }, + "repository": { + "type": "git", + "url": "https://github.com/BitGo/BitGoJS.git", + "directory": "modules/sdk-coin-apt" + }, + "lint-staged": { + "*.{js,ts}": [ + "yarn prettier --write", + "yarn eslint --fix" + ] + }, + "publishConfig": { + "access": "public" + }, + "nyc": { + "extension": [ + ".ts" + ] + }, + "dependencies": { + "@bitgo/sdk-core": "^28.13.1", + "@bitgo/statics": "^50.6.0", + "bignumber.js": "^9.1.2" + }, + "devDependencies": { + "@bitgo/sdk-api": "^1.56.3", + "@bitgo/sdk-test": "^8.0.50" + } +} diff --git a/modules/sdk-coin-apt/src/apt.ts b/modules/sdk-coin-apt/src/apt.ts new file mode 100644 index 0000000000..d7fc49b020 --- /dev/null +++ b/modules/sdk-coin-apt/src/apt.ts @@ -0,0 +1,76 @@ +import { + BaseCoin, + BitGoBase, + KeyPair, + ParsedTransaction, + ParseTransactionOptions, + SignedTransaction, + SignTransactionOptions, + VerifyAddressOptions, + VerifyTransactionOptions, +} from '@bitgo/sdk-core'; +import { BaseCoin as StaticsBaseCoin } from '@bitgo/statics'; + +export class Apt extends BaseCoin { + protected readonly _staticsCoin: Readonly; + protected constructor(bitgo: BitGoBase, staticsCoin?: Readonly) { + super(bitgo); + + if (!staticsCoin) { + throw new Error('missing required constructor parameter staticsCoin'); + } + + this._staticsCoin = staticsCoin; + } + + static createInstance(bitgo: BitGoBase, staticsCoin?: Readonly): BaseCoin { + return new Apt(bitgo, staticsCoin); + } + + /** + * Factor between the coin's base unit and its smallest subdivison + */ + public getBaseFactor(): number { + return 1e8; + } + + public getChain(): string { + return 'apt'; + } + + public getFamily(): string { + return 'apt'; + } + + public getFullName(): string { + return 'Apt'; + } + + verifyTransaction(params: VerifyTransactionOptions): Promise { + throw new Error('Method not implemented.'); + } + + isWalletAddress(params: VerifyAddressOptions): Promise { + throw new Error('Method not implemented.'); + } + + parseTransaction(params: ParseTransactionOptions): Promise { + throw new Error('Method not implemented.'); + } + + generateKeyPair(seed?: Buffer): KeyPair { + throw new Error('Method not implemented.'); + } + + isValidPub(pub: string): boolean { + throw new Error('Method not implemented.'); + } + + isValidAddress(address: string): boolean { + throw new Error('Method not implemented.'); + } + + signTransaction(params: SignTransactionOptions): Promise { + throw new Error('Method not implemented.'); + } +} diff --git a/modules/sdk-coin-apt/src/index.ts b/modules/sdk-coin-apt/src/index.ts new file mode 100644 index 0000000000..dd32f56cfd --- /dev/null +++ b/modules/sdk-coin-apt/src/index.ts @@ -0,0 +1,4 @@ +export * from './lib'; +export * from './register'; +export * from './apt'; +export * from './tapt'; diff --git a/modules/sdk-coin-apt/src/lib/iface.ts b/modules/sdk-coin-apt/src/lib/iface.ts new file mode 100644 index 0000000000..546ef821e8 --- /dev/null +++ b/modules/sdk-coin-apt/src/lib/iface.ts @@ -0,0 +1,6 @@ +/** + * The transaction data returned from the toJson() function of a transaction + */ +export interface TxData { + id: string; +} diff --git a/modules/sdk-coin-apt/src/lib/index.ts b/modules/sdk-coin-apt/src/lib/index.ts new file mode 100644 index 0000000000..aa5217eaac --- /dev/null +++ b/modules/sdk-coin-apt/src/lib/index.ts @@ -0,0 +1,9 @@ +import * as Utils from './utils'; +import * as Interface from './iface'; + +export { KeyPair } from './keyPair'; +export { Transaction } from './transaction'; +export { TransactionBuilder } from './transactionBuilder'; +export { TransferBuilder } from './transferBuilder'; +export { TransactionBuilderFactory } from './transactionBuilderFactory'; +export { Interface, Utils }; diff --git a/modules/sdk-coin-apt/src/lib/keyPair.ts b/modules/sdk-coin-apt/src/lib/keyPair.ts new file mode 100644 index 0000000000..bb4449c74a --- /dev/null +++ b/modules/sdk-coin-apt/src/lib/keyPair.ts @@ -0,0 +1,23 @@ +import { DefaultKeys, Ed25519KeyPair } from '@bitgo/sdk-core'; + +export class KeyPair extends Ed25519KeyPair { + /** @inheritdoc */ + getKeys(): DefaultKeys { + throw new Error('Method not implemented.'); + } + + /** @inheritdoc */ + recordKeysFromPrivateKeyInProtocolFormat(prv: string): DefaultKeys { + throw new Error('Method not implemented.'); + } + + /** @inheritdoc */ + recordKeysFromPublicKeyInProtocolFormat(pub: string): DefaultKeys { + throw new Error('Method not implemented.'); + } + + /** @inheritdoc */ + getAddress(): string { + throw new Error('Method not implemented.'); + } +} diff --git a/modules/sdk-coin-apt/src/lib/transaction.ts b/modules/sdk-coin-apt/src/lib/transaction.ts new file mode 100644 index 0000000000..431c397b49 --- /dev/null +++ b/modules/sdk-coin-apt/src/lib/transaction.ts @@ -0,0 +1,16 @@ +import { BaseKey, BaseTransaction } from '@bitgo/sdk-core'; +import { TxData } from './iface'; + +export class Transaction extends BaseTransaction { + canSign(key: BaseKey): boolean { + return false; + } + + toBroadcastFormat(): string { + throw new Error('Method not implemented.'); + } + + toJson(): TxData { + throw new Error('Method not implemented.'); + } +} diff --git a/modules/sdk-coin-apt/src/lib/transactionBuilder.ts b/modules/sdk-coin-apt/src/lib/transactionBuilder.ts new file mode 100644 index 0000000000..04175935ff --- /dev/null +++ b/modules/sdk-coin-apt/src/lib/transactionBuilder.ts @@ -0,0 +1,99 @@ +import { + BaseAddress, + BaseKey, + BaseTransactionBuilder, + BuildTransactionError, + FeeOptions, + PublicKey as BasePublicKey, + Signature, + TransactionType, +} from '@bitgo/sdk-core'; +import { Transaction } from './transaction'; +import utils from './utils'; +import BigNumber from 'bignumber.js'; + +export abstract class TransactionBuilder extends BaseTransactionBuilder { + protected _transaction: Transaction; + private _signatures: Signature[] = []; + + // get and set region + /** + * The transaction type. + */ + protected abstract get transactionType(): TransactionType; + + /** @inheritdoc */ + protected get transaction(): Transaction { + return this._transaction; + } + + /** @inheritdoc */ + protected set transaction(transaction: Transaction) { + this._transaction = transaction; + } + + /** @inheritdoc */ + protected signImplementation(key: BaseKey): Transaction { + throw new Error('Method not implemented.'); + } + + /** @inheritDoc */ + addSignature(publicKey: BasePublicKey, signature: Buffer): void { + this._signatures.push({ publicKey, signature }); + } + + /** + * Sets the sender of this transaction. + * This account will be responsible for paying transaction fees. + * + * @param {string} senderAddress the account that is sending this transaction + * @returns {TransactionBuilder} This transaction builder + */ + sender(senderAddress: string): this { + throw new Error('Method not implemented.'); + } + + fee(feeOptions: FeeOptions): this { + throw new Error('Method not implemented.'); + } + + /** @inheritdoc */ + protected fromImplementation(rawTransaction: string): Transaction { + throw new Error('Method not implemented.'); + } + + /** @inheritdoc */ + protected async buildImplementation(): Promise { + throw new Error('Method not implemented.'); + } + + // region Validators + /** @inheritdoc */ + validateAddress(address: BaseAddress, addressFormat?: string): void { + if (!utils.isValidAddress(address.address)) { + throw new BuildTransactionError('Invalid address ' + address.address); + } + } + + /** @inheritdoc */ + validateKey(key: BaseKey): void { + throw new Error('Method not implemented.'); + } + + /** @inheritdoc */ + validateRawTransaction(rawTransaction: string): void { + throw new Error('Method not implemented.'); + } + + /** @inheritdoc */ + validateTransaction(transaction?: Transaction): void { + throw new Error('Method not implemented.'); + } + + /** @inheritdoc */ + validateValue(value: BigNumber): void { + if (value.isLessThan(0)) { + throw new BuildTransactionError('Value cannot be less than zero'); + } + } +} diff --git a/modules/sdk-coin-apt/src/lib/transactionBuilderFactory.ts b/modules/sdk-coin-apt/src/lib/transactionBuilderFactory.ts new file mode 100644 index 0000000000..b963ec4b4d --- /dev/null +++ b/modules/sdk-coin-apt/src/lib/transactionBuilderFactory.ts @@ -0,0 +1,20 @@ +import { BaseTransactionBuilderFactory } from '@bitgo/sdk-core'; +import { TransactionBuilder } from './transactionBuilder'; +import { TransferBuilder } from './transferBuilder'; + +export class TransactionBuilderFactory extends BaseTransactionBuilderFactory { + /** @inheritdoc */ + from(raw: string): TransactionBuilder { + throw new Error('Method not implemented.'); + } + + /** @inheritdoc */ + getTransferBuilder(): TransferBuilder { + throw new Error('Method not implemented.'); + } + + /** @inheritdoc */ + getWalletInitializationBuilder(): void { + throw new Error('Method not implemented.'); + } +} diff --git a/modules/sdk-coin-apt/src/lib/transferBuilder.ts b/modules/sdk-coin-apt/src/lib/transferBuilder.ts new file mode 100644 index 0000000000..b7ce748c92 --- /dev/null +++ b/modules/sdk-coin-apt/src/lib/transferBuilder.ts @@ -0,0 +1,13 @@ +import { TransactionBuilder } from './transactionBuilder'; +import { BaseCoin as CoinConfig } from '@bitgo/statics'; +import { TransactionType } from '@bitgo/sdk-core'; + +export class TransferBuilder extends TransactionBuilder { + constructor(_coinConfig: Readonly) { + super(_coinConfig); + } + + protected get transactionType(): TransactionType { + return TransactionType.Send; + } +} diff --git a/modules/sdk-coin-apt/src/lib/utils.ts b/modules/sdk-coin-apt/src/lib/utils.ts new file mode 100644 index 0000000000..b0cdef2405 --- /dev/null +++ b/modules/sdk-coin-apt/src/lib/utils.ts @@ -0,0 +1,37 @@ +import { BaseUtils } from '@bitgo/sdk-core'; + +export class Utils implements BaseUtils { + /** @inheritdoc */ + isValidAddress(address: string): boolean { + throw new Error('Method not implemented.'); + } + + /** @inheritdoc */ + isValidBlockId(hash: string): boolean { + throw new Error('Method not implemented.'); + } + + /** @inheritdoc */ + isValidPrivateKey(key: string): boolean { + throw new Error('Method not implemented.'); + } + + /** @inheritdoc */ + isValidPublicKey(key: string): boolean { + throw new Error('Method not implemented.'); + } + + /** @inheritdoc */ + isValidSignature(signature: string): boolean { + throw new Error('Method not implemented.'); + } + + /** @inheritdoc */ + isValidTransactionId(txId: string): boolean { + throw new Error('Method not implemented.'); + } +} + +const utils = new Utils(); + +export default utils; diff --git a/modules/sdk-coin-apt/src/register.ts b/modules/sdk-coin-apt/src/register.ts new file mode 100644 index 0000000000..8a9ab8e73e --- /dev/null +++ b/modules/sdk-coin-apt/src/register.ts @@ -0,0 +1,8 @@ +import { BitGoBase } from '@bitgo/sdk-core'; +import { Apt } from './apt'; +import { Tapt } from './tapt'; + +export const register = (sdk: BitGoBase): void => { + sdk.register('apt', Apt.createInstance); + sdk.register('tapt', Tapt.createInstance); +}; diff --git a/modules/sdk-coin-apt/src/tapt.ts b/modules/sdk-coin-apt/src/tapt.ts new file mode 100644 index 0000000000..ed7b9e3c1f --- /dev/null +++ b/modules/sdk-coin-apt/src/tapt.ts @@ -0,0 +1,34 @@ +import { BaseCoin, BitGoBase } from '@bitgo/sdk-core'; +import { Apt } from './apt'; +import { BaseCoin as StaticsBaseCoin } from '@bitgo/statics'; + +export class Tapt extends Apt { + protected readonly _staticsCoin: Readonly; + protected constructor(bitgo: BitGoBase, staticsCoin?: Readonly) { + super(bitgo, staticsCoin); + + if (!staticsCoin) { + throw new Error('missing required constructor parameter staticsCoin'); + } + + this._staticsCoin = staticsCoin; + } + + static createInstance(bitgo: BitGoBase, staticsCoin?: Readonly): BaseCoin { + return new Tapt(bitgo, staticsCoin); + } + + /** + * Identifier for the blockchain which supports this coin + */ + public getChain(): string { + return 'tapt'; + } + + /** + * Complete human-readable name of this coin + */ + public getFullName(): string { + return 'Testnet Apt'; + } +} diff --git a/modules/sdk-coin-apt/test/integration/index.ts b/modules/sdk-coin-apt/test/integration/index.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/modules/sdk-coin-apt/test/unit/apt.ts b/modules/sdk-coin-apt/test/unit/apt.ts new file mode 100644 index 0000000000..d81e6d9787 --- /dev/null +++ b/modules/sdk-coin-apt/test/unit/apt.ts @@ -0,0 +1,15 @@ +import 'should'; +import { TestBitGo, TestBitGoAPI } from '@bitgo/sdk-test'; +import { BitGoAPI } from '@bitgo/sdk-api'; +import { Apt, Tapt } from '../../src'; + +describe('APT:', function () { + let bitgo: TestBitGoAPI; + + before(function () { + bitgo = TestBitGo.decorate(BitGoAPI, { env: 'mock' }); + bitgo.safeRegister('apt', Apt.createInstance); + bitgo.safeRegister('tapt', Tapt.createInstance); + bitgo.initializeTestVars(); + }); +}); diff --git a/modules/sdk-coin-apt/tsconfig.json b/modules/sdk-coin-apt/tsconfig.json new file mode 100644 index 0000000000..aa8f5a7e66 --- /dev/null +++ b/modules/sdk-coin-apt/tsconfig.json @@ -0,0 +1,26 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./dist", + "rootDir": "./", + "strictPropertyInitialization": false, + "esModuleInterop": true, + "typeRoots": ["../../types", "./node_modules/@types", "../../node_modules/@types"] + }, + "include": ["src/**/*", "test/**/*"], + "exclude": ["node_modules"], + "references": [ + { + "path": "../sdk-api" + }, + { + "path": "../sdk-core" + }, + { + "path": "../sdk-test" + }, + { + "path": "../statics" + } + ] +} diff --git a/modules/sdk-coin-hbar/src/lib/walletInitializationBuilder.ts b/modules/sdk-coin-hbar/src/lib/walletInitializationBuilder.ts index 64d3ab5f87..46faa2dab6 100644 --- a/modules/sdk-coin-hbar/src/lib/walletInitializationBuilder.ts +++ b/modules/sdk-coin-hbar/src/lib/walletInitializationBuilder.ts @@ -34,14 +34,17 @@ export class WalletInitializationBuilder extends TransactionBuilder { * @returns {proto.ThresholdKey} - The wallet threshold keys */ private buildOwnersKeys(rawKeys = true): proto.ThresholdKey { - return this._owners.reduce((tKeys, key) => { - if (tKeys.keys && tKeys.keys.keys) { - tKeys.keys.keys.push({ - ed25519: toUint8Array(new KeyPair({ pub: key }).getKeys(rawKeys).pub), - }); - } - return tKeys; - }, new proto.ThresholdKey({ threshold: 2, keys: { keys: [] } })); + return this._owners.reduce( + (tKeys, key) => { + if (tKeys.keys && tKeys.keys.keys) { + tKeys.keys.keys.push({ + ed25519: toUint8Array(new KeyPair({ pub: key }).getKeys(rawKeys).pub), + }); + } + return tKeys; + }, + new proto.ThresholdKey({ threshold: 2, keys: { keys: [] } }) + ); } /** @inheritdoc */ diff --git a/modules/sdk-coin-islm/resources/types/ethSecp256k1.ts b/modules/sdk-coin-islm/resources/types/ethSecp256k1.ts index 3d24d5775a..5bc3c2881f 100644 --- a/modules/sdk-coin-islm/resources/types/ethSecp256k1.ts +++ b/modules/sdk-coin-islm/resources/types/ethSecp256k1.ts @@ -166,12 +166,12 @@ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefi export type DeepPartial = T extends Builtin ? T : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; + ? globalThis.Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin diff --git a/modules/sdk-coin-sui/src/lib/mystenlab/framework/framework.ts b/modules/sdk-coin-sui/src/lib/mystenlab/framework/framework.ts index b86978b9ac..4ba592a4c5 100644 --- a/modules/sdk-coin-sui/src/lib/mystenlab/framework/framework.ts +++ b/modules/sdk-coin-sui/src/lib/mystenlab/framework/framework.ts @@ -105,8 +105,8 @@ export class Coin { Coin.getBalanceFromCoinStruct(a) < Coin.getBalanceFromCoinStruct(b) ? -1 : Coin.getBalanceFromCoinStruct(a) > Coin.getBalanceFromCoinStruct(b) - ? 1 - : 0 + ? 1 + : 0 ); } diff --git a/modules/sdk-coin-trx/resources/protobuf/tron.js b/modules/sdk-coin-trx/resources/protobuf/tron.js index 1936d8ef92..2ddf290f95 100644 --- a/modules/sdk-coin-trx/resources/protobuf/tron.js +++ b/modules/sdk-coin-trx/resources/protobuf/tron.js @@ -244,16 +244,16 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array - ? Array.prototype.slice.call(message.address) - : message.address; + ? Array.prototype.slice.call(message.address) + : message.address; if (message.port != null && message.hasOwnProperty('port')) object.port = message.port; if (message.nodeId != null && message.hasOwnProperty('nodeId')) object.nodeId = options.bytes === String ? $util.base64.encode(message.nodeId, 0, message.nodeId.length) : options.bytes === Array - ? Array.prototype.slice.call(message.nodeId) - : message.nodeId; + ? Array.prototype.slice.call(message.nodeId) + : message.nodeId; return object; }; @@ -521,8 +521,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number - ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() - : message.timestamp; + ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() + : message.timestamp; return object; }; @@ -765,8 +765,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number - ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() - : message.timestamp; + ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() + : message.timestamp; return object; }; @@ -1017,8 +1017,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.targetId, 0, message.targetId.length) : options.bytes === Array - ? Array.prototype.slice.call(message.targetId) - : message.targetId; + ? Array.prototype.slice.call(message.targetId) + : message.targetId; if (message.timestamp != null && message.hasOwnProperty('timestamp')) if (typeof message.timestamp === 'number') object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; @@ -1027,8 +1027,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number - ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() - : message.timestamp; + ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() + : message.timestamp; return object; }; @@ -1294,8 +1294,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number - ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() - : message.timestamp; + ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() + : message.timestamp; return object; }; @@ -1765,15 +1765,15 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.accountAddress != null && message.hasOwnProperty('accountAddress')) object.accountAddress = options.bytes === String ? $util.base64.encode(message.accountAddress, 0, message.accountAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.accountAddress) - : message.accountAddress; + ? Array.prototype.slice.call(message.accountAddress) + : message.accountAddress; if (message.type != null && message.hasOwnProperty('type')) object.type = options.enums === String ? $root.protocol.AccountType[message.type] : message.type; return object; @@ -2010,15 +2010,15 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.accountName, 0, message.accountName.length) : options.bytes === Array - ? Array.prototype.slice.call(message.accountName) - : message.accountName; + ? Array.prototype.slice.call(message.accountName) + : message.accountName; if (message.ownerAddress != null && message.hasOwnProperty('ownerAddress')) object.ownerAddress = options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; return object; }; @@ -2248,15 +2248,15 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.accountId, 0, message.accountId.length) : options.bytes === Array - ? Array.prototype.slice.call(message.accountId) - : message.accountId; + ? Array.prototype.slice.call(message.accountId) + : message.accountId; if (message.ownerAddress != null && message.hasOwnProperty('ownerAddress')) object.ownerAddress = options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; return object; }; @@ -2517,15 +2517,15 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.toAddress != null && message.hasOwnProperty('toAddress')) object.toAddress = options.bytes === String ? $util.base64.encode(message.toAddress, 0, message.toAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.toAddress) - : message.toAddress; + ? Array.prototype.slice.call(message.toAddress) + : message.toAddress; if (message.amount != null && message.hasOwnProperty('amount')) if (typeof message.amount === 'number') object.amount = options.longs === String ? String(message.amount) : message.amount; @@ -2534,8 +2534,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.amount) : options.longs === Number - ? new $util.LongBits(message.amount.low >>> 0, message.amount.high >>> 0).toNumber() - : message.amount; + ? new $util.LongBits(message.amount.low >>> 0, message.amount.high >>> 0).toNumber() + : message.amount; return object; }; @@ -2826,22 +2826,22 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.assetName, 0, message.assetName.length) : options.bytes === Array - ? Array.prototype.slice.call(message.assetName) - : message.assetName; + ? Array.prototype.slice.call(message.assetName) + : message.assetName; if (message.ownerAddress != null && message.hasOwnProperty('ownerAddress')) object.ownerAddress = options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.toAddress != null && message.hasOwnProperty('toAddress')) object.toAddress = options.bytes === String ? $util.base64.encode(message.toAddress, 0, message.toAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.toAddress) - : message.toAddress; + ? Array.prototype.slice.call(message.toAddress) + : message.toAddress; if (message.amount != null && message.hasOwnProperty('amount')) if (typeof message.amount === 'number') object.amount = options.longs === String ? String(message.amount) : message.amount; @@ -2850,8 +2850,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.amount) : options.longs === Number - ? new $util.LongBits(message.amount.low >>> 0, message.amount.high >>> 0).toNumber() - : message.amount; + ? new $util.LongBits(message.amount.low >>> 0, message.amount.high >>> 0).toNumber() + : message.amount; return object; }; @@ -3129,8 +3129,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.voteAddress && message.voteAddress.length) { object.voteAddress = []; for (var j = 0; j < message.voteAddress.length; ++j) @@ -3138,8 +3138,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.voteAddress[j], 0, message.voteAddress[j].length) : options.bytes === Array - ? Array.prototype.slice.call(message.voteAddress[j]) - : message.voteAddress[j]; + ? Array.prototype.slice.call(message.voteAddress[j]) + : message.voteAddress[j]; } if (message.support != null && message.hasOwnProperty('support')) object.support = message.support; if (message.count != null && message.hasOwnProperty('count')) object.count = message.count; @@ -3397,8 +3397,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.votes && message.votes.length) { object.votes = []; for (var j = 0; j < message.votes.length; ++j) @@ -3632,8 +3632,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.voteAddress, 0, message.voteAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.voteAddress) - : message.voteAddress; + ? Array.prototype.slice.call(message.voteAddress) + : message.voteAddress; if (message.voteCount != null && message.hasOwnProperty('voteCount')) if (typeof message.voteCount === 'number') object.voteCount = options.longs === String ? String(message.voteCount) : message.voteCount; @@ -3642,8 +3642,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.voteCount) : options.longs === Number - ? new $util.LongBits(message.voteCount.low >>> 0, message.voteCount.high >>> 0).toNumber() - : message.voteCount; + ? new $util.LongBits(message.voteCount.low >>> 0, message.voteCount.high >>> 0).toNumber() + : message.voteCount; return object; }; @@ -3878,9 +3878,8 @@ $root.protocol = (function () { else if (object.contractAddress.length) message.contractAddress = object.contractAddress; if (object.consumeUserResourcePercent != null) if ($util.Long) - (message.consumeUserResourcePercent = $util.Long.fromValue( - object.consumeUserResourcePercent - )).unsigned = false; + (message.consumeUserResourcePercent = $util.Long.fromValue(object.consumeUserResourcePercent)).unsigned = + false; else if (typeof object.consumeUserResourcePercent === 'string') message.consumeUserResourcePercent = parseInt(object.consumeUserResourcePercent, 10); else if (typeof object.consumeUserResourcePercent === 'number') @@ -3927,15 +3926,15 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.contractAddress != null && message.hasOwnProperty('contractAddress')) object.contractAddress = options.bytes === String ? $util.base64.encode(message.contractAddress, 0, message.contractAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.contractAddress) - : message.contractAddress; + ? Array.prototype.slice.call(message.contractAddress) + : message.contractAddress; if (message.consumeUserResourcePercent != null && message.hasOwnProperty('consumeUserResourcePercent')) if (typeof message.consumeUserResourcePercent === 'number') object.consumeUserResourcePercent = @@ -3945,11 +3944,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.consumeUserResourcePercent) : options.longs === Number - ? new $util.LongBits( - message.consumeUserResourcePercent.low >>> 0, - message.consumeUserResourcePercent.high >>> 0 - ).toNumber() - : message.consumeUserResourcePercent; + ? new $util.LongBits( + message.consumeUserResourcePercent.low >>> 0, + message.consumeUserResourcePercent.high >>> 0 + ).toNumber() + : message.consumeUserResourcePercent; return object; }; @@ -4223,15 +4222,15 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.contractAddress != null && message.hasOwnProperty('contractAddress')) object.contractAddress = options.bytes === String ? $util.base64.encode(message.contractAddress, 0, message.contractAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.contractAddress) - : message.contractAddress; + ? Array.prototype.slice.call(message.contractAddress) + : message.contractAddress; if (message.originEnergyLimit != null && message.hasOwnProperty('originEnergyLimit')) if (typeof message.originEnergyLimit === 'number') object.originEnergyLimit = @@ -4241,8 +4240,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.originEnergyLimit) : options.longs === Number - ? new $util.LongBits(message.originEnergyLimit.low >>> 0, message.originEnergyLimit.high >>> 0).toNumber() - : message.originEnergyLimit; + ? new $util.LongBits( + message.originEnergyLimit.low >>> 0, + message.originEnergyLimit.high >>> 0 + ).toNumber() + : message.originEnergyLimit; return object; }; @@ -4477,15 +4479,15 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.contractAddress != null && message.hasOwnProperty('contractAddress')) object.contractAddress = options.bytes === String ? $util.base64.encode(message.contractAddress, 0, message.contractAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.contractAddress) - : message.contractAddress; + ? Array.prototype.slice.call(message.contractAddress) + : message.contractAddress; return object; }; @@ -4711,15 +4713,15 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.url != null && message.hasOwnProperty('url')) object.url = options.bytes === String ? $util.base64.encode(message.url, 0, message.url.length) : options.bytes === Array - ? Array.prototype.slice.call(message.url) - : message.url; + ? Array.prototype.slice.call(message.url) + : message.url; return object; }; @@ -4949,15 +4951,15 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.updateUrl != null && message.hasOwnProperty('updateUrl')) object.updateUrl = options.bytes === String ? $util.base64.encode(message.updateUrl, 0, message.updateUrl.length) : options.bytes === Array - ? Array.prototype.slice.call(message.updateUrl) - : message.updateUrl; + ? Array.prototype.slice.call(message.updateUrl) + : message.updateUrl; return object; }; @@ -5690,22 +5692,22 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.name != null && message.hasOwnProperty('name')) object.name = options.bytes === String ? $util.base64.encode(message.name, 0, message.name.length) : options.bytes === Array - ? Array.prototype.slice.call(message.name) - : message.name; + ? Array.prototype.slice.call(message.name) + : message.name; if (message.abbr != null && message.hasOwnProperty('abbr')) object.abbr = options.bytes === String ? $util.base64.encode(message.abbr, 0, message.abbr.length) : options.bytes === Array - ? Array.prototype.slice.call(message.abbr) - : message.abbr; + ? Array.prototype.slice.call(message.abbr) + : message.abbr; if (message.totalSupply != null && message.hasOwnProperty('totalSupply')) if (typeof message.totalSupply === 'number') object.totalSupply = options.longs === String ? String(message.totalSupply) : message.totalSupply; @@ -5714,8 +5716,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.totalSupply) : options.longs === Number - ? new $util.LongBits(message.totalSupply.low >>> 0, message.totalSupply.high >>> 0).toNumber() - : message.totalSupply; + ? new $util.LongBits(message.totalSupply.low >>> 0, message.totalSupply.high >>> 0).toNumber() + : message.totalSupply; if (message.frozenSupply && message.frozenSupply.length) { object.frozenSupply = []; for (var j = 0; j < message.frozenSupply.length; ++j) @@ -5735,8 +5737,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.startTime) : options.longs === Number - ? new $util.LongBits(message.startTime.low >>> 0, message.startTime.high >>> 0).toNumber() - : message.startTime; + ? new $util.LongBits(message.startTime.low >>> 0, message.startTime.high >>> 0).toNumber() + : message.startTime; if (message.endTime != null && message.hasOwnProperty('endTime')) if (typeof message.endTime === 'number') object.endTime = options.longs === String ? String(message.endTime) : message.endTime; @@ -5745,8 +5747,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.endTime) : options.longs === Number - ? new $util.LongBits(message.endTime.low >>> 0, message.endTime.high >>> 0).toNumber() - : message.endTime; + ? new $util.LongBits(message.endTime.low >>> 0, message.endTime.high >>> 0).toNumber() + : message.endTime; if (message.order != null && message.hasOwnProperty('order')) if (typeof message.order === 'number') object.order = options.longs === String ? String(message.order) : message.order; @@ -5755,23 +5757,23 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.order) : options.longs === Number - ? new $util.LongBits(message.order.low >>> 0, message.order.high >>> 0).toNumber() - : message.order; + ? new $util.LongBits(message.order.low >>> 0, message.order.high >>> 0).toNumber() + : message.order; if (message.voteScore != null && message.hasOwnProperty('voteScore')) object.voteScore = message.voteScore; if (message.description != null && message.hasOwnProperty('description')) object.description = options.bytes === String ? $util.base64.encode(message.description, 0, message.description.length) : options.bytes === Array - ? Array.prototype.slice.call(message.description) - : message.description; + ? Array.prototype.slice.call(message.description) + : message.description; if (message.url != null && message.hasOwnProperty('url')) object.url = options.bytes === String ? $util.base64.encode(message.url, 0, message.url.length) : options.bytes === Array - ? Array.prototype.slice.call(message.url) - : message.url; + ? Array.prototype.slice.call(message.url) + : message.url; if (message.freeAssetNetLimit != null && message.hasOwnProperty('freeAssetNetLimit')) if (typeof message.freeAssetNetLimit === 'number') object.freeAssetNetLimit = @@ -5781,8 +5783,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.freeAssetNetLimit) : options.longs === Number - ? new $util.LongBits(message.freeAssetNetLimit.low >>> 0, message.freeAssetNetLimit.high >>> 0).toNumber() - : message.freeAssetNetLimit; + ? new $util.LongBits( + message.freeAssetNetLimit.low >>> 0, + message.freeAssetNetLimit.high >>> 0 + ).toNumber() + : message.freeAssetNetLimit; if (message.publicFreeAssetNetLimit != null && message.hasOwnProperty('publicFreeAssetNetLimit')) if (typeof message.publicFreeAssetNetLimit === 'number') object.publicFreeAssetNetLimit = @@ -5792,11 +5797,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.publicFreeAssetNetLimit) : options.longs === Number - ? new $util.LongBits( - message.publicFreeAssetNetLimit.low >>> 0, - message.publicFreeAssetNetLimit.high >>> 0 - ).toNumber() - : message.publicFreeAssetNetLimit; + ? new $util.LongBits( + message.publicFreeAssetNetLimit.low >>> 0, + message.publicFreeAssetNetLimit.high >>> 0 + ).toNumber() + : message.publicFreeAssetNetLimit; if (message.publicFreeAssetNetUsage != null && message.hasOwnProperty('publicFreeAssetNetUsage')) if (typeof message.publicFreeAssetNetUsage === 'number') object.publicFreeAssetNetUsage = @@ -5806,11 +5811,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.publicFreeAssetNetUsage) : options.longs === Number - ? new $util.LongBits( - message.publicFreeAssetNetUsage.low >>> 0, - message.publicFreeAssetNetUsage.high >>> 0 - ).toNumber() - : message.publicFreeAssetNetUsage; + ? new $util.LongBits( + message.publicFreeAssetNetUsage.low >>> 0, + message.publicFreeAssetNetUsage.high >>> 0 + ).toNumber() + : message.publicFreeAssetNetUsage; if (message.publicLatestFreeNetTime != null && message.hasOwnProperty('publicLatestFreeNetTime')) if (typeof message.publicLatestFreeNetTime === 'number') object.publicLatestFreeNetTime = @@ -5820,11 +5825,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.publicLatestFreeNetTime) : options.longs === Number - ? new $util.LongBits( - message.publicLatestFreeNetTime.low >>> 0, - message.publicLatestFreeNetTime.high >>> 0 - ).toNumber() - : message.publicLatestFreeNetTime; + ? new $util.LongBits( + message.publicLatestFreeNetTime.low >>> 0, + message.publicLatestFreeNetTime.high >>> 0 + ).toNumber() + : message.publicLatestFreeNetTime; if (message.id != null && message.hasOwnProperty('id')) object.id = message.id; return object; }; @@ -6062,8 +6067,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.frozenAmount) : options.longs === Number - ? new $util.LongBits(message.frozenAmount.low >>> 0, message.frozenAmount.high >>> 0).toNumber() - : message.frozenAmount; + ? new $util.LongBits(message.frozenAmount.low >>> 0, message.frozenAmount.high >>> 0).toNumber() + : message.frozenAmount; if (message.frozenDays != null && message.hasOwnProperty('frozenDays')) if (typeof message.frozenDays === 'number') object.frozenDays = options.longs === String ? String(message.frozenDays) : message.frozenDays; @@ -6072,8 +6077,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.frozenDays) : options.longs === Number - ? new $util.LongBits(message.frozenDays.low >>> 0, message.frozenDays.high >>> 0).toNumber() - : message.frozenDays; + ? new $util.LongBits(message.frozenDays.low >>> 0, message.frozenDays.high >>> 0).toNumber() + : message.frozenDays; return object; }; @@ -6367,22 +6372,22 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.toAddress != null && message.hasOwnProperty('toAddress')) object.toAddress = options.bytes === String ? $util.base64.encode(message.toAddress, 0, message.toAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.toAddress) - : message.toAddress; + ? Array.prototype.slice.call(message.toAddress) + : message.toAddress; if (message.assetName != null && message.hasOwnProperty('assetName')) object.assetName = options.bytes === String ? $util.base64.encode(message.assetName, 0, message.assetName.length) : options.bytes === Array - ? Array.prototype.slice.call(message.assetName) - : message.assetName; + ? Array.prototype.slice.call(message.assetName) + : message.assetName; if (message.amount != null && message.hasOwnProperty('amount')) if (typeof message.amount === 'number') object.amount = options.longs === String ? String(message.amount) : message.amount; @@ -6391,8 +6396,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.amount) : options.longs === Number - ? new $util.LongBits(message.amount.low >>> 0, message.amount.high >>> 0).toNumber() - : message.amount; + ? new $util.LongBits(message.amount.low >>> 0, message.amount.high >>> 0).toNumber() + : message.amount; return object; }; @@ -6752,8 +6757,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.frozenBalance != null && message.hasOwnProperty('frozenBalance')) if (typeof message.frozenBalance === 'number') object.frozenBalance = options.longs === String ? String(message.frozenBalance) : message.frozenBalance; @@ -6762,8 +6767,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.frozenBalance) : options.longs === Number - ? new $util.LongBits(message.frozenBalance.low >>> 0, message.frozenBalance.high >>> 0).toNumber() - : message.frozenBalance; + ? new $util.LongBits(message.frozenBalance.low >>> 0, message.frozenBalance.high >>> 0).toNumber() + : message.frozenBalance; if (message.frozenDuration != null && message.hasOwnProperty('frozenDuration')) if (typeof message.frozenDuration === 'number') object.frozenDuration = options.longs === String ? String(message.frozenDuration) : message.frozenDuration; @@ -6772,8 +6777,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.frozenDuration) : options.longs === Number - ? new $util.LongBits(message.frozenDuration.low >>> 0, message.frozenDuration.high >>> 0).toNumber() - : message.frozenDuration; + ? new $util.LongBits(message.frozenDuration.low >>> 0, message.frozenDuration.high >>> 0).toNumber() + : message.frozenDuration; if (message.resource != null && message.hasOwnProperty('resource')) object.resource = options.enums === String ? $root.protocol.ResourceCode[message.resource] : message.resource; if (message.receiverAddress != null && message.hasOwnProperty('receiverAddress')) @@ -6781,8 +6786,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.receiverAddress, 0, message.receiverAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.receiverAddress) - : message.receiverAddress; + ? Array.prototype.slice.call(message.receiverAddress) + : message.receiverAddress; return object; }; @@ -7050,8 +7055,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.resource != null && message.hasOwnProperty('resource')) object.resource = options.enums === String ? $root.protocol.ResourceCode[message.resource] : message.resource; if (message.receiverAddress != null && message.hasOwnProperty('receiverAddress')) @@ -7059,8 +7064,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.receiverAddress, 0, message.receiverAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.receiverAddress) - : message.receiverAddress; + ? Array.prototype.slice.call(message.receiverAddress) + : message.receiverAddress; return object; }; @@ -7259,8 +7264,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; return object; }; @@ -7459,8 +7464,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; return object; }; @@ -7791,22 +7796,22 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.description != null && message.hasOwnProperty('description')) object.description = options.bytes === String ? $util.base64.encode(message.description, 0, message.description.length) : options.bytes === Array - ? Array.prototype.slice.call(message.description) - : message.description; + ? Array.prototype.slice.call(message.description) + : message.description; if (message.url != null && message.hasOwnProperty('url')) object.url = options.bytes === String ? $util.base64.encode(message.url, 0, message.url.length) : options.bytes === Array - ? Array.prototype.slice.call(message.url) - : message.url; + ? Array.prototype.slice.call(message.url) + : message.url; if (message.newLimit != null && message.hasOwnProperty('newLimit')) if (typeof message.newLimit === 'number') object.newLimit = options.longs === String ? String(message.newLimit) : message.newLimit; @@ -7815,8 +7820,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.newLimit) : options.longs === Number - ? new $util.LongBits(message.newLimit.low >>> 0, message.newLimit.high >>> 0).toNumber() - : message.newLimit; + ? new $util.LongBits(message.newLimit.low >>> 0, message.newLimit.high >>> 0).toNumber() + : message.newLimit; if (message.newPublicLimit != null && message.hasOwnProperty('newPublicLimit')) if (typeof message.newPublicLimit === 'number') object.newPublicLimit = options.longs === String ? String(message.newPublicLimit) : message.newPublicLimit; @@ -7825,8 +7830,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.newPublicLimit) : options.longs === Number - ? new $util.LongBits(message.newPublicLimit.low >>> 0, message.newPublicLimit.high >>> 0).toNumber() - : message.newPublicLimit; + ? new $util.LongBits(message.newPublicLimit.low >>> 0, message.newPublicLimit.high >>> 0).toNumber() + : message.newPublicLimit; return object; }; @@ -8102,8 +8107,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; var keys2; if (message.parameters && (keys2 = Object.keys(message.parameters)).length) { object.parameters = {}; @@ -8116,11 +8121,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.parameters[keys2[j]]) : options.longs === Number - ? new $util.LongBits( - message.parameters[keys2[j]].low >>> 0, - message.parameters[keys2[j]].high >>> 0 - ).toNumber() - : message.parameters[keys2[j]]; + ? new $util.LongBits( + message.parameters[keys2[j]].low >>> 0, + message.parameters[keys2[j]].high >>> 0 + ).toNumber() + : message.parameters[keys2[j]]; } return object; }; @@ -8370,8 +8375,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.proposalId != null && message.hasOwnProperty('proposalId')) if (typeof message.proposalId === 'number') object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; @@ -8380,8 +8385,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number - ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber() - : message.proposalId; + ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber() + : message.proposalId; if (message.isAddApproval != null && message.hasOwnProperty('isAddApproval')) object.isAddApproval = message.isAddApproval; return object; @@ -8614,8 +8619,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.proposalId != null && message.hasOwnProperty('proposalId')) if (typeof message.proposalId === 'number') object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; @@ -8624,8 +8629,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number - ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber() - : message.proposalId; + ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber() + : message.proposalId; return object; }; @@ -8922,8 +8927,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.newContract != null && message.hasOwnProperty('newContract')) object.newContract = $root.protocol.SmartContract.toObject(message.newContract, options); if (message.callTokenValue != null && message.hasOwnProperty('callTokenValue')) @@ -8934,8 +8939,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.callTokenValue) : options.longs === Number - ? new $util.LongBits(message.callTokenValue.low >>> 0, message.callTokenValue.high >>> 0).toNumber() - : message.callTokenValue; + ? new $util.LongBits(message.callTokenValue.low >>> 0, message.callTokenValue.high >>> 0).toNumber() + : message.callTokenValue; if (message.tokenId != null && message.hasOwnProperty('tokenId')) if (typeof message.tokenId === 'number') object.tokenId = options.longs === String ? String(message.tokenId) : message.tokenId; @@ -8944,8 +8949,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.tokenId) : options.longs === Number - ? new $util.LongBits(message.tokenId.low >>> 0, message.tokenId.high >>> 0).toNumber() - : message.tokenId; + ? new $util.LongBits(message.tokenId.low >>> 0, message.tokenId.high >>> 0).toNumber() + : message.tokenId; return object; }; @@ -9307,15 +9312,15 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.contractAddress != null && message.hasOwnProperty('contractAddress')) object.contractAddress = options.bytes === String ? $util.base64.encode(message.contractAddress, 0, message.contractAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.contractAddress) - : message.contractAddress; + ? Array.prototype.slice.call(message.contractAddress) + : message.contractAddress; if (message.callValue != null && message.hasOwnProperty('callValue')) if (typeof message.callValue === 'number') object.callValue = options.longs === String ? String(message.callValue) : message.callValue; @@ -9324,15 +9329,15 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.callValue) : options.longs === Number - ? new $util.LongBits(message.callValue.low >>> 0, message.callValue.high >>> 0).toNumber() - : message.callValue; + ? new $util.LongBits(message.callValue.low >>> 0, message.callValue.high >>> 0).toNumber() + : message.callValue; if (message.data != null && message.hasOwnProperty('data')) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array - ? Array.prototype.slice.call(message.data) - : message.data; + ? Array.prototype.slice.call(message.data) + : message.data; if (message.callTokenValue != null && message.hasOwnProperty('callTokenValue')) if (typeof message.callTokenValue === 'number') object.callTokenValue = options.longs === String ? String(message.callTokenValue) : message.callTokenValue; @@ -9341,8 +9346,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.callTokenValue) : options.longs === Number - ? new $util.LongBits(message.callTokenValue.low >>> 0, message.callTokenValue.high >>> 0).toNumber() - : message.callTokenValue; + ? new $util.LongBits(message.callTokenValue.low >>> 0, message.callTokenValue.high >>> 0).toNumber() + : message.callTokenValue; if (message.tokenId != null && message.hasOwnProperty('tokenId')) if (typeof message.tokenId === 'number') object.tokenId = options.longs === String ? String(message.tokenId) : message.tokenId; @@ -9351,8 +9356,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.tokenId) : options.longs === Number - ? new $util.LongBits(message.tokenId.low >>> 0, message.tokenId.high >>> 0).toNumber() - : message.tokenId; + ? new $util.LongBits(message.tokenId.low >>> 0, message.tokenId.high >>> 0).toNumber() + : message.tokenId; return object; }; @@ -9582,8 +9587,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.quant != null && message.hasOwnProperty('quant')) if (typeof message.quant === 'number') object.quant = options.longs === String ? String(message.quant) : message.quant; @@ -9592,8 +9597,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.quant) : options.longs === Number - ? new $util.LongBits(message.quant.low >>> 0, message.quant.high >>> 0).toNumber() - : message.quant; + ? new $util.LongBits(message.quant.low >>> 0, message.quant.high >>> 0).toNumber() + : message.quant; return object; }; @@ -9823,8 +9828,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.bytes != null && message.hasOwnProperty('bytes')) if (typeof message.bytes === 'number') object.bytes = options.longs === String ? String(message.bytes) : message.bytes; @@ -9833,8 +9838,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.bytes) : options.longs === Number - ? new $util.LongBits(message.bytes.low >>> 0, message.bytes.high >>> 0).toNumber() - : message.bytes; + ? new $util.LongBits(message.bytes.low >>> 0, message.bytes.high >>> 0).toNumber() + : message.bytes; return object; }; @@ -10072,8 +10077,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.storageBytes != null && message.hasOwnProperty('storageBytes')) if (typeof message.storageBytes === 'number') object.storageBytes = options.longs === String ? String(message.storageBytes) : message.storageBytes; @@ -10082,8 +10087,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.storageBytes) : options.longs === Number - ? new $util.LongBits(message.storageBytes.low >>> 0, message.storageBytes.high >>> 0).toNumber() - : message.storageBytes; + ? new $util.LongBits(message.storageBytes.low >>> 0, message.storageBytes.high >>> 0).toNumber() + : message.storageBytes; return object; }; @@ -10431,15 +10436,15 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.firstTokenId != null && message.hasOwnProperty('firstTokenId')) object.firstTokenId = options.bytes === String ? $util.base64.encode(message.firstTokenId, 0, message.firstTokenId.length) : options.bytes === Array - ? Array.prototype.slice.call(message.firstTokenId) - : message.firstTokenId; + ? Array.prototype.slice.call(message.firstTokenId) + : message.firstTokenId; if (message.firstTokenBalance != null && message.hasOwnProperty('firstTokenBalance')) if (typeof message.firstTokenBalance === 'number') object.firstTokenBalance = @@ -10449,15 +10454,18 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.firstTokenBalance) : options.longs === Number - ? new $util.LongBits(message.firstTokenBalance.low >>> 0, message.firstTokenBalance.high >>> 0).toNumber() - : message.firstTokenBalance; + ? new $util.LongBits( + message.firstTokenBalance.low >>> 0, + message.firstTokenBalance.high >>> 0 + ).toNumber() + : message.firstTokenBalance; if (message.secondTokenId != null && message.hasOwnProperty('secondTokenId')) object.secondTokenId = options.bytes === String ? $util.base64.encode(message.secondTokenId, 0, message.secondTokenId.length) : options.bytes === Array - ? Array.prototype.slice.call(message.secondTokenId) - : message.secondTokenId; + ? Array.prototype.slice.call(message.secondTokenId) + : message.secondTokenId; if (message.secondTokenBalance != null && message.hasOwnProperty('secondTokenBalance')) if (typeof message.secondTokenBalance === 'number') object.secondTokenBalance = @@ -10467,11 +10475,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.secondTokenBalance) : options.longs === Number - ? new $util.LongBits( - message.secondTokenBalance.low >>> 0, - message.secondTokenBalance.high >>> 0 - ).toNumber() - : message.secondTokenBalance; + ? new $util.LongBits( + message.secondTokenBalance.low >>> 0, + message.secondTokenBalance.high >>> 0 + ).toNumber() + : message.secondTokenBalance; return object; }; @@ -10762,8 +10770,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.exchangeId != null && message.hasOwnProperty('exchangeId')) if (typeof message.exchangeId === 'number') object.exchangeId = options.longs === String ? String(message.exchangeId) : message.exchangeId; @@ -10772,15 +10780,15 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.exchangeId) : options.longs === Number - ? new $util.LongBits(message.exchangeId.low >>> 0, message.exchangeId.high >>> 0).toNumber() - : message.exchangeId; + ? new $util.LongBits(message.exchangeId.low >>> 0, message.exchangeId.high >>> 0).toNumber() + : message.exchangeId; if (message.tokenId != null && message.hasOwnProperty('tokenId')) object.tokenId = options.bytes === String ? $util.base64.encode(message.tokenId, 0, message.tokenId.length) : options.bytes === Array - ? Array.prototype.slice.call(message.tokenId) - : message.tokenId; + ? Array.prototype.slice.call(message.tokenId) + : message.tokenId; if (message.quant != null && message.hasOwnProperty('quant')) if (typeof message.quant === 'number') object.quant = options.longs === String ? String(message.quant) : message.quant; @@ -10789,8 +10797,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.quant) : options.longs === Number - ? new $util.LongBits(message.quant.low >>> 0, message.quant.high >>> 0).toNumber() - : message.quant; + ? new $util.LongBits(message.quant.low >>> 0, message.quant.high >>> 0).toNumber() + : message.quant; return object; }; @@ -11081,8 +11089,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.exchangeId != null && message.hasOwnProperty('exchangeId')) if (typeof message.exchangeId === 'number') object.exchangeId = options.longs === String ? String(message.exchangeId) : message.exchangeId; @@ -11091,15 +11099,15 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.exchangeId) : options.longs === Number - ? new $util.LongBits(message.exchangeId.low >>> 0, message.exchangeId.high >>> 0).toNumber() - : message.exchangeId; + ? new $util.LongBits(message.exchangeId.low >>> 0, message.exchangeId.high >>> 0).toNumber() + : message.exchangeId; if (message.tokenId != null && message.hasOwnProperty('tokenId')) object.tokenId = options.bytes === String ? $util.base64.encode(message.tokenId, 0, message.tokenId.length) : options.bytes === Array - ? Array.prototype.slice.call(message.tokenId) - : message.tokenId; + ? Array.prototype.slice.call(message.tokenId) + : message.tokenId; if (message.quant != null && message.hasOwnProperty('quant')) if (typeof message.quant === 'number') object.quant = options.longs === String ? String(message.quant) : message.quant; @@ -11108,8 +11116,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.quant) : options.longs === Number - ? new $util.LongBits(message.quant.low >>> 0, message.quant.high >>> 0).toNumber() - : message.quant; + ? new $util.LongBits(message.quant.low >>> 0, message.quant.high >>> 0).toNumber() + : message.quant; return object; }; @@ -11431,8 +11439,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.exchangeId != null && message.hasOwnProperty('exchangeId')) if (typeof message.exchangeId === 'number') object.exchangeId = options.longs === String ? String(message.exchangeId) : message.exchangeId; @@ -11441,15 +11449,15 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.exchangeId) : options.longs === Number - ? new $util.LongBits(message.exchangeId.low >>> 0, message.exchangeId.high >>> 0).toNumber() - : message.exchangeId; + ? new $util.LongBits(message.exchangeId.low >>> 0, message.exchangeId.high >>> 0).toNumber() + : message.exchangeId; if (message.tokenId != null && message.hasOwnProperty('tokenId')) object.tokenId = options.bytes === String ? $util.base64.encode(message.tokenId, 0, message.tokenId.length) : options.bytes === Array - ? Array.prototype.slice.call(message.tokenId) - : message.tokenId; + ? Array.prototype.slice.call(message.tokenId) + : message.tokenId; if (message.quant != null && message.hasOwnProperty('quant')) if (typeof message.quant === 'number') object.quant = options.longs === String ? String(message.quant) : message.quant; @@ -11458,8 +11466,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.quant) : options.longs === Number - ? new $util.LongBits(message.quant.low >>> 0, message.quant.high >>> 0).toNumber() - : message.quant; + ? new $util.LongBits(message.quant.low >>> 0, message.quant.high >>> 0).toNumber() + : message.quant; if (message.expected != null && message.hasOwnProperty('expected')) if (typeof message.expected === 'number') object.expected = options.longs === String ? String(message.expected) : message.expected; @@ -11468,8 +11476,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.expected) : options.longs === Number - ? new $util.LongBits(message.expected.low >>> 0, message.expected.high >>> 0).toNumber() - : message.expected; + ? new $util.LongBits(message.expected.low >>> 0, message.expected.high >>> 0).toNumber() + : message.expected; return object; }; @@ -11755,8 +11763,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ownerAddress, 0, message.ownerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ownerAddress) - : message.ownerAddress; + ? Array.prototype.slice.call(message.ownerAddress) + : message.ownerAddress; if (message.owner != null && message.hasOwnProperty('owner')) object.owner = $root.protocol.Permission.toObject(message.owner, options); if (message.witness != null && message.hasOwnProperty('witness')) @@ -12003,15 +12011,15 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.name, 0, message.name.length) : options.bytes === Array - ? Array.prototype.slice.call(message.name) - : message.name; + ? Array.prototype.slice.call(message.name) + : message.name; if (message.address != null && message.hasOwnProperty('address')) object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array - ? Array.prototype.slice.call(message.address) - : message.address; + ? Array.prototype.slice.call(message.address) + : message.address; return object; }; @@ -12242,8 +12250,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.voteAddress, 0, message.voteAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.voteAddress) - : message.voteAddress; + ? Array.prototype.slice.call(message.voteAddress) + : message.voteAddress; if (message.voteCount != null && message.hasOwnProperty('voteCount')) if (typeof message.voteCount === 'number') object.voteCount = options.longs === String ? String(message.voteCount) : message.voteCount; @@ -12252,8 +12260,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.voteCount) : options.longs === Number - ? new $util.LongBits(message.voteCount.low >>> 0, message.voteCount.high >>> 0).toNumber() - : message.voteCount; + ? new $util.LongBits(message.voteCount.low >>> 0, message.voteCount.high >>> 0).toNumber() + : message.voteCount; return object; }; @@ -12717,15 +12725,15 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number - ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber() - : message.proposalId; + ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber() + : message.proposalId; if (message.proposerAddress != null && message.hasOwnProperty('proposerAddress')) object.proposerAddress = options.bytes === String ? $util.base64.encode(message.proposerAddress, 0, message.proposerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.proposerAddress) - : message.proposerAddress; + ? Array.prototype.slice.call(message.proposerAddress) + : message.proposerAddress; var keys2; if (message.parameters && (keys2 = Object.keys(message.parameters)).length) { object.parameters = {}; @@ -12738,11 +12746,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.parameters[keys2[j]]) : options.longs === Number - ? new $util.LongBits( - message.parameters[keys2[j]].low >>> 0, - message.parameters[keys2[j]].high >>> 0 - ).toNumber() - : message.parameters[keys2[j]]; + ? new $util.LongBits( + message.parameters[keys2[j]].low >>> 0, + message.parameters[keys2[j]].high >>> 0 + ).toNumber() + : message.parameters[keys2[j]]; } if (message.expirationTime != null && message.hasOwnProperty('expirationTime')) if (typeof message.expirationTime === 'number') @@ -12752,8 +12760,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.expirationTime) : options.longs === Number - ? new $util.LongBits(message.expirationTime.low >>> 0, message.expirationTime.high >>> 0).toNumber() - : message.expirationTime; + ? new $util.LongBits(message.expirationTime.low >>> 0, message.expirationTime.high >>> 0).toNumber() + : message.expirationTime; if (message.createTime != null && message.hasOwnProperty('createTime')) if (typeof message.createTime === 'number') object.createTime = options.longs === String ? String(message.createTime) : message.createTime; @@ -12762,8 +12770,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.createTime) : options.longs === Number - ? new $util.LongBits(message.createTime.low >>> 0, message.createTime.high >>> 0).toNumber() - : message.createTime; + ? new $util.LongBits(message.createTime.low >>> 0, message.createTime.high >>> 0).toNumber() + : message.createTime; if (message.approvals && message.approvals.length) { object.approvals = []; for (var j = 0; j < message.approvals.length; ++j) @@ -12771,8 +12779,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.approvals[j], 0, message.approvals[j].length) : options.bytes === Array - ? Array.prototype.slice.call(message.approvals[j]) - : message.approvals[j]; + ? Array.prototype.slice.call(message.approvals[j]) + : message.approvals[j]; } if (message.state != null && message.hasOwnProperty('state')) object.state = options.enums === String ? $root.protocol.Proposal.State[message.state] : message.state; @@ -13207,15 +13215,15 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.exchangeId) : options.longs === Number - ? new $util.LongBits(message.exchangeId.low >>> 0, message.exchangeId.high >>> 0).toNumber() - : message.exchangeId; + ? new $util.LongBits(message.exchangeId.low >>> 0, message.exchangeId.high >>> 0).toNumber() + : message.exchangeId; if (message.creatorAddress != null && message.hasOwnProperty('creatorAddress')) object.creatorAddress = options.bytes === String ? $util.base64.encode(message.creatorAddress, 0, message.creatorAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.creatorAddress) - : message.creatorAddress; + ? Array.prototype.slice.call(message.creatorAddress) + : message.creatorAddress; if (message.createTime != null && message.hasOwnProperty('createTime')) if (typeof message.createTime === 'number') object.createTime = options.longs === String ? String(message.createTime) : message.createTime; @@ -13224,15 +13232,15 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.createTime) : options.longs === Number - ? new $util.LongBits(message.createTime.low >>> 0, message.createTime.high >>> 0).toNumber() - : message.createTime; + ? new $util.LongBits(message.createTime.low >>> 0, message.createTime.high >>> 0).toNumber() + : message.createTime; if (message.firstTokenId != null && message.hasOwnProperty('firstTokenId')) object.firstTokenId = options.bytes === String ? $util.base64.encode(message.firstTokenId, 0, message.firstTokenId.length) : options.bytes === Array - ? Array.prototype.slice.call(message.firstTokenId) - : message.firstTokenId; + ? Array.prototype.slice.call(message.firstTokenId) + : message.firstTokenId; if (message.firstTokenBalance != null && message.hasOwnProperty('firstTokenBalance')) if (typeof message.firstTokenBalance === 'number') object.firstTokenBalance = @@ -13242,15 +13250,18 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.firstTokenBalance) : options.longs === Number - ? new $util.LongBits(message.firstTokenBalance.low >>> 0, message.firstTokenBalance.high >>> 0).toNumber() - : message.firstTokenBalance; + ? new $util.LongBits( + message.firstTokenBalance.low >>> 0, + message.firstTokenBalance.high >>> 0 + ).toNumber() + : message.firstTokenBalance; if (message.secondTokenId != null && message.hasOwnProperty('secondTokenId')) object.secondTokenId = options.bytes === String ? $util.base64.encode(message.secondTokenId, 0, message.secondTokenId.length) : options.bytes === Array - ? Array.prototype.slice.call(message.secondTokenId) - : message.secondTokenId; + ? Array.prototype.slice.call(message.secondTokenId) + : message.secondTokenId; if (message.secondTokenBalance != null && message.hasOwnProperty('secondTokenBalance')) if (typeof message.secondTokenBalance === 'number') object.secondTokenBalance = @@ -13260,11 +13271,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.secondTokenBalance) : options.longs === Number - ? new $util.LongBits( - message.secondTokenBalance.low >>> 0, - message.secondTokenBalance.high >>> 0 - ).toNumber() - : message.secondTokenBalance; + ? new $util.LongBits( + message.secondTokenBalance.low >>> 0, + message.secondTokenBalance.high >>> 0 + ).toNumber() + : message.secondTokenBalance; return object; }; @@ -13684,8 +13695,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number - ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() - : message.value; + ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() + : message.value; return object; }; @@ -15016,9 +15027,8 @@ $root.protocol = (function () { message.freeAssetNetUsage = {}; for (var keys = Object.keys(object.freeAssetNetUsage), i = 0; i < keys.length; ++i) if ($util.Long) - (message.freeAssetNetUsage[keys[i]] = $util.Long.fromValue( - object.freeAssetNetUsage[keys[i]] - )).unsigned = false; + (message.freeAssetNetUsage[keys[i]] = $util.Long.fromValue(object.freeAssetNetUsage[keys[i]])).unsigned = + false; else if (typeof object.freeAssetNetUsage[keys[i]] === 'string') message.freeAssetNetUsage[keys[i]] = parseInt(object.freeAssetNetUsage[keys[i]], 10); else if (typeof object.freeAssetNetUsage[keys[i]] === 'number') @@ -15243,8 +15253,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.accountName, 0, message.accountName.length) : options.bytes === Array - ? Array.prototype.slice.call(message.accountName) - : message.accountName; + ? Array.prototype.slice.call(message.accountName) + : message.accountName; if (message.type != null && message.hasOwnProperty('type')) object.type = options.enums === String ? $root.protocol.AccountType[message.type] : message.type; if (message.address != null && message.hasOwnProperty('address')) @@ -15252,8 +15262,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array - ? Array.prototype.slice.call(message.address) - : message.address; + ? Array.prototype.slice.call(message.address) + : message.address; if (message.balance != null && message.hasOwnProperty('balance')) if (typeof message.balance === 'number') object.balance = options.longs === String ? String(message.balance) : message.balance; @@ -15262,8 +15272,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.balance) : options.longs === Number - ? new $util.LongBits(message.balance.low >>> 0, message.balance.high >>> 0).toNumber() - : message.balance; + ? new $util.LongBits(message.balance.low >>> 0, message.balance.high >>> 0).toNumber() + : message.balance; if (message.votes && message.votes.length) { object.votes = []; for (var j = 0; j < message.votes.length; ++j) @@ -15281,8 +15291,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.asset[keys2[j]]) : options.longs === Number - ? new $util.LongBits(message.asset[keys2[j]].low >>> 0, message.asset[keys2[j]].high >>> 0).toNumber() - : message.asset[keys2[j]]; + ? new $util.LongBits(message.asset[keys2[j]].low >>> 0, message.asset[keys2[j]].high >>> 0).toNumber() + : message.asset[keys2[j]]; } if (message.frozen && message.frozen.length) { object.frozen = []; @@ -15297,8 +15307,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.netUsage) : options.longs === Number - ? new $util.LongBits(message.netUsage.low >>> 0, message.netUsage.high >>> 0).toNumber() - : message.netUsage; + ? new $util.LongBits(message.netUsage.low >>> 0, message.netUsage.high >>> 0).toNumber() + : message.netUsage; if (message.createTime != null && message.hasOwnProperty('createTime')) if (typeof message.createTime === 'number') object.createTime = options.longs === String ? String(message.createTime) : message.createTime; @@ -15307,8 +15317,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.createTime) : options.longs === Number - ? new $util.LongBits(message.createTime.low >>> 0, message.createTime.high >>> 0).toNumber() - : message.createTime; + ? new $util.LongBits(message.createTime.low >>> 0, message.createTime.high >>> 0).toNumber() + : message.createTime; if (message.latestOprationTime != null && message.hasOwnProperty('latestOprationTime')) if (typeof message.latestOprationTime === 'number') object.latestOprationTime = @@ -15318,11 +15328,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.latestOprationTime) : options.longs === Number - ? new $util.LongBits( - message.latestOprationTime.low >>> 0, - message.latestOprationTime.high >>> 0 - ).toNumber() - : message.latestOprationTime; + ? new $util.LongBits( + message.latestOprationTime.low >>> 0, + message.latestOprationTime.high >>> 0 + ).toNumber() + : message.latestOprationTime; if (message.allowance != null && message.hasOwnProperty('allowance')) if (typeof message.allowance === 'number') object.allowance = options.longs === String ? String(message.allowance) : message.allowance; @@ -15331,8 +15341,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.allowance) : options.longs === Number - ? new $util.LongBits(message.allowance.low >>> 0, message.allowance.high >>> 0).toNumber() - : message.allowance; + ? new $util.LongBits(message.allowance.low >>> 0, message.allowance.high >>> 0).toNumber() + : message.allowance; if (message.latestWithdrawTime != null && message.hasOwnProperty('latestWithdrawTime')) if (typeof message.latestWithdrawTime === 'number') object.latestWithdrawTime = @@ -15342,18 +15352,18 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.latestWithdrawTime) : options.longs === Number - ? new $util.LongBits( - message.latestWithdrawTime.low >>> 0, - message.latestWithdrawTime.high >>> 0 - ).toNumber() - : message.latestWithdrawTime; + ? new $util.LongBits( + message.latestWithdrawTime.low >>> 0, + message.latestWithdrawTime.high >>> 0 + ).toNumber() + : message.latestWithdrawTime; if (message.code != null && message.hasOwnProperty('code')) object.code = options.bytes === String ? $util.base64.encode(message.code, 0, message.code.length) : options.bytes === Array - ? Array.prototype.slice.call(message.code) - : message.code; + ? Array.prototype.slice.call(message.code) + : message.code; if (message.isWitness != null && message.hasOwnProperty('isWitness')) object.isWitness = message.isWitness; if (message.isCommittee != null && message.hasOwnProperty('isCommittee')) object.isCommittee = message.isCommittee; @@ -15367,8 +15377,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.assetIssuedName, 0, message.assetIssuedName.length) : options.bytes === Array - ? Array.prototype.slice.call(message.assetIssuedName) - : message.assetIssuedName; + ? Array.prototype.slice.call(message.assetIssuedName) + : message.assetIssuedName; if (message.latestAssetOperationTime && (keys2 = Object.keys(message.latestAssetOperationTime)).length) { object.latestAssetOperationTime = {}; for (var j = 0; j < keys2.length; ++j) @@ -15382,11 +15392,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.latestAssetOperationTime[keys2[j]]) : options.longs === Number - ? new $util.LongBits( - message.latestAssetOperationTime[keys2[j]].low >>> 0, - message.latestAssetOperationTime[keys2[j]].high >>> 0 - ).toNumber() - : message.latestAssetOperationTime[keys2[j]]; + ? new $util.LongBits( + message.latestAssetOperationTime[keys2[j]].low >>> 0, + message.latestAssetOperationTime[keys2[j]].high >>> 0 + ).toNumber() + : message.latestAssetOperationTime[keys2[j]]; } if (message.freeNetUsage != null && message.hasOwnProperty('freeNetUsage')) if (typeof message.freeNetUsage === 'number') @@ -15396,8 +15406,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.freeNetUsage) : options.longs === Number - ? new $util.LongBits(message.freeNetUsage.low >>> 0, message.freeNetUsage.high >>> 0).toNumber() - : message.freeNetUsage; + ? new $util.LongBits(message.freeNetUsage.low >>> 0, message.freeNetUsage.high >>> 0).toNumber() + : message.freeNetUsage; if (message.freeAssetNetUsage && (keys2 = Object.keys(message.freeAssetNetUsage)).length) { object.freeAssetNetUsage = {}; for (var j = 0; j < keys2.length; ++j) @@ -15411,11 +15421,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.freeAssetNetUsage[keys2[j]]) : options.longs === Number - ? new $util.LongBits( - message.freeAssetNetUsage[keys2[j]].low >>> 0, - message.freeAssetNetUsage[keys2[j]].high >>> 0 - ).toNumber() - : message.freeAssetNetUsage[keys2[j]]; + ? new $util.LongBits( + message.freeAssetNetUsage[keys2[j]].low >>> 0, + message.freeAssetNetUsage[keys2[j]].high >>> 0 + ).toNumber() + : message.freeAssetNetUsage[keys2[j]]; } if (message.latestConsumeTime != null && message.hasOwnProperty('latestConsumeTime')) if (typeof message.latestConsumeTime === 'number') @@ -15426,8 +15436,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.latestConsumeTime) : options.longs === Number - ? new $util.LongBits(message.latestConsumeTime.low >>> 0, message.latestConsumeTime.high >>> 0).toNumber() - : message.latestConsumeTime; + ? new $util.LongBits( + message.latestConsumeTime.low >>> 0, + message.latestConsumeTime.high >>> 0 + ).toNumber() + : message.latestConsumeTime; if (message.latestConsumeFreeTime != null && message.hasOwnProperty('latestConsumeFreeTime')) if (typeof message.latestConsumeFreeTime === 'number') object.latestConsumeFreeTime = @@ -15437,18 +15450,18 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.latestConsumeFreeTime) : options.longs === Number - ? new $util.LongBits( - message.latestConsumeFreeTime.low >>> 0, - message.latestConsumeFreeTime.high >>> 0 - ).toNumber() - : message.latestConsumeFreeTime; + ? new $util.LongBits( + message.latestConsumeFreeTime.low >>> 0, + message.latestConsumeFreeTime.high >>> 0 + ).toNumber() + : message.latestConsumeFreeTime; if (message.accountId != null && message.hasOwnProperty('accountId')) object.accountId = options.bytes === String ? $util.base64.encode(message.accountId, 0, message.accountId.length) : options.bytes === Array - ? Array.prototype.slice.call(message.accountId) - : message.accountId; + ? Array.prototype.slice.call(message.accountId) + : message.accountId; if (message.accountResource != null && message.hasOwnProperty('accountResource')) object.accountResource = $root.protocol.Account.AccountResource.toObject(message.accountResource, options); if (message.codeHash != null && message.hasOwnProperty('codeHash')) @@ -15456,8 +15469,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.codeHash, 0, message.codeHash.length) : options.bytes === Array - ? Array.prototype.slice.call(message.codeHash) - : message.codeHash; + ? Array.prototype.slice.call(message.codeHash) + : message.codeHash; if (message.ownerPermission != null && message.hasOwnProperty('ownerPermission')) object.ownerPermission = $root.protocol.Permission.toObject(message.ownerPermission, options); if (message.witnessPermission != null && message.hasOwnProperty('witnessPermission')) @@ -15481,11 +15494,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.acquiredDelegatedFrozenBalanceForBandwidth) : options.longs === Number - ? new $util.LongBits( - message.acquiredDelegatedFrozenBalanceForBandwidth.low >>> 0, - message.acquiredDelegatedFrozenBalanceForBandwidth.high >>> 0 - ).toNumber() - : message.acquiredDelegatedFrozenBalanceForBandwidth; + ? new $util.LongBits( + message.acquiredDelegatedFrozenBalanceForBandwidth.low >>> 0, + message.acquiredDelegatedFrozenBalanceForBandwidth.high >>> 0 + ).toNumber() + : message.acquiredDelegatedFrozenBalanceForBandwidth; if ( message.delegatedFrozenBalanceForBandwidth != null && message.hasOwnProperty('delegatedFrozenBalanceForBandwidth') @@ -15500,11 +15513,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.delegatedFrozenBalanceForBandwidth) : options.longs === Number - ? new $util.LongBits( - message.delegatedFrozenBalanceForBandwidth.low >>> 0, - message.delegatedFrozenBalanceForBandwidth.high >>> 0 - ).toNumber() - : message.delegatedFrozenBalanceForBandwidth; + ? new $util.LongBits( + message.delegatedFrozenBalanceForBandwidth.low >>> 0, + message.delegatedFrozenBalanceForBandwidth.high >>> 0 + ).toNumber() + : message.delegatedFrozenBalanceForBandwidth; if (message.assetV2 && (keys2 = Object.keys(message.assetV2)).length) { object.assetV2 = {}; for (var j = 0; j < keys2.length; ++j) @@ -15516,19 +15529,19 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.assetV2[keys2[j]]) : options.longs === Number - ? new $util.LongBits( - message.assetV2[keys2[j]].low >>> 0, - message.assetV2[keys2[j]].high >>> 0 - ).toNumber() - : message.assetV2[keys2[j]]; + ? new $util.LongBits( + message.assetV2[keys2[j]].low >>> 0, + message.assetV2[keys2[j]].high >>> 0 + ).toNumber() + : message.assetV2[keys2[j]]; } if (message.assetIssued_ID != null && message.hasOwnProperty('assetIssued_ID')) object.assetIssued_ID = options.bytes === String ? $util.base64.encode(message.assetIssued_ID, 0, message.assetIssued_ID.length) : options.bytes === Array - ? Array.prototype.slice.call(message.assetIssued_ID) - : message.assetIssued_ID; + ? Array.prototype.slice.call(message.assetIssued_ID) + : message.assetIssued_ID; if (message.latestAssetOperationTimeV2 && (keys2 = Object.keys(message.latestAssetOperationTimeV2)).length) { object.latestAssetOperationTimeV2 = {}; for (var j = 0; j < keys2.length; ++j) @@ -15542,11 +15555,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.latestAssetOperationTimeV2[keys2[j]]) : options.longs === Number - ? new $util.LongBits( - message.latestAssetOperationTimeV2[keys2[j]].low >>> 0, - message.latestAssetOperationTimeV2[keys2[j]].high >>> 0 - ).toNumber() - : message.latestAssetOperationTimeV2[keys2[j]]; + ? new $util.LongBits( + message.latestAssetOperationTimeV2[keys2[j]].low >>> 0, + message.latestAssetOperationTimeV2[keys2[j]].high >>> 0 + ).toNumber() + : message.latestAssetOperationTimeV2[keys2[j]]; } if (message.freeAssetNetUsageV2 && (keys2 = Object.keys(message.freeAssetNetUsageV2)).length) { object.freeAssetNetUsageV2 = {}; @@ -15561,11 +15574,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.freeAssetNetUsageV2[keys2[j]]) : options.longs === Number - ? new $util.LongBits( - message.freeAssetNetUsageV2[keys2[j]].low >>> 0, - message.freeAssetNetUsageV2[keys2[j]].high >>> 0 - ).toNumber() - : message.freeAssetNetUsageV2[keys2[j]]; + ? new $util.LongBits( + message.freeAssetNetUsageV2[keys2[j]].low >>> 0, + message.freeAssetNetUsageV2[keys2[j]].high >>> 0 + ).toNumber() + : message.freeAssetNetUsageV2[keys2[j]]; } return object; }; @@ -15803,8 +15816,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.frozenBalance) : options.longs === Number - ? new $util.LongBits(message.frozenBalance.low >>> 0, message.frozenBalance.high >>> 0).toNumber() - : message.frozenBalance; + ? new $util.LongBits(message.frozenBalance.low >>> 0, message.frozenBalance.high >>> 0).toNumber() + : message.frozenBalance; if (message.expireTime != null && message.hasOwnProperty('expireTime')) if (typeof message.expireTime === 'number') object.expireTime = options.longs === String ? String(message.expireTime) : message.expireTime; @@ -15813,8 +15826,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.expireTime) : options.longs === Number - ? new $util.LongBits(message.expireTime.low >>> 0, message.expireTime.high >>> 0).toNumber() - : message.expireTime; + ? new $util.LongBits(message.expireTime.low >>> 0, message.expireTime.high >>> 0).toNumber() + : message.expireTime; return object; }; @@ -16182,9 +16195,8 @@ $root.protocol = (function () { } if (object.latestConsumeTimeForEnergy != null) if ($util.Long) - (message.latestConsumeTimeForEnergy = $util.Long.fromValue( - object.latestConsumeTimeForEnergy - )).unsigned = false; + (message.latestConsumeTimeForEnergy = $util.Long.fromValue(object.latestConsumeTimeForEnergy)).unsigned = + false; else if (typeof object.latestConsumeTimeForEnergy === 'string') message.latestConsumeTimeForEnergy = parseInt(object.latestConsumeTimeForEnergy, 10); else if (typeof object.latestConsumeTimeForEnergy === 'number') @@ -16245,9 +16257,8 @@ $root.protocol = (function () { ).toNumber(); if (object.latestExchangeStorageTime != null) if ($util.Long) - (message.latestExchangeStorageTime = $util.Long.fromValue( - object.latestExchangeStorageTime - )).unsigned = false; + (message.latestExchangeStorageTime = $util.Long.fromValue(object.latestExchangeStorageTime)).unsigned = + false; else if (typeof object.latestExchangeStorageTime === 'string') message.latestExchangeStorageTime = parseInt(object.latestExchangeStorageTime, 10); else if (typeof object.latestExchangeStorageTime === 'number') @@ -16318,8 +16329,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.energyUsage) : options.longs === Number - ? new $util.LongBits(message.energyUsage.low >>> 0, message.energyUsage.high >>> 0).toNumber() - : message.energyUsage; + ? new $util.LongBits(message.energyUsage.low >>> 0, message.energyUsage.high >>> 0).toNumber() + : message.energyUsage; if (message.frozenBalanceForEnergy != null && message.hasOwnProperty('frozenBalanceForEnergy')) object.frozenBalanceForEnergy = $root.protocol.Account.Frozen.toObject( message.frozenBalanceForEnergy, @@ -16336,11 +16347,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.latestConsumeTimeForEnergy) : options.longs === Number - ? new $util.LongBits( - message.latestConsumeTimeForEnergy.low >>> 0, - message.latestConsumeTimeForEnergy.high >>> 0 - ).toNumber() - : message.latestConsumeTimeForEnergy; + ? new $util.LongBits( + message.latestConsumeTimeForEnergy.low >>> 0, + message.latestConsumeTimeForEnergy.high >>> 0 + ).toNumber() + : message.latestConsumeTimeForEnergy; if ( message.acquiredDelegatedFrozenBalanceForEnergy != null && message.hasOwnProperty('acquiredDelegatedFrozenBalanceForEnergy') @@ -16355,11 +16366,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.acquiredDelegatedFrozenBalanceForEnergy) : options.longs === Number - ? new $util.LongBits( - message.acquiredDelegatedFrozenBalanceForEnergy.low >>> 0, - message.acquiredDelegatedFrozenBalanceForEnergy.high >>> 0 - ).toNumber() - : message.acquiredDelegatedFrozenBalanceForEnergy; + ? new $util.LongBits( + message.acquiredDelegatedFrozenBalanceForEnergy.low >>> 0, + message.acquiredDelegatedFrozenBalanceForEnergy.high >>> 0 + ).toNumber() + : message.acquiredDelegatedFrozenBalanceForEnergy; if ( message.delegatedFrozenBalanceForEnergy != null && message.hasOwnProperty('delegatedFrozenBalanceForEnergy') @@ -16374,11 +16385,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.delegatedFrozenBalanceForEnergy) : options.longs === Number - ? new $util.LongBits( - message.delegatedFrozenBalanceForEnergy.low >>> 0, - message.delegatedFrozenBalanceForEnergy.high >>> 0 - ).toNumber() - : message.delegatedFrozenBalanceForEnergy; + ? new $util.LongBits( + message.delegatedFrozenBalanceForEnergy.low >>> 0, + message.delegatedFrozenBalanceForEnergy.high >>> 0 + ).toNumber() + : message.delegatedFrozenBalanceForEnergy; if (message.storageLimit != null && message.hasOwnProperty('storageLimit')) if (typeof message.storageLimit === 'number') object.storageLimit = options.longs === String ? String(message.storageLimit) : message.storageLimit; @@ -16387,8 +16398,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.storageLimit) : options.longs === Number - ? new $util.LongBits(message.storageLimit.low >>> 0, message.storageLimit.high >>> 0).toNumber() - : message.storageLimit; + ? new $util.LongBits(message.storageLimit.low >>> 0, message.storageLimit.high >>> 0).toNumber() + : message.storageLimit; if (message.storageUsage != null && message.hasOwnProperty('storageUsage')) if (typeof message.storageUsage === 'number') object.storageUsage = options.longs === String ? String(message.storageUsage) : message.storageUsage; @@ -16397,8 +16408,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.storageUsage) : options.longs === Number - ? new $util.LongBits(message.storageUsage.low >>> 0, message.storageUsage.high >>> 0).toNumber() - : message.storageUsage; + ? new $util.LongBits(message.storageUsage.low >>> 0, message.storageUsage.high >>> 0).toNumber() + : message.storageUsage; if (message.latestExchangeStorageTime != null && message.hasOwnProperty('latestExchangeStorageTime')) if (typeof message.latestExchangeStorageTime === 'number') object.latestExchangeStorageTime = @@ -16408,11 +16419,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.latestExchangeStorageTime) : options.longs === Number - ? new $util.LongBits( - message.latestExchangeStorageTime.low >>> 0, - message.latestExchangeStorageTime.high >>> 0 - ).toNumber() - : message.latestExchangeStorageTime; + ? new $util.LongBits( + message.latestExchangeStorageTime.low >>> 0, + message.latestExchangeStorageTime.high >>> 0 + ).toNumber() + : message.latestExchangeStorageTime; return object; }; @@ -16641,8 +16652,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array - ? Array.prototype.slice.call(message.address) - : message.address; + ? Array.prototype.slice.call(message.address) + : message.address; if (message.weight != null && message.hasOwnProperty('weight')) if (typeof message.weight === 'number') object.weight = options.longs === String ? String(message.weight) : message.weight; @@ -16651,8 +16662,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.weight) : options.longs === Number - ? new $util.LongBits(message.weight.low >>> 0, message.weight.high >>> 0).toNumber() - : message.weight; + ? new $util.LongBits(message.weight.low >>> 0, message.weight.high >>> 0).toNumber() + : message.weight; return object; }; @@ -17033,15 +17044,15 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.from, 0, message.from.length) : options.bytes === Array - ? Array.prototype.slice.call(message.from) - : message.from; + ? Array.prototype.slice.call(message.from) + : message.from; if (message.to != null && message.hasOwnProperty('to')) object.to = options.bytes === String ? $util.base64.encode(message.to, 0, message.to.length) : options.bytes === Array - ? Array.prototype.slice.call(message.to) - : message.to; + ? Array.prototype.slice.call(message.to) + : message.to; if (message.frozenBalanceForBandwidth != null && message.hasOwnProperty('frozenBalanceForBandwidth')) if (typeof message.frozenBalanceForBandwidth === 'number') object.frozenBalanceForBandwidth = @@ -17051,11 +17062,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.frozenBalanceForBandwidth) : options.longs === Number - ? new $util.LongBits( - message.frozenBalanceForBandwidth.low >>> 0, - message.frozenBalanceForBandwidth.high >>> 0 - ).toNumber() - : message.frozenBalanceForBandwidth; + ? new $util.LongBits( + message.frozenBalanceForBandwidth.low >>> 0, + message.frozenBalanceForBandwidth.high >>> 0 + ).toNumber() + : message.frozenBalanceForBandwidth; if (message.frozenBalanceForEnergy != null && message.hasOwnProperty('frozenBalanceForEnergy')) if (typeof message.frozenBalanceForEnergy === 'number') object.frozenBalanceForEnergy = @@ -17065,11 +17076,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.frozenBalanceForEnergy) : options.longs === Number - ? new $util.LongBits( - message.frozenBalanceForEnergy.low >>> 0, - message.frozenBalanceForEnergy.high >>> 0 - ).toNumber() - : message.frozenBalanceForEnergy; + ? new $util.LongBits( + message.frozenBalanceForEnergy.low >>> 0, + message.frozenBalanceForEnergy.high >>> 0 + ).toNumber() + : message.frozenBalanceForEnergy; if (message.expireTimeForBandwidth != null && message.hasOwnProperty('expireTimeForBandwidth')) if (typeof message.expireTimeForBandwidth === 'number') object.expireTimeForBandwidth = @@ -17079,11 +17090,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.expireTimeForBandwidth) : options.longs === Number - ? new $util.LongBits( - message.expireTimeForBandwidth.low >>> 0, - message.expireTimeForBandwidth.high >>> 0 - ).toNumber() - : message.expireTimeForBandwidth; + ? new $util.LongBits( + message.expireTimeForBandwidth.low >>> 0, + message.expireTimeForBandwidth.high >>> 0 + ).toNumber() + : message.expireTimeForBandwidth; if (message.expireTimeForEnergy != null && message.hasOwnProperty('expireTimeForEnergy')) if (typeof message.expireTimeForEnergy === 'number') object.expireTimeForEnergy = @@ -17093,11 +17104,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.expireTimeForEnergy) : options.longs === Number - ? new $util.LongBits( - message.expireTimeForEnergy.low >>> 0, - message.expireTimeForEnergy.high >>> 0 - ).toNumber() - : message.expireTimeForEnergy; + ? new $util.LongBits( + message.expireTimeForEnergy.low >>> 0, + message.expireTimeForEnergy.high >>> 0 + ).toNumber() + : message.expireTimeForEnergy; return object; }; @@ -17322,8 +17333,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.permissionName, 0, message.permissionName.length) : options.bytes === Array - ? Array.prototype.slice.call(message.permissionName) - : message.permissionName; + ? Array.prototype.slice.call(message.permissionName) + : message.permissionName; return object; }; @@ -17684,16 +17695,16 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.threshold) : options.longs === Number - ? new $util.LongBits(message.threshold.low >>> 0, message.threshold.high >>> 0).toNumber() - : message.threshold; + ? new $util.LongBits(message.threshold.low >>> 0, message.threshold.high >>> 0).toNumber() + : message.threshold; if (message.parentId != null && message.hasOwnProperty('parentId')) object.parentId = message.parentId; if (message.operations != null && message.hasOwnProperty('operations')) object.operations = options.bytes === String ? $util.base64.encode(message.operations, 0, message.operations.length) : options.bytes === Array - ? Array.prototype.slice.call(message.operations) - : message.operations; + ? Array.prototype.slice.call(message.operations) + : message.operations; if (message.keys && message.keys.length) { object.keys = []; for (var j = 0; j < message.keys.length; ++j) @@ -18156,8 +18167,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array - ? Array.prototype.slice.call(message.address) - : message.address; + ? Array.prototype.slice.call(message.address) + : message.address; if (message.voteCount != null && message.hasOwnProperty('voteCount')) if (typeof message.voteCount === 'number') object.voteCount = options.longs === String ? String(message.voteCount) : message.voteCount; @@ -18166,15 +18177,15 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.voteCount) : options.longs === Number - ? new $util.LongBits(message.voteCount.low >>> 0, message.voteCount.high >>> 0).toNumber() - : message.voteCount; + ? new $util.LongBits(message.voteCount.low >>> 0, message.voteCount.high >>> 0).toNumber() + : message.voteCount; if (message.pubKey != null && message.hasOwnProperty('pubKey')) object.pubKey = options.bytes === String ? $util.base64.encode(message.pubKey, 0, message.pubKey.length) : options.bytes === Array - ? Array.prototype.slice.call(message.pubKey) - : message.pubKey; + ? Array.prototype.slice.call(message.pubKey) + : message.pubKey; if (message.url != null && message.hasOwnProperty('url')) object.url = message.url; if (message.totalProduced != null && message.hasOwnProperty('totalProduced')) if (typeof message.totalProduced === 'number') @@ -18184,8 +18195,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.totalProduced) : options.longs === Number - ? new $util.LongBits(message.totalProduced.low >>> 0, message.totalProduced.high >>> 0).toNumber() - : message.totalProduced; + ? new $util.LongBits(message.totalProduced.low >>> 0, message.totalProduced.high >>> 0).toNumber() + : message.totalProduced; if (message.totalMissed != null && message.hasOwnProperty('totalMissed')) if (typeof message.totalMissed === 'number') object.totalMissed = options.longs === String ? String(message.totalMissed) : message.totalMissed; @@ -18194,8 +18205,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.totalMissed) : options.longs === Number - ? new $util.LongBits(message.totalMissed.low >>> 0, message.totalMissed.high >>> 0).toNumber() - : message.totalMissed; + ? new $util.LongBits(message.totalMissed.low >>> 0, message.totalMissed.high >>> 0).toNumber() + : message.totalMissed; if (message.latestBlockNum != null && message.hasOwnProperty('latestBlockNum')) if (typeof message.latestBlockNum === 'number') object.latestBlockNum = options.longs === String ? String(message.latestBlockNum) : message.latestBlockNum; @@ -18204,8 +18215,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.latestBlockNum) : options.longs === Number - ? new $util.LongBits(message.latestBlockNum.low >>> 0, message.latestBlockNum.high >>> 0).toNumber() - : message.latestBlockNum; + ? new $util.LongBits(message.latestBlockNum.low >>> 0, message.latestBlockNum.high >>> 0).toNumber() + : message.latestBlockNum; if (message.latestSlotNum != null && message.hasOwnProperty('latestSlotNum')) if (typeof message.latestSlotNum === 'number') object.latestSlotNum = options.longs === String ? String(message.latestSlotNum) : message.latestSlotNum; @@ -18214,8 +18225,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.latestSlotNum) : options.longs === Number - ? new $util.LongBits(message.latestSlotNum.low >>> 0, message.latestSlotNum.high >>> 0).toNumber() - : message.latestSlotNum; + ? new $util.LongBits(message.latestSlotNum.low >>> 0, message.latestSlotNum.high >>> 0).toNumber() + : message.latestSlotNum; if (message.isJobs != null && message.hasOwnProperty('isJobs')) object.isJobs = message.isJobs; return object; }; @@ -18478,8 +18489,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array - ? Array.prototype.slice.call(message.address) - : message.address; + ? Array.prototype.slice.call(message.address) + : message.address; if (message.oldVotes && message.oldVotes.length) { object.oldVotes = []; for (var j = 0; j < message.oldVotes.length; ++j) @@ -18719,15 +18730,15 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number - ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() - : message.value; + ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() + : message.value; if (message.pubKeyHash != null && message.hasOwnProperty('pubKeyHash')) object.pubKeyHash = options.bytes === String ? $util.base64.encode(message.pubKeyHash, 0, message.pubKeyHash.length) : options.bytes === Array - ? Array.prototype.slice.call(message.pubKeyHash) - : message.pubKeyHash; + ? Array.prototype.slice.call(message.pubKeyHash) + : message.pubKeyHash; return object; }; @@ -18947,8 +18958,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array - ? Array.prototype.slice.call(message.signature) - : message.signature; + ? Array.prototype.slice.call(message.signature) + : message.signature; return object; }; @@ -19197,8 +19208,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.txID, 0, message.txID.length) : options.bytes === Array - ? Array.prototype.slice.call(message.txID) - : message.txID; + ? Array.prototype.slice.call(message.txID) + : message.txID; if (message.vout != null && message.hasOwnProperty('vout')) if (typeof message.vout === 'number') object.vout = options.longs === String ? String(message.vout) : message.vout; @@ -19207,15 +19218,15 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.vout) : options.longs === Number - ? new $util.LongBits(message.vout.low >>> 0, message.vout.high >>> 0).toNumber() - : message.vout; + ? new $util.LongBits(message.vout.low >>> 0, message.vout.high >>> 0).toNumber() + : message.vout; if (message.pubKey != null && message.hasOwnProperty('pubKey')) object.pubKey = options.bytes === String ? $util.base64.encode(message.pubKey, 0, message.pubKey.length) : options.bytes === Array - ? Array.prototype.slice.call(message.pubKey) - : message.pubKey; + ? Array.prototype.slice.call(message.pubKey) + : message.pubKey; return object; }; @@ -19888,8 +19899,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.energyUsage) : options.longs === Number - ? new $util.LongBits(message.energyUsage.low >>> 0, message.energyUsage.high >>> 0).toNumber() - : message.energyUsage; + ? new $util.LongBits(message.energyUsage.low >>> 0, message.energyUsage.high >>> 0).toNumber() + : message.energyUsage; if (message.energyFee != null && message.hasOwnProperty('energyFee')) if (typeof message.energyFee === 'number') object.energyFee = options.longs === String ? String(message.energyFee) : message.energyFee; @@ -19898,8 +19909,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.energyFee) : options.longs === Number - ? new $util.LongBits(message.energyFee.low >>> 0, message.energyFee.high >>> 0).toNumber() - : message.energyFee; + ? new $util.LongBits(message.energyFee.low >>> 0, message.energyFee.high >>> 0).toNumber() + : message.energyFee; if (message.originEnergyUsage != null && message.hasOwnProperty('originEnergyUsage')) if (typeof message.originEnergyUsage === 'number') object.originEnergyUsage = @@ -19909,8 +19920,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.originEnergyUsage) : options.longs === Number - ? new $util.LongBits(message.originEnergyUsage.low >>> 0, message.originEnergyUsage.high >>> 0).toNumber() - : message.originEnergyUsage; + ? new $util.LongBits( + message.originEnergyUsage.low >>> 0, + message.originEnergyUsage.high >>> 0 + ).toNumber() + : message.originEnergyUsage; if (message.energyUsageTotal != null && message.hasOwnProperty('energyUsageTotal')) if (typeof message.energyUsageTotal === 'number') object.energyUsageTotal = @@ -19920,8 +19934,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.energyUsageTotal) : options.longs === Number - ? new $util.LongBits(message.energyUsageTotal.low >>> 0, message.energyUsageTotal.high >>> 0).toNumber() - : message.energyUsageTotal; + ? new $util.LongBits(message.energyUsageTotal.low >>> 0, message.energyUsageTotal.high >>> 0).toNumber() + : message.energyUsageTotal; if (message.netUsage != null && message.hasOwnProperty('netUsage')) if (typeof message.netUsage === 'number') object.netUsage = options.longs === String ? String(message.netUsage) : message.netUsage; @@ -19930,8 +19944,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.netUsage) : options.longs === Number - ? new $util.LongBits(message.netUsage.low >>> 0, message.netUsage.high >>> 0).toNumber() - : message.netUsage; + ? new $util.LongBits(message.netUsage.low >>> 0, message.netUsage.high >>> 0).toNumber() + : message.netUsage; if (message.netFee != null && message.hasOwnProperty('netFee')) if (typeof message.netFee === 'number') object.netFee = options.longs === String ? String(message.netFee) : message.netFee; @@ -19940,8 +19954,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.netFee) : options.longs === Number - ? new $util.LongBits(message.netFee.low >>> 0, message.netFee.high >>> 0).toNumber() - : message.netFee; + ? new $util.LongBits(message.netFee.low >>> 0, message.netFee.high >>> 0).toNumber() + : message.netFee; if (message.result != null && message.hasOwnProperty('result')) object.result = options.enums === String ? $root.protocol.Transaction.Result.contractResult[message.result] : message.result; @@ -20215,8 +20229,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.signature[j], 0, message.signature[j].length) : options.bytes === Array - ? Array.prototype.slice.call(message.signature[j]) - : message.signature[j]; + ? Array.prototype.slice.call(message.signature[j]) + : message.signature[j]; } if (message.ret && message.ret.length) { object.ret = []; @@ -20677,15 +20691,15 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.provider, 0, message.provider.length) : options.bytes === Array - ? Array.prototype.slice.call(message.provider) - : message.provider; + ? Array.prototype.slice.call(message.provider) + : message.provider; if (message.ContractName != null && message.hasOwnProperty('ContractName')) object.ContractName = options.bytes === String ? $util.base64.encode(message.ContractName, 0, message.ContractName.length) : options.bytes === Array - ? Array.prototype.slice.call(message.ContractName) - : message.ContractName; + ? Array.prototype.slice.call(message.ContractName) + : message.ContractName; if (message.PermissionId != null && message.hasOwnProperty('PermissionId')) object.PermissionId = message.PermissionId; return object; @@ -21255,9 +21269,8 @@ $root.protocol = (function () { ).toNumber(); if (object.exchangeInjectAnotherAmount != null) if ($util.Long) - (message.exchangeInjectAnotherAmount = $util.Long.fromValue( - object.exchangeInjectAnotherAmount - )).unsigned = false; + (message.exchangeInjectAnotherAmount = $util.Long.fromValue(object.exchangeInjectAnotherAmount)).unsigned = + false; else if (typeof object.exchangeInjectAnotherAmount === 'string') message.exchangeInjectAnotherAmount = parseInt(object.exchangeInjectAnotherAmount, 10); else if (typeof object.exchangeInjectAnotherAmount === 'number') @@ -21352,8 +21365,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.fee) : options.longs === Number - ? new $util.LongBits(message.fee.low >>> 0, message.fee.high >>> 0).toNumber() - : message.fee; + ? new $util.LongBits(message.fee.low >>> 0, message.fee.high >>> 0).toNumber() + : message.fee; if (message.ret != null && message.hasOwnProperty('ret')) object.ret = options.enums === String ? $root.protocol.Transaction.Result.code[message.ret] : message.ret; if (message.contractRet != null && message.hasOwnProperty('contractRet')) @@ -21371,8 +21384,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.withdrawAmount) : options.longs === Number - ? new $util.LongBits(message.withdrawAmount.low >>> 0, message.withdrawAmount.high >>> 0).toNumber() - : message.withdrawAmount; + ? new $util.LongBits(message.withdrawAmount.low >>> 0, message.withdrawAmount.high >>> 0).toNumber() + : message.withdrawAmount; if (message.unfreezeAmount != null && message.hasOwnProperty('unfreezeAmount')) if (typeof message.unfreezeAmount === 'number') object.unfreezeAmount = options.longs === String ? String(message.unfreezeAmount) : message.unfreezeAmount; @@ -21381,8 +21394,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.unfreezeAmount) : options.longs === Number - ? new $util.LongBits(message.unfreezeAmount.low >>> 0, message.unfreezeAmount.high >>> 0).toNumber() - : message.unfreezeAmount; + ? new $util.LongBits(message.unfreezeAmount.low >>> 0, message.unfreezeAmount.high >>> 0).toNumber() + : message.unfreezeAmount; if (message.exchangeReceivedAmount != null && message.hasOwnProperty('exchangeReceivedAmount')) if (typeof message.exchangeReceivedAmount === 'number') object.exchangeReceivedAmount = @@ -21392,11 +21405,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.exchangeReceivedAmount) : options.longs === Number - ? new $util.LongBits( - message.exchangeReceivedAmount.low >>> 0, - message.exchangeReceivedAmount.high >>> 0 - ).toNumber() - : message.exchangeReceivedAmount; + ? new $util.LongBits( + message.exchangeReceivedAmount.low >>> 0, + message.exchangeReceivedAmount.high >>> 0 + ).toNumber() + : message.exchangeReceivedAmount; if (message.exchangeInjectAnotherAmount != null && message.hasOwnProperty('exchangeInjectAnotherAmount')) if (typeof message.exchangeInjectAnotherAmount === 'number') object.exchangeInjectAnotherAmount = @@ -21408,11 +21421,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.exchangeInjectAnotherAmount) : options.longs === Number - ? new $util.LongBits( - message.exchangeInjectAnotherAmount.low >>> 0, - message.exchangeInjectAnotherAmount.high >>> 0 - ).toNumber() - : message.exchangeInjectAnotherAmount; + ? new $util.LongBits( + message.exchangeInjectAnotherAmount.low >>> 0, + message.exchangeInjectAnotherAmount.high >>> 0 + ).toNumber() + : message.exchangeInjectAnotherAmount; if (message.exchangeWithdrawAnotherAmount != null && message.hasOwnProperty('exchangeWithdrawAnotherAmount')) if (typeof message.exchangeWithdrawAnotherAmount === 'number') object.exchangeWithdrawAnotherAmount = @@ -21424,11 +21437,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.exchangeWithdrawAnotherAmount) : options.longs === Number - ? new $util.LongBits( - message.exchangeWithdrawAnotherAmount.low >>> 0, - message.exchangeWithdrawAnotherAmount.high >>> 0 - ).toNumber() - : message.exchangeWithdrawAnotherAmount; + ? new $util.LongBits( + message.exchangeWithdrawAnotherAmount.low >>> 0, + message.exchangeWithdrawAnotherAmount.high >>> 0 + ).toNumber() + : message.exchangeWithdrawAnotherAmount; if (message.exchangeId != null && message.hasOwnProperty('exchangeId')) if (typeof message.exchangeId === 'number') object.exchangeId = options.longs === String ? String(message.exchangeId) : message.exchangeId; @@ -21437,8 +21450,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.exchangeId) : options.longs === Number - ? new $util.LongBits(message.exchangeId.low >>> 0, message.exchangeId.high >>> 0).toNumber() - : message.exchangeId; + ? new $util.LongBits(message.exchangeId.low >>> 0, message.exchangeId.high >>> 0).toNumber() + : message.exchangeId; return object; }; @@ -21994,8 +22007,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.refBlockBytes, 0, message.refBlockBytes.length) : options.bytes === Array - ? Array.prototype.slice.call(message.refBlockBytes) - : message.refBlockBytes; + ? Array.prototype.slice.call(message.refBlockBytes) + : message.refBlockBytes; if (message.refBlockNum != null && message.hasOwnProperty('refBlockNum')) if (typeof message.refBlockNum === 'number') object.refBlockNum = options.longs === String ? String(message.refBlockNum) : message.refBlockNum; @@ -22004,15 +22017,15 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.refBlockNum) : options.longs === Number - ? new $util.LongBits(message.refBlockNum.low >>> 0, message.refBlockNum.high >>> 0).toNumber() - : message.refBlockNum; + ? new $util.LongBits(message.refBlockNum.low >>> 0, message.refBlockNum.high >>> 0).toNumber() + : message.refBlockNum; if (message.refBlockHash != null && message.hasOwnProperty('refBlockHash')) object.refBlockHash = options.bytes === String ? $util.base64.encode(message.refBlockHash, 0, message.refBlockHash.length) : options.bytes === Array - ? Array.prototype.slice.call(message.refBlockHash) - : message.refBlockHash; + ? Array.prototype.slice.call(message.refBlockHash) + : message.refBlockHash; if (message.expiration != null && message.hasOwnProperty('expiration')) if (typeof message.expiration === 'number') object.expiration = options.longs === String ? String(message.expiration) : message.expiration; @@ -22021,8 +22034,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.expiration) : options.longs === Number - ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() - : message.expiration; + ? new $util.LongBits(message.expiration.low >>> 0, message.expiration.high >>> 0).toNumber() + : message.expiration; if (message.auths && message.auths.length) { object.auths = []; for (var j = 0; j < message.auths.length; ++j) @@ -22033,8 +22046,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array - ? Array.prototype.slice.call(message.data) - : message.data; + ? Array.prototype.slice.call(message.data) + : message.data; if (message.contract && message.contract.length) { object.contract = []; for (var j = 0; j < message.contract.length; ++j) @@ -22045,8 +22058,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.scripts, 0, message.scripts.length) : options.bytes === Array - ? Array.prototype.slice.call(message.scripts) - : message.scripts; + ? Array.prototype.slice.call(message.scripts) + : message.scripts; if (message.timestamp != null && message.hasOwnProperty('timestamp')) if (typeof message.timestamp === 'number') object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; @@ -22055,8 +22068,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number - ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() - : message.timestamp; + ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() + : message.timestamp; if (message.feeLimit != null && message.hasOwnProperty('feeLimit')) if (typeof message.feeLimit === 'number') object.feeLimit = options.longs === String ? String(message.feeLimit) : message.feeLimit; @@ -22065,8 +22078,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.feeLimit) : options.longs === Number - ? new $util.LongBits(message.feeLimit.low >>> 0, message.feeLimit.high >>> 0).toNumber() - : message.feeLimit; + ? new $util.LongBits(message.feeLimit.low >>> 0, message.feeLimit.high >>> 0).toNumber() + : message.feeLimit; return object; }; @@ -22753,9 +22766,8 @@ $root.protocol = (function () { ).toNumber(); if (object.exchangeInjectAnotherAmount != null) if ($util.Long) - (message.exchangeInjectAnotherAmount = $util.Long.fromValue( - object.exchangeInjectAnotherAmount - )).unsigned = false; + (message.exchangeInjectAnotherAmount = $util.Long.fromValue(object.exchangeInjectAnotherAmount)).unsigned = + false; else if (typeof object.exchangeInjectAnotherAmount === 'string') message.exchangeInjectAnotherAmount = parseInt(object.exchangeInjectAnotherAmount, 10); else if (typeof object.exchangeInjectAnotherAmount === 'number') @@ -22874,8 +22886,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.id, 0, message.id.length) : options.bytes === Array - ? Array.prototype.slice.call(message.id) - : message.id; + ? Array.prototype.slice.call(message.id) + : message.id; if (message.fee != null && message.hasOwnProperty('fee')) if (typeof message.fee === 'number') object.fee = options.longs === String ? String(message.fee) : message.fee; else @@ -22883,8 +22895,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.fee) : options.longs === Number - ? new $util.LongBits(message.fee.low >>> 0, message.fee.high >>> 0).toNumber() - : message.fee; + ? new $util.LongBits(message.fee.low >>> 0, message.fee.high >>> 0).toNumber() + : message.fee; if (message.blockNumber != null && message.hasOwnProperty('blockNumber')) if (typeof message.blockNumber === 'number') object.blockNumber = options.longs === String ? String(message.blockNumber) : message.blockNumber; @@ -22893,8 +22905,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.blockNumber) : options.longs === Number - ? new $util.LongBits(message.blockNumber.low >>> 0, message.blockNumber.high >>> 0).toNumber() - : message.blockNumber; + ? new $util.LongBits(message.blockNumber.low >>> 0, message.blockNumber.high >>> 0).toNumber() + : message.blockNumber; if (message.blockTimeStamp != null && message.hasOwnProperty('blockTimeStamp')) if (typeof message.blockTimeStamp === 'number') object.blockTimeStamp = options.longs === String ? String(message.blockTimeStamp) : message.blockTimeStamp; @@ -22903,8 +22915,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.blockTimeStamp) : options.longs === Number - ? new $util.LongBits(message.blockTimeStamp.low >>> 0, message.blockTimeStamp.high >>> 0).toNumber() - : message.blockTimeStamp; + ? new $util.LongBits(message.blockTimeStamp.low >>> 0, message.blockTimeStamp.high >>> 0).toNumber() + : message.blockTimeStamp; if (message.contractResult && message.contractResult.length) { object.contractResult = []; for (var j = 0; j < message.contractResult.length; ++j) @@ -22912,16 +22924,16 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.contractResult[j], 0, message.contractResult[j].length) : options.bytes === Array - ? Array.prototype.slice.call(message.contractResult[j]) - : message.contractResult[j]; + ? Array.prototype.slice.call(message.contractResult[j]) + : message.contractResult[j]; } if (message.contractAddress != null && message.hasOwnProperty('contractAddress')) object.contractAddress = options.bytes === String ? $util.base64.encode(message.contractAddress, 0, message.contractAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.contractAddress) - : message.contractAddress; + ? Array.prototype.slice.call(message.contractAddress) + : message.contractAddress; if (message.receipt != null && message.hasOwnProperty('receipt')) object.receipt = $root.protocol.ResourceReceipt.toObject(message.receipt, options); if (message.log && message.log.length) { @@ -22936,8 +22948,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.resMessage, 0, message.resMessage.length) : options.bytes === Array - ? Array.prototype.slice.call(message.resMessage) - : message.resMessage; + ? Array.prototype.slice.call(message.resMessage) + : message.resMessage; if (message.assetIssueID != null && message.hasOwnProperty('assetIssueID')) object.assetIssueID = message.assetIssueID; if (message.withdrawAmount != null && message.hasOwnProperty('withdrawAmount')) @@ -22948,8 +22960,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.withdrawAmount) : options.longs === Number - ? new $util.LongBits(message.withdrawAmount.low >>> 0, message.withdrawAmount.high >>> 0).toNumber() - : message.withdrawAmount; + ? new $util.LongBits(message.withdrawAmount.low >>> 0, message.withdrawAmount.high >>> 0).toNumber() + : message.withdrawAmount; if (message.unfreezeAmount != null && message.hasOwnProperty('unfreezeAmount')) if (typeof message.unfreezeAmount === 'number') object.unfreezeAmount = options.longs === String ? String(message.unfreezeAmount) : message.unfreezeAmount; @@ -22958,8 +22970,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.unfreezeAmount) : options.longs === Number - ? new $util.LongBits(message.unfreezeAmount.low >>> 0, message.unfreezeAmount.high >>> 0).toNumber() - : message.unfreezeAmount; + ? new $util.LongBits(message.unfreezeAmount.low >>> 0, message.unfreezeAmount.high >>> 0).toNumber() + : message.unfreezeAmount; if (message.internalTransactions && message.internalTransactions.length) { object.internalTransactions = []; for (var j = 0; j < message.internalTransactions.length; ++j) @@ -22977,11 +22989,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.exchangeReceivedAmount) : options.longs === Number - ? new $util.LongBits( - message.exchangeReceivedAmount.low >>> 0, - message.exchangeReceivedAmount.high >>> 0 - ).toNumber() - : message.exchangeReceivedAmount; + ? new $util.LongBits( + message.exchangeReceivedAmount.low >>> 0, + message.exchangeReceivedAmount.high >>> 0 + ).toNumber() + : message.exchangeReceivedAmount; if (message.exchangeInjectAnotherAmount != null && message.hasOwnProperty('exchangeInjectAnotherAmount')) if (typeof message.exchangeInjectAnotherAmount === 'number') object.exchangeInjectAnotherAmount = @@ -22993,11 +23005,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.exchangeInjectAnotherAmount) : options.longs === Number - ? new $util.LongBits( - message.exchangeInjectAnotherAmount.low >>> 0, - message.exchangeInjectAnotherAmount.high >>> 0 - ).toNumber() - : message.exchangeInjectAnotherAmount; + ? new $util.LongBits( + message.exchangeInjectAnotherAmount.low >>> 0, + message.exchangeInjectAnotherAmount.high >>> 0 + ).toNumber() + : message.exchangeInjectAnotherAmount; if (message.exchangeWithdrawAnotherAmount != null && message.hasOwnProperty('exchangeWithdrawAnotherAmount')) if (typeof message.exchangeWithdrawAnotherAmount === 'number') object.exchangeWithdrawAnotherAmount = @@ -23009,11 +23021,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.exchangeWithdrawAnotherAmount) : options.longs === Number - ? new $util.LongBits( - message.exchangeWithdrawAnotherAmount.low >>> 0, - message.exchangeWithdrawAnotherAmount.high >>> 0 - ).toNumber() - : message.exchangeWithdrawAnotherAmount; + ? new $util.LongBits( + message.exchangeWithdrawAnotherAmount.low >>> 0, + message.exchangeWithdrawAnotherAmount.high >>> 0 + ).toNumber() + : message.exchangeWithdrawAnotherAmount; if (message.exchangeId != null && message.hasOwnProperty('exchangeId')) if (typeof message.exchangeId === 'number') object.exchangeId = options.longs === String ? String(message.exchangeId) : message.exchangeId; @@ -23022,8 +23034,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.exchangeId) : options.longs === Number - ? new $util.LongBits(message.exchangeId.low >>> 0, message.exchangeId.high >>> 0).toNumber() - : message.exchangeId; + ? new $util.LongBits(message.exchangeId.low >>> 0, message.exchangeId.high >>> 0).toNumber() + : message.exchangeId; return object; }; @@ -23297,8 +23309,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array - ? Array.prototype.slice.call(message.address) - : message.address; + ? Array.prototype.slice.call(message.address) + : message.address; if (message.topics && message.topics.length) { object.topics = []; for (var j = 0; j < message.topics.length; ++j) @@ -23306,16 +23318,16 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.topics[j], 0, message.topics[j].length) : options.bytes === Array - ? Array.prototype.slice.call(message.topics[j]) - : message.topics[j]; + ? Array.prototype.slice.call(message.topics[j]) + : message.topics[j]; } if (message.data != null && message.hasOwnProperty('data')) object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array - ? Array.prototype.slice.call(message.data) - : message.data; + ? Array.prototype.slice.call(message.data) + : message.data; return object; }; @@ -23601,8 +23613,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.blockNumber) : options.longs === Number - ? new $util.LongBits(message.blockNumber.low >>> 0, message.blockNumber.high >>> 0).toNumber() - : message.blockNumber; + ? new $util.LongBits(message.blockNumber.low >>> 0, message.blockNumber.high >>> 0).toNumber() + : message.blockNumber; if (message.blockTimeStamp != null && message.hasOwnProperty('blockTimeStamp')) if (typeof message.blockTimeStamp === 'number') object.blockTimeStamp = options.longs === String ? String(message.blockTimeStamp) : message.blockTimeStamp; @@ -23611,8 +23623,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.blockTimeStamp) : options.longs === Number - ? new $util.LongBits(message.blockTimeStamp.low >>> 0, message.blockTimeStamp.high >>> 0).toNumber() - : message.blockTimeStamp; + ? new $util.LongBits(message.blockTimeStamp.low >>> 0, message.blockTimeStamp.high >>> 0).toNumber() + : message.blockTimeStamp; if (message.transactioninfo && message.transactioninfo.length) { object.transactioninfo = []; for (var j = 0; j < message.transactioninfo.length; ++j) @@ -24042,8 +24054,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.privateKey, 0, message.privateKey.length) : options.bytes === Array - ? Array.prototype.slice.call(message.privateKey) - : message.privateKey; + ? Array.prototype.slice.call(message.privateKey) + : message.privateKey; return object; }; @@ -24270,8 +24282,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.witnessSignature, 0, message.witnessSignature.length) : options.bytes === Array - ? Array.prototype.slice.call(message.witnessSignature) - : message.witnessSignature; + ? Array.prototype.slice.call(message.witnessSignature) + : message.witnessSignature; return object; }; @@ -24687,22 +24699,22 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number - ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() - : message.timestamp; + ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() + : message.timestamp; if (message.txTrieRoot != null && message.hasOwnProperty('txTrieRoot')) object.txTrieRoot = options.bytes === String ? $util.base64.encode(message.txTrieRoot, 0, message.txTrieRoot.length) : options.bytes === Array - ? Array.prototype.slice.call(message.txTrieRoot) - : message.txTrieRoot; + ? Array.prototype.slice.call(message.txTrieRoot) + : message.txTrieRoot; if (message.parentHash != null && message.hasOwnProperty('parentHash')) object.parentHash = options.bytes === String ? $util.base64.encode(message.parentHash, 0, message.parentHash.length) : options.bytes === Array - ? Array.prototype.slice.call(message.parentHash) - : message.parentHash; + ? Array.prototype.slice.call(message.parentHash) + : message.parentHash; if (message.number != null && message.hasOwnProperty('number')) if (typeof message.number === 'number') object.number = options.longs === String ? String(message.number) : message.number; @@ -24711,8 +24723,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.number) : options.longs === Number - ? new $util.LongBits(message.number.low >>> 0, message.number.high >>> 0).toNumber() - : message.number; + ? new $util.LongBits(message.number.low >>> 0, message.number.high >>> 0).toNumber() + : message.number; if (message.witnessId != null && message.hasOwnProperty('witnessId')) if (typeof message.witnessId === 'number') object.witnessId = options.longs === String ? String(message.witnessId) : message.witnessId; @@ -24721,23 +24733,23 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.witnessId) : options.longs === Number - ? new $util.LongBits(message.witnessId.low >>> 0, message.witnessId.high >>> 0).toNumber() - : message.witnessId; + ? new $util.LongBits(message.witnessId.low >>> 0, message.witnessId.high >>> 0).toNumber() + : message.witnessId; if (message.witnessAddress != null && message.hasOwnProperty('witnessAddress')) object.witnessAddress = options.bytes === String ? $util.base64.encode(message.witnessAddress, 0, message.witnessAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.witnessAddress) - : message.witnessAddress; + ? Array.prototype.slice.call(message.witnessAddress) + : message.witnessAddress; if (message.version != null && message.hasOwnProperty('version')) object.version = message.version; if (message.accountStateRoot != null && message.hasOwnProperty('accountStateRoot')) object.accountStateRoot = options.bytes === String ? $util.base64.encode(message.accountStateRoot, 0, message.accountStateRoot.length) : options.bytes === Array - ? Array.prototype.slice.call(message.accountStateRoot) - : message.accountStateRoot; + ? Array.prototype.slice.call(message.accountStateRoot) + : message.accountStateRoot; return object; }; @@ -25206,8 +25218,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.remainNum) : options.longs === Number - ? new $util.LongBits(message.remainNum.low >>> 0, message.remainNum.high >>> 0).toNumber() - : message.remainNum; + ? new $util.LongBits(message.remainNum.low >>> 0, message.remainNum.high >>> 0).toNumber() + : message.remainNum; return object; }; @@ -25426,8 +25438,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array - ? Array.prototype.slice.call(message.hash) - : message.hash; + ? Array.prototype.slice.call(message.hash) + : message.hash; if (message.number != null && message.hasOwnProperty('number')) if (typeof message.number === 'number') object.number = options.longs === String ? String(message.number) : message.number; @@ -25436,8 +25448,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.number) : options.longs === Number - ? new $util.LongBits(message.number.low >>> 0, message.number.high >>> 0).toNumber() - : message.number; + ? new $util.LongBits(message.number.low >>> 0, message.number.high >>> 0).toNumber() + : message.number; return object; }; @@ -25914,8 +25926,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array - ? Array.prototype.slice.call(message.hash) - : message.hash; + ? Array.prototype.slice.call(message.hash) + : message.hash; if (message.number != null && message.hasOwnProperty('number')) if (typeof message.number === 'number') object.number = options.longs === String ? String(message.number) : message.number; @@ -25924,8 +25936,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.number) : options.longs === Number - ? new $util.LongBits(message.number.low >>> 0, message.number.high >>> 0).toNumber() - : message.number; + ? new $util.LongBits(message.number.low >>> 0, message.number.high >>> 0).toNumber() + : message.number; return object; }; @@ -26163,8 +26175,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.ids[j], 0, message.ids[j].length) : options.bytes === Array - ? Array.prototype.slice.call(message.ids[j]) - : message.ids[j]; + ? Array.prototype.slice.call(message.ids[j]) + : message.ids[j]; } return object; }; @@ -26734,11 +26746,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.lastSolidityBlockNum) : options.longs === Number - ? new $util.LongBits( - message.lastSolidityBlockNum.low >>> 0, - message.lastSolidityBlockNum.high >>> 0 - ).toNumber() - : message.lastSolidityBlockNum; + ? new $util.LongBits( + message.lastSolidityBlockNum.low >>> 0, + message.lastSolidityBlockNum.high >>> 0 + ).toNumber() + : message.lastSolidityBlockNum; return object; }; @@ -27423,8 +27435,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number - ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() - : message.timestamp; + ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() + : message.timestamp; if (message.genesisBlockId != null && message.hasOwnProperty('genesisBlockId')) object.genesisBlockId = $root.protocol.HelloMessage.BlockId.toObject(message.genesisBlockId, options); if (message.solidBlockId != null && message.hasOwnProperty('solidBlockId')) @@ -27649,8 +27661,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array - ? Array.prototype.slice.call(message.hash) - : message.hash; + ? Array.prototype.slice.call(message.hash) + : message.hash; if (message.number != null && message.hasOwnProperty('number')) if (typeof message.number === 'number') object.number = options.longs === String ? String(message.number) : message.number; @@ -27659,8 +27671,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.number) : options.longs === Number - ? new $util.LongBits(message.number.low >>> 0, message.number.high >>> 0).toNumber() - : message.number; + ? new $util.LongBits(message.number.low >>> 0, message.number.high >>> 0).toNumber() + : message.number; return object; }; @@ -28042,9 +28054,8 @@ $root.protocol = (function () { message.callValue = new $util.LongBits(object.callValue.low >>> 0, object.callValue.high >>> 0).toNumber(); if (object.consumeUserResourcePercent != null) if ($util.Long) - (message.consumeUserResourcePercent = $util.Long.fromValue( - object.consumeUserResourcePercent - )).unsigned = false; + (message.consumeUserResourcePercent = $util.Long.fromValue(object.consumeUserResourcePercent)).unsigned = + false; else if (typeof object.consumeUserResourcePercent === 'string') message.consumeUserResourcePercent = parseInt(object.consumeUserResourcePercent, 10); else if (typeof object.consumeUserResourcePercent === 'number') @@ -28145,15 +28156,15 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.originAddress, 0, message.originAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.originAddress) - : message.originAddress; + ? Array.prototype.slice.call(message.originAddress) + : message.originAddress; if (message.contractAddress != null && message.hasOwnProperty('contractAddress')) object.contractAddress = options.bytes === String ? $util.base64.encode(message.contractAddress, 0, message.contractAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.contractAddress) - : message.contractAddress; + ? Array.prototype.slice.call(message.contractAddress) + : message.contractAddress; if (message.abi != null && message.hasOwnProperty('abi')) object.abi = $root.protocol.SmartContract.ABI.toObject(message.abi, options); if (message.bytecode != null && message.hasOwnProperty('bytecode')) @@ -28161,8 +28172,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.bytecode, 0, message.bytecode.length) : options.bytes === Array - ? Array.prototype.slice.call(message.bytecode) - : message.bytecode; + ? Array.prototype.slice.call(message.bytecode) + : message.bytecode; if (message.callValue != null && message.hasOwnProperty('callValue')) if (typeof message.callValue === 'number') object.callValue = options.longs === String ? String(message.callValue) : message.callValue; @@ -28171,8 +28182,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.callValue) : options.longs === Number - ? new $util.LongBits(message.callValue.low >>> 0, message.callValue.high >>> 0).toNumber() - : message.callValue; + ? new $util.LongBits(message.callValue.low >>> 0, message.callValue.high >>> 0).toNumber() + : message.callValue; if (message.consumeUserResourcePercent != null && message.hasOwnProperty('consumeUserResourcePercent')) if (typeof message.consumeUserResourcePercent === 'number') object.consumeUserResourcePercent = @@ -28182,11 +28193,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.consumeUserResourcePercent) : options.longs === Number - ? new $util.LongBits( - message.consumeUserResourcePercent.low >>> 0, - message.consumeUserResourcePercent.high >>> 0 - ).toNumber() - : message.consumeUserResourcePercent; + ? new $util.LongBits( + message.consumeUserResourcePercent.low >>> 0, + message.consumeUserResourcePercent.high >>> 0 + ).toNumber() + : message.consumeUserResourcePercent; if (message.name != null && message.hasOwnProperty('name')) object.name = message.name; if (message.originEnergyLimit != null && message.hasOwnProperty('originEnergyLimit')) if (typeof message.originEnergyLimit === 'number') @@ -28197,22 +28208,25 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.originEnergyLimit) : options.longs === Number - ? new $util.LongBits(message.originEnergyLimit.low >>> 0, message.originEnergyLimit.high >>> 0).toNumber() - : message.originEnergyLimit; + ? new $util.LongBits( + message.originEnergyLimit.low >>> 0, + message.originEnergyLimit.high >>> 0 + ).toNumber() + : message.originEnergyLimit; if (message.codeHash != null && message.hasOwnProperty('codeHash')) object.codeHash = options.bytes === String ? $util.base64.encode(message.codeHash, 0, message.codeHash.length) : options.bytes === Array - ? Array.prototype.slice.call(message.codeHash) - : message.codeHash; + ? Array.prototype.slice.call(message.codeHash) + : message.codeHash; if (message.trxHash != null && message.hasOwnProperty('trxHash')) object.trxHash = options.bytes === String ? $util.base64.encode(message.trxHash, 0, message.trxHash.length) : options.bytes === Array - ? Array.prototype.slice.call(message.trxHash) - : message.trxHash; + ? Array.prototype.slice.call(message.trxHash) + : message.trxHash; return object; }; @@ -29443,22 +29457,22 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array - ? Array.prototype.slice.call(message.hash) - : message.hash; + ? Array.prototype.slice.call(message.hash) + : message.hash; if (message.callerAddress != null && message.hasOwnProperty('callerAddress')) object.callerAddress = options.bytes === String ? $util.base64.encode(message.callerAddress, 0, message.callerAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.callerAddress) - : message.callerAddress; + ? Array.prototype.slice.call(message.callerAddress) + : message.callerAddress; if (message.transferToAddress != null && message.hasOwnProperty('transferToAddress')) object.transferToAddress = options.bytes === String ? $util.base64.encode(message.transferToAddress, 0, message.transferToAddress.length) : options.bytes === Array - ? Array.prototype.slice.call(message.transferToAddress) - : message.transferToAddress; + ? Array.prototype.slice.call(message.transferToAddress) + : message.transferToAddress; if (message.callValueInfo && message.callValueInfo.length) { object.callValueInfo = []; for (var j = 0; j < message.callValueInfo.length; ++j) @@ -29472,8 +29486,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.note, 0, message.note.length) : options.bytes === Array - ? Array.prototype.slice.call(message.note) - : message.note; + ? Array.prototype.slice.call(message.note) + : message.note; if (message.rejected != null && message.hasOwnProperty('rejected')) object.rejected = message.rejected; return object; }; @@ -29688,8 +29702,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.callValue) : options.longs === Number - ? new $util.LongBits(message.callValue.low >>> 0, message.callValue.high >>> 0).toNumber() - : message.callValue; + ? new $util.LongBits(message.callValue.low >>> 0, message.callValue.high >>> 0).toNumber() + : message.callValue; if (message.tokenId != null && message.hasOwnProperty('tokenId')) object.tokenId = message.tokenId; return object; }; @@ -29973,8 +29987,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.account, 0, message.account.length) : options.bytes === Array - ? Array.prototype.slice.call(message.account) - : message.account; + ? Array.prototype.slice.call(message.account) + : message.account; if (message.fromAccounts && message.fromAccounts.length) { object.fromAccounts = []; for (var j = 0; j < message.fromAccounts.length; ++j) @@ -29982,8 +29996,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.fromAccounts[j], 0, message.fromAccounts[j].length) : options.bytes === Array - ? Array.prototype.slice.call(message.fromAccounts[j]) - : message.fromAccounts[j]; + ? Array.prototype.slice.call(message.fromAccounts[j]) + : message.fromAccounts[j]; } if (message.toAccounts && message.toAccounts.length) { object.toAccounts = []; @@ -29992,8 +30006,8 @@ $root.protocol = (function () { options.bytes === String ? $util.base64.encode(message.toAccounts[j], 0, message.toAccounts[j].length) : options.bytes === Array - ? Array.prototype.slice.call(message.toAccounts[j]) - : message.toAccounts[j]; + ? Array.prototype.slice.call(message.toAccounts[j]) + : message.toAccounts[j]; } return object; }; @@ -30469,8 +30483,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.beginSyncNum) : options.longs === Number - ? new $util.LongBits(message.beginSyncNum.low >>> 0, message.beginSyncNum.high >>> 0).toNumber() - : message.beginSyncNum; + ? new $util.LongBits(message.beginSyncNum.low >>> 0, message.beginSyncNum.high >>> 0).toNumber() + : message.beginSyncNum; if (message.block != null && message.hasOwnProperty('block')) object.block = message.block; if (message.solidityBlock != null && message.hasOwnProperty('solidityBlock')) object.solidityBlock = message.solidityBlock; @@ -30488,8 +30502,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.totalFlow) : options.longs === Number - ? new $util.LongBits(message.totalFlow.low >>> 0, message.totalFlow.high >>> 0).toNumber() - : message.totalFlow; + ? new $util.LongBits(message.totalFlow.low >>> 0, message.totalFlow.high >>> 0).toNumber() + : message.totalFlow; if (message.peerInfoList && message.peerInfoList.length) { object.peerInfoList = []; for (var j = 0; j < message.peerInfoList.length; ++j) @@ -31257,8 +31271,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.remainNum) : options.longs === Number - ? new $util.LongBits(message.remainNum.low >>> 0, message.remainNum.high >>> 0).toNumber() - : message.remainNum; + ? new $util.LongBits(message.remainNum.low >>> 0, message.remainNum.high >>> 0).toNumber() + : message.remainNum; if (message.lastBlockUpdateTime != null && message.hasOwnProperty('lastBlockUpdateTime')) if (typeof message.lastBlockUpdateTime === 'number') object.lastBlockUpdateTime = @@ -31268,11 +31282,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.lastBlockUpdateTime) : options.longs === Number - ? new $util.LongBits( - message.lastBlockUpdateTime.low >>> 0, - message.lastBlockUpdateTime.high >>> 0 - ).toNumber() - : message.lastBlockUpdateTime; + ? new $util.LongBits( + message.lastBlockUpdateTime.low >>> 0, + message.lastBlockUpdateTime.high >>> 0 + ).toNumber() + : message.lastBlockUpdateTime; if (message.syncFlag != null && message.hasOwnProperty('syncFlag')) object.syncFlag = message.syncFlag; if (message.headBlockTimeWeBothHave != null && message.hasOwnProperty('headBlockTimeWeBothHave')) if (typeof message.headBlockTimeWeBothHave === 'number') @@ -31283,11 +31297,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.headBlockTimeWeBothHave) : options.longs === Number - ? new $util.LongBits( - message.headBlockTimeWeBothHave.low >>> 0, - message.headBlockTimeWeBothHave.high >>> 0 - ).toNumber() - : message.headBlockTimeWeBothHave; + ? new $util.LongBits( + message.headBlockTimeWeBothHave.low >>> 0, + message.headBlockTimeWeBothHave.high >>> 0 + ).toNumber() + : message.headBlockTimeWeBothHave; if (message.needSyncFromPeer != null && message.hasOwnProperty('needSyncFromPeer')) object.needSyncFromPeer = message.needSyncFromPeer; if (message.needSyncFromUs != null && message.hasOwnProperty('needSyncFromUs')) @@ -31303,8 +31317,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.connectTime) : options.longs === Number - ? new $util.LongBits(message.connectTime.low >>> 0, message.connectTime.high >>> 0).toNumber() - : message.connectTime; + ? new $util.LongBits(message.connectTime.low >>> 0, message.connectTime.high >>> 0).toNumber() + : message.connectTime; if (message.avgLatency != null && message.hasOwnProperty('avgLatency')) object.avgLatency = options.json && !isFinite(message.avgLatency) ? String(message.avgLatency) : message.avgLatency; @@ -31319,11 +31333,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.syncToFetchSizePeekNum) : options.longs === Number - ? new $util.LongBits( - message.syncToFetchSizePeekNum.low >>> 0, - message.syncToFetchSizePeekNum.high >>> 0 - ).toNumber() - : message.syncToFetchSizePeekNum; + ? new $util.LongBits( + message.syncToFetchSizePeekNum.low >>> 0, + message.syncToFetchSizePeekNum.high >>> 0 + ).toNumber() + : message.syncToFetchSizePeekNum; if (message.syncBlockRequestedSize != null && message.hasOwnProperty('syncBlockRequestedSize')) object.syncBlockRequestedSize = message.syncBlockRequestedSize; if (message.unFetchSynNum != null && message.hasOwnProperty('unFetchSynNum')) @@ -31334,8 +31348,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.unFetchSynNum) : options.longs === Number - ? new $util.LongBits(message.unFetchSynNum.low >>> 0, message.unFetchSynNum.high >>> 0).toNumber() - : message.unFetchSynNum; + ? new $util.LongBits(message.unFetchSynNum.low >>> 0, message.unFetchSynNum.high >>> 0).toNumber() + : message.unFetchSynNum; if (message.blockInPorcSize != null && message.hasOwnProperty('blockInPorcSize')) object.blockInPorcSize = message.blockInPorcSize; if (message.headBlockWeBothHave != null && message.hasOwnProperty('headBlockWeBothHave')) @@ -31351,8 +31365,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.inFlow) : options.longs === Number - ? new $util.LongBits(message.inFlow.low >>> 0, message.inFlow.high >>> 0).toNumber() - : message.inFlow; + ? new $util.LongBits(message.inFlow.low >>> 0, message.inFlow.high >>> 0).toNumber() + : message.inFlow; if (message.disconnectTimes != null && message.hasOwnProperty('disconnectTimes')) object.disconnectTimes = message.disconnectTimes; if (message.localDisconnectReason != null && message.hasOwnProperty('localDisconnectReason')) @@ -31948,11 +31962,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.allowCreationOfContracts) : options.longs === Number - ? new $util.LongBits( - message.allowCreationOfContracts.low >>> 0, - message.allowCreationOfContracts.high >>> 0 - ).toNumber() - : message.allowCreationOfContracts; + ? new $util.LongBits( + message.allowCreationOfContracts.low >>> 0, + message.allowCreationOfContracts.high >>> 0 + ).toNumber() + : message.allowCreationOfContracts; if (message.allowAdaptiveEnergy != null && message.hasOwnProperty('allowAdaptiveEnergy')) if (typeof message.allowAdaptiveEnergy === 'number') object.allowAdaptiveEnergy = @@ -31962,11 +31976,11 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.allowAdaptiveEnergy) : options.longs === Number - ? new $util.LongBits( - message.allowAdaptiveEnergy.low >>> 0, - message.allowAdaptiveEnergy.high >>> 0 - ).toNumber() - : message.allowAdaptiveEnergy; + ? new $util.LongBits( + message.allowAdaptiveEnergy.low >>> 0, + message.allowAdaptiveEnergy.high >>> 0 + ).toNumber() + : message.allowAdaptiveEnergy; return object; }; @@ -32503,8 +32517,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.totalMemory) : options.longs === Number - ? new $util.LongBits(message.totalMemory.low >>> 0, message.totalMemory.high >>> 0).toNumber() - : message.totalMemory; + ? new $util.LongBits(message.totalMemory.low >>> 0, message.totalMemory.high >>> 0).toNumber() + : message.totalMemory; if (message.freeMemory != null && message.hasOwnProperty('freeMemory')) if (typeof message.freeMemory === 'number') object.freeMemory = options.longs === String ? String(message.freeMemory) : message.freeMemory; @@ -32513,8 +32527,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.freeMemory) : options.longs === Number - ? new $util.LongBits(message.freeMemory.low >>> 0, message.freeMemory.high >>> 0).toNumber() - : message.freeMemory; + ? new $util.LongBits(message.freeMemory.low >>> 0, message.freeMemory.high >>> 0).toNumber() + : message.freeMemory; if (message.cpuRate != null && message.hasOwnProperty('cpuRate')) object.cpuRate = options.json && !isFinite(message.cpuRate) ? String(message.cpuRate) : message.cpuRate; if (message.javaVersion != null && message.hasOwnProperty('javaVersion')) @@ -32529,8 +32543,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.jvmTotalMemoery) : options.longs === Number - ? new $util.LongBits(message.jvmTotalMemoery.low >>> 0, message.jvmTotalMemoery.high >>> 0).toNumber() - : message.jvmTotalMemoery; + ? new $util.LongBits(message.jvmTotalMemoery.low >>> 0, message.jvmTotalMemoery.high >>> 0).toNumber() + : message.jvmTotalMemoery; if (message.jvmFreeMemory != null && message.hasOwnProperty('jvmFreeMemory')) if (typeof message.jvmFreeMemory === 'number') object.jvmFreeMemory = options.longs === String ? String(message.jvmFreeMemory) : message.jvmFreeMemory; @@ -32539,8 +32553,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.jvmFreeMemory) : options.longs === Number - ? new $util.LongBits(message.jvmFreeMemory.low >>> 0, message.jvmFreeMemory.high >>> 0).toNumber() - : message.jvmFreeMemory; + ? new $util.LongBits(message.jvmFreeMemory.low >>> 0, message.jvmFreeMemory.high >>> 0).toNumber() + : message.jvmFreeMemory; if (message.processCpuRate != null && message.hasOwnProperty('processCpuRate')) object.processCpuRate = options.json && !isFinite(message.processCpuRate) ? String(message.processCpuRate) : message.processCpuRate; @@ -32854,8 +32868,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.initSize) : options.longs === Number - ? new $util.LongBits(message.initSize.low >>> 0, message.initSize.high >>> 0).toNumber() - : message.initSize; + ? new $util.LongBits(message.initSize.low >>> 0, message.initSize.high >>> 0).toNumber() + : message.initSize; if (message.useSize != null && message.hasOwnProperty('useSize')) if (typeof message.useSize === 'number') object.useSize = options.longs === String ? String(message.useSize) : message.useSize; @@ -32864,8 +32878,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.useSize) : options.longs === Number - ? new $util.LongBits(message.useSize.low >>> 0, message.useSize.high >>> 0).toNumber() - : message.useSize; + ? new $util.LongBits(message.useSize.low >>> 0, message.useSize.high >>> 0).toNumber() + : message.useSize; if (message.maxSize != null && message.hasOwnProperty('maxSize')) if (typeof message.maxSize === 'number') object.maxSize = options.longs === String ? String(message.maxSize) : message.maxSize; @@ -32874,8 +32888,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.maxSize) : options.longs === Number - ? new $util.LongBits(message.maxSize.low >>> 0, message.maxSize.high >>> 0).toNumber() - : message.maxSize; + ? new $util.LongBits(message.maxSize.low >>> 0, message.maxSize.high >>> 0).toNumber() + : message.maxSize; if (message.useRate != null && message.hasOwnProperty('useRate')) object.useRate = options.json && !isFinite(message.useRate) ? String(message.useRate) : message.useRate; return object; @@ -33204,8 +33218,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.blockTime) : options.longs === Number - ? new $util.LongBits(message.blockTime.low >>> 0, message.blockTime.high >>> 0).toNumber() - : message.blockTime; + ? new $util.LongBits(message.blockTime.low >>> 0, message.blockTime.high >>> 0).toNumber() + : message.blockTime; if (message.waitTime != null && message.hasOwnProperty('waitTime')) if (typeof message.waitTime === 'number') object.waitTime = options.longs === String ? String(message.waitTime) : message.waitTime; @@ -33214,8 +33228,8 @@ $root.protocol = (function () { options.longs === String ? $util.Long.prototype.toString.call(message.waitTime) : options.longs === Number - ? new $util.LongBits(message.waitTime.low >>> 0, message.waitTime.high >>> 0).toNumber() - : message.waitTime; + ? new $util.LongBits(message.waitTime.low >>> 0, message.waitTime.high >>> 0).toNumber() + : message.waitTime; if (message.stackTrace != null && message.hasOwnProperty('stackTrace')) object.stackTrace = message.stackTrace; return object; @@ -33452,8 +33466,8 @@ $root.google = (function () { options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array - ? Array.prototype.slice.call(message.value) - : message.value; + ? Array.prototype.slice.call(message.value) + : message.value; return object; }; diff --git a/modules/sdk-core/src/bitgo/keychain/keychains.ts b/modules/sdk-core/src/bitgo/keychain/keychains.ts index 8c0ff85c03..b08a49539a 100644 --- a/modules/sdk-core/src/bitgo/keychain/keychains.ts +++ b/modules/sdk-core/src/bitgo/keychain/keychains.ts @@ -315,8 +315,8 @@ export class Keychains implements IKeychains { this.baseCoin.getMPCAlgorithm() === 'eddsa' ? EDDSAUtils.default : multisigTypeVersion === 'MPCv2' - ? ECDSAUtils.EcdsaMPCv2Utils - : ECDSAUtils.EcdsaUtils; + ? ECDSAUtils.EcdsaMPCv2Utils + : ECDSAUtils.EcdsaUtils; break; case 'blsdkg': if (_.isUndefined(params.passphrase)) { diff --git a/modules/sdk-core/src/bitgo/utils/postWithCodec.ts b/modules/sdk-core/src/bitgo/utils/postWithCodec.ts index 7a7294c7e2..d8b6279ba0 100644 --- a/modules/sdk-core/src/bitgo/utils/postWithCodec.ts +++ b/modules/sdk-core/src/bitgo/utils/postWithCodec.ts @@ -16,7 +16,7 @@ import { SuperAgent, SuperAgentRequest } from 'superagent'; export function postWithCodec< TAgent extends BitGoBase | SuperAgent, A extends Record, - O extends Record + O extends Record, >( agent: TAgent, url: string, diff --git a/modules/sdk-core/src/bitgo/utils/tss/ecdsa/SMC/utils.ts b/modules/sdk-core/src/bitgo/utils/tss/ecdsa/SMC/utils.ts index abab7eb50f..835105bf8d 100644 --- a/modules/sdk-core/src/bitgo/utils/tss/ecdsa/SMC/utils.ts +++ b/modules/sdk-core/src/bitgo/utils/tss/ecdsa/SMC/utils.ts @@ -21,7 +21,10 @@ import { EcdsaMPCv2KeyGenSendFn, KeyGenSenderForEnterprise } from '../ecdsaMPCv2 export class MPCv2SMCUtils { private MPCv2Utils: EcdsaMPCv2Utils; - constructor(private bitgo: BitGoBase, private baseCoin: IBaseCoin) { + constructor( + private bitgo: BitGoBase, + private baseCoin: IBaseCoin + ) { this.MPCv2Utils = new EcdsaMPCv2Utils(bitgo, baseCoin); } diff --git a/modules/unspents/docs/input-costs.md b/modules/unspents/docs/input-costs.md index 2dfb6af9f8..a0f3838888 100644 --- a/modules/unspents/docs/input-costs.md +++ b/modules/unspents/docs/input-costs.md @@ -1,13 +1,14 @@ # Input Costs + This document contains the worst-case input costs for various script types and spend types. The input costs are calculated using the `Dimensions` class from `@bitgo/unspents`. -| Script Type | Chain Codes | Spend Type | Input Size (Virtual Bytes) | Relative Size (p2trMusig2 = 1.00) | -| --- | --- | --- | --- | --- | -| p2sh | 0/1 | all | 298 | 5.14 | -| p2shP2wsh | 10/11 | all | 140 | 2.41 | -| p2wsh | 20/21 | all | 105 | 1.81 | -| p2tr | 30/31 | Script Path, Level 2 (Backup/User, Backup/BitGo) | 116 | 2.00 | -| p2tr | 30/31 | Script Path, Level 1 (User/BitGo) | 108 | 1.86 | -| p2trMusig2 | 40/41 | Script Path (Backup/User, Backup/BitGo) | 108 | 1.86 | -| p2trMusig2 | 40/41 | Key Path (User/BitGo) | 58 | 1.00 | \ No newline at end of file +| Script Type | Chain Codes | Spend Type | Input Size (Virtual Bytes) | Relative Size (p2trMusig2 = 1.00) | +| ----------- | ----------- | ------------------------------------------------ | -------------------------- | --------------------------------- | +| p2sh | 0/1 | all | 298 | 5.14 | +| p2shP2wsh | 10/11 | all | 140 | 2.41 | +| p2wsh | 20/21 | all | 105 | 1.81 | +| p2tr | 30/31 | Script Path, Level 2 (Backup/User, Backup/BitGo) | 116 | 2.00 | +| p2tr | 30/31 | Script Path, Level 1 (User/BitGo) | 108 | 1.86 | +| p2trMusig2 | 40/41 | Script Path (Backup/User, Backup/BitGo) | 108 | 1.86 | +| p2trMusig2 | 40/41 | Key Path (User/BitGo) | 58 | 1.00 | diff --git a/modules/utxo-bin/README.md b/modules/utxo-bin/README.md index 01d36b8a7c..fbb4257aad 100644 --- a/modules/utxo-bin/README.md +++ b/modules/utxo-bin/README.md @@ -3,7 +3,6 @@ This repository contains a CLI tool for parsing BitGo wallet transactions (withdrawals) and formatting them for terminal output. - # Installation ## npm @@ -75,9 +74,9 @@ utxo-bin -n bitcoin parseTx \ Supported transactions formats are -* full-signed transactions -* half-signed transactions in proprietary bitcoinjs-lib format ("legacy") -* half-signed transactions in PSBT/BIP174 format +- full-signed transactions +- half-signed transactions in proprietary bitcoinjs-lib format ("legacy") +- half-signed transactions in PSBT/BIP174 format Supported encodings are hex and base64. @@ -94,6 +93,7 @@ utxo-bin -n bitcoin parseAddress 3QJmV3qfvL9SuYo34YihAf3sRCW3qSinyC --convert ``` ## Generate addresses + ``` utxo-bin generateAddresses \ --userKey xpub661MyMwAqRbcEvoSo4qrsT5xhByHzUoBjm88hdCPohF1rdQ4TkntuHfccN2N7FbmAmBgmaBxD7VY1QZ43YfgGRLBL37BBkBhYbezgnsPRVP \ diff --git a/modules/utxo-lib/src/bitgo/UtxoPsbt.ts b/modules/utxo-lib/src/bitgo/UtxoPsbt.ts index 22b28b0333..081f2457d3 100644 --- a/modules/utxo-lib/src/bitgo/UtxoPsbt.ts +++ b/modules/utxo-lib/src/bitgo/UtxoPsbt.ts @@ -235,8 +235,8 @@ export class UtxoPsbt = UtxoTransaction { export class UtxoTransactionBuilder< TNumber extends number | bigint = number, - T extends UtxoTransaction = UtxoTransaction + T extends UtxoTransaction = UtxoTransaction, > extends TransactionBuilder { constructor(network: Network, tx?: UtxoTransaction) { super(); diff --git a/modules/utxo-lib/src/bitgo/parseInput.ts b/modules/utxo-lib/src/bitgo/parseInput.ts index 8a499d8c61..55b7183ae0 100644 --- a/modules/utxo-lib/src/bitgo/parseInput.ts +++ b/modules/utxo-lib/src/bitgo/parseInput.ts @@ -635,8 +635,8 @@ export function parsePubScript2Of3( scriptType === 'taprootKeyPathSpend' ? parseTaprootKeyPathPubScript(inputPubScript, scriptType) : scriptType === 'taprootScriptPathSpend' - ? parseTaprootScriptPathPubScript(inputPubScript, scriptType) - : parseP2msPubScript(inputPubScript, scriptType); + ? parseTaprootScriptPathPubScript(inputPubScript, scriptType) + : parseP2msPubScript(inputPubScript, scriptType); if (result instanceof MatchError) { throw new Error(result.message); diff --git a/modules/utxo-lib/src/bitgo/wallet/Psbt.ts b/modules/utxo-lib/src/bitgo/wallet/Psbt.ts index 61fafcc64f..03dbcc3c8c 100644 --- a/modules/utxo-lib/src/bitgo/wallet/Psbt.ts +++ b/modules/utxo-lib/src/bitgo/wallet/Psbt.ts @@ -304,8 +304,8 @@ function parseSignatures( return scriptType === 'taprootKeyPathSpend' ? parseTaprootKeyPathSignatures(input) : scriptType === 'taprootScriptPathSpend' - ? parsePartialOrTapScriptSignatures(input.tapScriptSig) - : parsePartialOrTapScriptSignatures(input.partialSig); + ? parsePartialOrTapScriptSignatures(input.tapScriptSig) + : parsePartialOrTapScriptSignatures(input.partialSig); } function parseScript( @@ -408,8 +408,8 @@ export function toScriptType2Of3s(parsedScriptType: ParsedScriptType2Of3): Scrip return parsedScriptType === 'taprootScriptPathSpend' ? ['p2trMusig2', 'p2tr'] : parsedScriptType === 'taprootKeyPathSpend' - ? ['p2trMusig2'] - : [parsedScriptType]; + ? ['p2trMusig2'] + : [parsedScriptType]; } /** diff --git a/modules/utxo-lib/src/bitgo/wallet/WalletKeys.ts b/modules/utxo-lib/src/bitgo/wallet/WalletKeys.ts index 875750ab78..8d77cf7d0c 100644 --- a/modules/utxo-lib/src/bitgo/wallet/WalletKeys.ts +++ b/modules/utxo-lib/src/bitgo/wallet/WalletKeys.ts @@ -64,7 +64,10 @@ export class DerivedWalletKeys extends WalletKeys { * @param parent - wallet keys to derive from * @param paths - paths to derive with */ - constructor(public parent: RootWalletKeys, public paths: Triple) { + constructor( + public parent: RootWalletKeys, + public paths: Triple + ) { super(parent.triple.map((k, i) => k.derivePath(paths[i])) as Triple); } } diff --git a/modules/utxo-lib/src/bitgo/wallet/psbt/PsbtOutputs.ts b/modules/utxo-lib/src/bitgo/wallet/psbt/PsbtOutputs.ts index 92d34dfd69..ffa013c3b3 100644 --- a/modules/utxo-lib/src/bitgo/wallet/psbt/PsbtOutputs.ts +++ b/modules/utxo-lib/src/bitgo/wallet/psbt/PsbtOutputs.ts @@ -21,8 +21,8 @@ export function deriveKeyPairForOutput(bip32: BIP32Interface, output: PsbtOutput return output.tapBip32Derivation?.length ? UtxoPsbt.deriveKeyPair(bip32, output.tapBip32Derivation, { ignoreY: true }) : output.bip32Derivation?.length - ? UtxoPsbt.deriveKeyPair(bip32, output.bip32Derivation, { ignoreY: false }) - : undefined; + ? UtxoPsbt.deriveKeyPair(bip32, output.bip32Derivation, { ignoreY: false }) + : undefined; } /** diff --git a/modules/utxo-lib/src/bitgo/zcash/ZcashTransaction.ts b/modules/utxo-lib/src/bitgo/zcash/ZcashTransaction.ts index 711677a3f5..50ae6d16b9 100644 --- a/modules/utxo-lib/src/bitgo/zcash/ZcashTransaction.ts +++ b/modules/utxo-lib/src/bitgo/zcash/ZcashTransaction.ts @@ -78,7 +78,11 @@ export class ZcashTransaction extends expiryHeight = 0; consensusBranchId: number; - constructor(public network: ZcashNetwork, tx?: ZcashTransaction, amountType?: 'bigint' | 'number') { + constructor( + public network: ZcashNetwork, + tx?: ZcashTransaction, + amountType?: 'bigint' | 'number' + ) { super(network, tx, amountType); let consensusBranchId; diff --git a/modules/utxo-lib/src/transaction_builder.ts b/modules/utxo-lib/src/transaction_builder.ts index 1cf67d601f..b686811fe7 100644 --- a/modules/utxo-lib/src/transaction_builder.ts +++ b/modules/utxo-lib/src/transaction_builder.ts @@ -163,7 +163,10 @@ export class TransactionBuilder { // WARNING: maximumFeeRate is __NOT__ to be relied on, // it's just another potential safety mechanism (safety in-depth) - constructor(public network: Network = networks.bitcoin, public maximumFeeRate: number = 2500) { + constructor( + public network: Network = networks.bitcoin, + public maximumFeeRate: number = 2500 + ) { this.__PREV_TX_SET = {}; this.__INPUTS = []; this.__TX = new Transaction(); diff --git a/modules/utxo-lib/test/bitgo/psbt/Musig2.ts b/modules/utxo-lib/test/bitgo/psbt/Musig2.ts index f162ed6e6b..7f06c152e1 100644 --- a/modules/utxo-lib/test/bitgo/psbt/Musig2.ts +++ b/modules/utxo-lib/test/bitgo/psbt/Musig2.ts @@ -915,8 +915,8 @@ describe('p2trMusig2', function () { scriptType === 'p2trMusig2' ? psbt.setAllInputsMusig2NonceHD(rootWalletKeys.user) : scriptType === 'p2tr' - ? psbt.signTaprootInputHD(index, rootWalletKeys.user) - : psbt.signInputHD(index, rootWalletKeys.user), + ? psbt.signTaprootInputHD(index, rootWalletKeys.user) + : psbt.signInputHD(index, rootWalletKeys.user), (e: any) => isSegwit(u.chain) && scriptType !== 'p2shP2wsh' ? e.message === `Witness script for input #${index} doesn't match the scriptPubKey in the prevout` diff --git a/modules/utxo-lib/test/bitgo/zcash/hashZip0244.ts b/modules/utxo-lib/test/bitgo/zcash/hashZip0244.ts index d22f324b97..03dde7001e 100644 --- a/modules/utxo-lib/test/bitgo/zcash/hashZip0244.ts +++ b/modules/utxo-lib/test/bitgo/zcash/hashZip0244.ts @@ -15,7 +15,7 @@ type Vector = [ sighash_single: string, sighash_all_anyone: string, sighash_none_anyone: string, - sighash_single_anyone: string + sighash_single_anyone: string, ]; function parseHashType(hashTypeStr: string): number { diff --git a/modules/utxo-lib/test/fixtures_thirdparty/fixtures.ts b/modules/utxo-lib/test/fixtures_thirdparty/fixtures.ts index 33258a4259..7262fae42b 100644 --- a/modules/utxo-lib/test/fixtures_thirdparty/fixtures.ts +++ b/modules/utxo-lib/test/fixtures_thirdparty/fixtures.ts @@ -84,7 +84,7 @@ export type SigHashTestVector = [ script: string, inputIndex: number, hashType: number, - signatureHash: string + signatureHash: string, // BCH and BSV have two extra entries that we don't care abount ]; @@ -94,14 +94,14 @@ export type ZcashSigHashTestVector = [ inputIndex: number, hashType: number, branchId: number, - signatureHash: string + signatureHash: string, ]; export const txValidTestFile = 'tx_valid.json'; export type TxValidVector = [ inputData: [prevoutHash: string, prevoutIndex: string, prevoutScriptPubKey: string][], serializedTransaction: string, - verifyFlags: string + verifyFlags: string, ]; export function testFixture( diff --git a/modules/utxo-lib/test/integration_local_rpc/generate/RpcClient.ts b/modules/utxo-lib/test/integration_local_rpc/generate/RpcClient.ts index 392311516a..dec48c7eb7 100644 --- a/modules/utxo-lib/test/integration_local_rpc/generate/RpcClient.ts +++ b/modules/utxo-lib/test/integration_local_rpc/generate/RpcClient.ts @@ -32,7 +32,11 @@ const BITCOIN_CORE_22_99 = '/Satoshi:22.99.0/'; export class RpcClient { id = 0; - constructor(protected network: Network, protected url: string, protected networkInfo?: NetworkInfo) {} + constructor( + protected network: Network, + protected url: string, + protected networkInfo?: NetworkInfo + ) {} /** * Poor man's Bluebird.map(arr, f, { concurrency }) @@ -198,7 +202,12 @@ export class RpcClient { } export class RpcClientWithWallet extends RpcClient { - constructor(network: Network, url: string, networkInfo: NetworkInfo, private walletName?: string) { + constructor( + network: Network, + url: string, + networkInfo: NetworkInfo, + private walletName?: string + ) { super(network, url, networkInfo); } diff --git a/modules/utxo-ord/src/OrdOutput.ts b/modules/utxo-ord/src/OrdOutput.ts index 81b1be3ca7..0c2da51619 100644 --- a/modules/utxo-ord/src/OrdOutput.ts +++ b/modules/utxo-ord/src/OrdOutput.ts @@ -53,7 +53,11 @@ createOutputs( import { SatRange } from './SatRange'; export class InvalidOrdOutput extends Error { - constructor(message: string, public value: bigint, public ordinals: SatRange[]) { + constructor( + message: string, + public value: bigint, + public ordinals: SatRange[] + ) { super(message); } } @@ -68,7 +72,10 @@ export class OrdOutput { * Required to be ordered and non-overlapping. * Not required to be exhaustive. */ - constructor(public value: bigint, public ordinals: SatRange[] = []) { + constructor( + public value: bigint, + public ordinals: SatRange[] = [] + ) { const maxRange = this.asSatRange(); ordinals.forEach((r, i) => { if (!maxRange.isSupersetOf(r)) { diff --git a/modules/utxo-ord/src/SatRange.ts b/modules/utxo-ord/src/SatRange.ts index 0b2d249f68..f8ae88106a 100644 --- a/modules/utxo-ord/src/SatRange.ts +++ b/modules/utxo-ord/src/SatRange.ts @@ -1,5 +1,9 @@ export class InvalidSatRange extends Error { - constructor(message: string, public start: bigint, public end: bigint) { + constructor( + message: string, + public start: bigint, + public end: bigint + ) { super(message); } } @@ -13,7 +17,10 @@ function toRange(v: bigint | SatRange): SatRange { * Inscriptions have start === end. */ export class SatRange { - constructor(public start: bigint, public end: bigint) { + constructor( + public start: bigint, + public end: bigint + ) { if (start < 0 || end < 0 || end < start) { throw new InvalidSatRange(`Invalid SatRange [${start}, ${end}]`, start, end); } diff --git a/modules/web-demo/cypress/support/component-index.html b/modules/web-demo/cypress/support/component-index.html index ac6e79fd83..faf3b5f43b 100644 --- a/modules/web-demo/cypress/support/component-index.html +++ b/modules/web-demo/cypress/support/component-index.html @@ -1,12 +1,12 @@ - + - - - + + + Components App
- \ No newline at end of file + diff --git a/modules/web-demo/src/index.html b/modules/web-demo/src/index.html index ae2c9a79c3..801903723b 100644 --- a/modules/web-demo/src/index.html +++ b/modules/web-demo/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/package.json b/package.json index 18c07f8959..9de5cfa07f 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.19.1", "eslint-plugin-jsdoc": "^33.0.0", - "eslint-plugin-prettier": "^3.4.0", + "eslint-plugin-prettier": "^5.0.0", "execa": "^5.0.0", "glob": "^7.1.3", "html-webpack-plugin": "^5.5.0", @@ -38,7 +38,7 @@ "nyc": "^15.1.0", "formidable": "3.2.4", "parse-url": "^8.1.0", - "prettier": "^2.3.0", + "prettier": "^3.0.0", "process": "^0.11.10", "rimraf": "^3.0.2", "semver": "^7.3.7", diff --git a/tsconfig.packages.json b/tsconfig.packages.json index add1de9760..ea6a55d95c 100644 --- a/tsconfig.packages.json +++ b/tsconfig.packages.json @@ -40,6 +40,9 @@ { "path": "./modules/sdk-coin-algo" }, + { + "path": "./modules/sdk-coin-apt" + }, { "path": "./modules/sdk-coin-arbeth" }, diff --git a/yarn.lock b/yarn.lock index 6b90db3925..10b3db1232 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3942,6 +3942,11 @@ resolved "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== +"@pkgr/core@^0.1.0": + version "0.1.1" + resolved "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31" + integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA== + "@polkadot-api/json-rpc-provider-proxy@^0.1.0": version "0.1.0" resolved "https://registry.npmjs.org/@polkadot-api/json-rpc-provider-proxy/-/json-rpc-provider-proxy-0.1.0.tgz#6e191f28e7d0fbbe8b540fc51d12a0adaeba297e" @@ -6953,7 +6958,7 @@ bignumber.js@^4.0.0: resolved "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz#db6f14067c140bd46624815a7916c92d9b6c24b1" integrity sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA== -bignumber.js@^9.0.0, bignumber.js@^9.0.1, bignumber.js@^9.0.2, bignumber.js@^9.1.1: +bignumber.js@^9.0.0, bignumber.js@^9.0.1, bignumber.js@^9.0.2, bignumber.js@^9.1.1, bignumber.js@^9.1.2: version "9.1.2" resolved "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c" integrity sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug== @@ -10052,6 +10057,14 @@ eslint-plugin-prettier@^3.4.0: dependencies: prettier-linter-helpers "^1.0.0" +eslint-plugin-prettier@^5.0.0: + version "5.2.1" + resolved "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz#d1c8f972d8f60e414c25465c163d16f209411f95" + integrity sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw== + dependencies: + prettier-linter-helpers "^1.0.0" + synckit "^0.9.1" + eslint-scope@5.1.1, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -16222,10 +16235,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^2.3.0: - version "2.8.8" - resolved "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" - integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== +prettier@^3.0.0: + version "3.3.3" + resolved "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105" + integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew== pretty-bytes@^5.6.0: version "5.6.0" @@ -18618,6 +18631,14 @@ symbol-observable@^2.0.3: resolved "https://registry.npmjs.org/symbol-observable/-/symbol-observable-2.0.3.tgz#5b521d3d07a43c351055fa43b8355b62d33fd16a" integrity sha512-sQV7phh2WCYAn81oAkakC5qjq2Ml0g8ozqz03wOGnx9dDlG1de6yrF+0RAzSJD8fPUow3PTSMf2SAbOGxb93BA== +synckit@^0.9.1: + version "0.9.2" + resolved "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz#a3a935eca7922d48b9e7d6c61822ee6c3ae4ec62" + integrity sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw== + dependencies: + "@pkgr/core" "^0.1.0" + tslib "^2.6.2" + syntax-error@^1.1.1: version "1.4.0" resolved "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz#2d9d4ff5c064acb711594a3e3b95054ad51d907c"