@ledgerhq/live-common 21.36.3 → 22.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -3
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.pickingStrategies.integration.test.js +5 -5
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.pickingStrategies.integration.test.js.map +1 -1
- package/lib/__tests__/test-helpers/bridge.d.ts.map +1 -1
- package/lib/__tests__/test-helpers/bridge.js +11 -9
- package/lib/__tests__/test-helpers/bridge.js.map +1 -1
- package/lib/__tests__/test-helpers/libcore-setup.d.ts.map +1 -1
- package/lib/__tests__/test-helpers/libcore-setup.js +0 -6
- package/lib/__tests__/test-helpers/libcore-setup.js.map +1 -1
- package/lib/__tests__/test-helpers/libcore-setup.native.d.ts +0 -1
- package/lib/__tests__/test-helpers/libcore-setup.native.d.ts.map +1 -1
- package/lib/__tests__/test-helpers/libcore-setup.native.js +0 -1
- package/lib/__tests__/test-helpers/libcore-setup.native.js.map +1 -1
- package/lib/__tests__/test-helpers/setup.js +2 -1
- package/lib/__tests__/test-helpers/setup.js.map +1 -1
- package/lib/account/formatters.d.ts.map +1 -1
- package/lib/account/formatters.js +22 -7
- package/lib/account/formatters.js.map +1 -1
- package/lib/account/pending.d.ts +2 -1
- package/lib/account/pending.d.ts.map +1 -1
- package/lib/account/serialization.d.ts +6 -4
- package/lib/account/serialization.d.ts.map +1 -1
- package/lib/account/serialization.js +22 -7
- package/lib/account/serialization.js.map +1 -1
- package/lib/account/support.d.ts +0 -2
- package/lib/account/support.d.ts.map +1 -1
- package/lib/account/support.js +1 -22
- package/lib/account/support.js.map +1 -1
- package/lib/api/Ethereum.d.ts +6 -2
- package/lib/api/Ethereum.d.ts.map +1 -1
- package/lib/api/Ethereum.js +19 -3
- package/lib/api/Ethereum.js.map +1 -1
- package/lib/api/Ledger.d.ts.map +1 -1
- package/lib/api/Ledger.js +0 -9
- package/lib/api/Ledger.js.map +1 -1
- package/lib/api/explorerConfig/index.d.ts.map +1 -1
- package/lib/api/explorerConfig/index.js +7 -0
- package/lib/api/explorerConfig/index.js.map +1 -1
- package/lib/appSupportsQuitApp.d.ts +1 -0
- package/lib/appSupportsQuitApp.d.ts.map +1 -1
- package/lib/appSupportsQuitApp.js +1 -0
- package/lib/appSupportsQuitApp.js.map +1 -1
- package/lib/apps/support.d.ts.map +1 -1
- package/lib/apps/support.js +2 -1
- package/lib/apps/support.js.map +1 -1
- package/lib/bot/index.d.ts.map +1 -1
- package/lib/bot/index.js +16 -23
- package/lib/bot/index.js.map +1 -1
- package/lib/bridge/impl.d.ts.map +1 -1
- package/lib/bridge/impl.js +3 -13
- package/lib/bridge/impl.js.map +1 -1
- package/lib/bridge/jsHelpers.d.ts +2 -2
- package/lib/bridge/jsHelpers.d.ts.map +1 -1
- package/lib/bridge/jsHelpers.js.map +1 -1
- package/lib/cross.d.ts.map +1 -1
- package/lib/cross.js +6 -7
- package/lib/cross.js.map +1 -1
- package/lib/derivation.d.ts +0 -39
- package/lib/derivation.d.ts.map +1 -1
- package/lib/derivation.js +5 -86
- package/lib/derivation.js.map +1 -1
- package/lib/env.d.ts +15 -25
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +12 -23
- package/lib/env.js.map +1 -1
- package/lib/env.react.d.ts +1 -1
- package/lib/env.react.d.ts.map +1 -1
- package/lib/families/algorand/types.d.ts +0 -78
- package/lib/families/algorand/types.d.ts.map +1 -1
- package/lib/families/algorand/types.js +1 -154
- package/lib/families/algorand/types.js.map +1 -1
- package/lib/families/bitcoin/account.d.ts.map +1 -1
- package/lib/families/bitcoin/account.js +0 -1
- package/lib/families/bitcoin/account.js.map +1 -1
- package/lib/families/bitcoin/bridge.test.d.ts +2 -0
- package/lib/families/bitcoin/bridge.test.d.ts.map +1 -0
- package/lib/families/bitcoin/bridge.test.js +11 -0
- package/lib/families/bitcoin/bridge.test.js.map +1 -0
- package/lib/families/bitcoin/js-signOperation.d.ts.map +1 -1
- package/lib/families/bitcoin/js-signOperation.js.map +1 -1
- package/lib/families/bitcoin/js-synchronisation.d.ts.map +1 -1
- package/lib/families/bitcoin/js-synchronisation.js +6 -7
- package/lib/families/bitcoin/js-synchronisation.js.map +1 -1
- package/lib/families/bitcoin/logic.d.ts +2 -5
- package/lib/families/bitcoin/logic.d.ts.map +1 -1
- package/lib/families/bitcoin/logic.js +4 -123
- package/lib/families/bitcoin/logic.js.map +1 -1
- package/lib/families/bitcoin/networks.js +1 -1
- package/lib/families/bitcoin/networks.js.map +1 -1
- package/lib/families/bitcoin/serialization.d.ts +2 -2
- package/lib/families/bitcoin/serialization.d.ts.map +1 -1
- package/lib/families/bitcoin/serialization.js +2 -4
- package/lib/families/bitcoin/serialization.js.map +1 -1
- package/lib/families/bitcoin/specs.d.ts.map +1 -1
- package/lib/families/bitcoin/specs.js +8 -7
- package/lib/families/bitcoin/specs.js.map +1 -1
- package/lib/families/bitcoin/transaction.d.ts +1 -26
- package/lib/families/bitcoin/transaction.d.ts.map +1 -1
- package/lib/families/bitcoin/transaction.js +1 -239
- package/lib/families/bitcoin/transaction.js.map +1 -1
- package/lib/families/bitcoin/types.d.ts +0 -82
- package/lib/families/bitcoin/types.d.ts.map +1 -1
- package/lib/families/bitcoin/types.js +1 -118
- package/lib/families/bitcoin/types.js.map +1 -1
- package/lib/families/bitcoin/wallet-btc/explorer/index.d.ts.map +1 -1
- package/lib/families/bitcoin/wallet-btc/explorer/index.js +12 -5
- package/lib/families/bitcoin/wallet-btc/explorer/index.js.map +1 -1
- package/lib/families/bitcoin/wallet-btc/storage/index.d.ts +1 -1
- package/lib/families/bitcoin/wallet-btc/storage/index.d.ts.map +1 -1
- package/lib/families/bitcoin/wallet-btc/storage/index.js +6 -7
- package/lib/families/bitcoin/wallet-btc/storage/index.js.map +1 -1
- package/lib/families/bitcoin/wallet-btc/storage/types.d.ts +2 -2
- package/lib/families/bitcoin/wallet-btc/storage/types.d.ts.map +1 -1
- package/lib/families/bitcoin/wallet-btc/utils.js +1 -1
- package/lib/families/bitcoin/wallet-btc/utils.js.map +1 -1
- package/lib/families/celo/js-getTransactionStatus.d.ts.map +1 -1
- package/lib/families/celo/js-getTransactionStatus.js +2 -0
- package/lib/families/celo/js-getTransactionStatus.js.map +1 -1
- package/lib/families/celo/types.d.ts +0 -5
- package/lib/families/celo/types.d.ts.map +1 -1
- package/lib/families/celo/types.js +0 -3
- package/lib/families/celo/types.js.map +1 -1
- package/lib/families/cosmos/api/Cosmos.js +1 -1
- package/lib/families/cosmos/api/Cosmos.js.map +1 -1
- package/lib/families/cosmos/bridge.test.d.ts +2 -0
- package/lib/families/cosmos/bridge.test.d.ts.map +1 -0
- package/lib/families/cosmos/bridge.test.js +11 -0
- package/lib/families/cosmos/bridge.test.js.map +1 -0
- package/lib/families/cosmos/js-signOperation.d.ts.map +1 -1
- package/lib/families/cosmos/js-signOperation.js.map +1 -1
- package/lib/families/cosmos/js-synchronisation.d.ts.map +1 -1
- package/lib/families/cosmos/js-synchronisation.js +2 -1
- package/lib/families/cosmos/js-synchronisation.js.map +1 -1
- package/lib/families/cosmos/logic.d.ts +0 -9
- package/lib/families/cosmos/logic.d.ts.map +1 -1
- package/lib/families/cosmos/logic.js +5 -20
- package/lib/families/cosmos/logic.js.map +1 -1
- package/lib/families/cosmos/types.d.ts +0 -190
- package/lib/families/cosmos/types.d.ts.map +1 -1
- package/lib/families/cosmos/types.js +0 -370
- package/lib/families/cosmos/types.js.map +1 -1
- package/lib/families/crypto_org/js-buildTransaction.js +1 -1
- package/lib/families/crypto_org/js-buildTransaction.js.map +1 -1
- package/lib/families/crypto_org/js-signOperation.d.ts.map +1 -1
- package/lib/families/crypto_org/js-signOperation.js +3 -4
- package/lib/families/crypto_org/js-signOperation.js.map +1 -1
- package/lib/families/crypto_org/types.d.ts +0 -5
- package/lib/families/crypto_org/types.d.ts.map +1 -1
- package/lib/families/crypto_org/types.js +0 -3
- package/lib/families/crypto_org/types.js.map +1 -1
- package/lib/families/elrond/types.d.ts +1 -6
- package/lib/families/elrond/types.d.ts.map +1 -1
- package/lib/families/elrond/types.js +0 -3
- package/lib/families/elrond/types.js.map +1 -1
- package/lib/families/ethereum/bridge/js.d.ts.map +1 -1
- package/lib/families/ethereum/bridge/js.js +6 -1
- package/lib/families/ethereum/bridge/js.js.map +1 -1
- package/lib/families/ethereum/bridge.test.d.ts +2 -0
- package/lib/families/ethereum/bridge.test.d.ts.map +1 -0
- package/lib/families/ethereum/bridge.test.js +11 -0
- package/lib/families/ethereum/bridge.test.js.map +1 -0
- package/lib/families/ethereum/modules/erc1155.js +9 -9
- package/lib/families/ethereum/modules/erc1155.js.map +1 -1
- package/lib/families/ethereum/modules/erc721.d.ts.map +1 -1
- package/lib/families/ethereum/modules/erc721.js +12 -16
- package/lib/families/ethereum/modules/erc721.js.map +1 -1
- package/lib/families/ethereum/nft.unit.test.d.ts +2 -0
- package/lib/families/ethereum/nft.unit.test.d.ts.map +1 -0
- package/lib/families/ethereum/{nft.merging.unit.test.js → nft.unit.test.js} +61 -6
- package/lib/families/ethereum/nft.unit.test.js.map +1 -0
- package/lib/families/ethereum/nftResolvers.d.ts +19 -0
- package/lib/families/ethereum/nftResolvers.d.ts.map +1 -0
- package/lib/families/ethereum/nftResolvers.js +121 -0
- package/lib/families/ethereum/nftResolvers.js.map +1 -0
- package/lib/families/ethereum/synchronisation.js +2 -2
- package/lib/families/ethereum/synchronisation.js.map +1 -1
- package/lib/families/ethereum/types.d.ts +0 -5
- package/lib/families/ethereum/types.d.ts.map +1 -1
- package/lib/families/ethereum/types.js +0 -3
- package/lib/families/ethereum/types.js.map +1 -1
- package/lib/families/filecoin/types.d.ts +0 -5
- package/lib/families/filecoin/types.d.ts.map +1 -1
- package/lib/families/filecoin/types.js +0 -3
- package/lib/families/filecoin/types.js.map +1 -1
- package/lib/families/neo/types.d.ts +0 -5
- package/lib/families/neo/types.d.ts.map +1 -1
- package/lib/families/neo/types.js +0 -3
- package/lib/families/neo/types.js.map +1 -1
- package/lib/families/polkadot/bridge.test.d.ts +2 -0
- package/lib/families/polkadot/bridge.test.d.ts.map +1 -0
- package/lib/families/polkadot/bridge.test.js +145 -0
- package/lib/families/polkadot/bridge.test.js.map +1 -0
- package/lib/families/polkadot/types.d.ts +0 -5
- package/lib/families/polkadot/types.d.ts.map +1 -1
- package/lib/families/polkadot/types.js +0 -3
- package/lib/families/polkadot/types.js.map +1 -1
- package/lib/families/ripple/bridge.test.d.ts +2 -0
- package/lib/families/ripple/bridge.test.d.ts.map +1 -0
- package/lib/{libcore/buildAccount/buildSubAccounts.js → families/ripple/bridge.test.js} +17 -20
- package/lib/families/ripple/bridge.test.js.map +1 -0
- package/lib/families/ripple/types.d.ts +0 -59
- package/lib/families/ripple/types.d.ts.map +1 -1
- package/lib/families/ripple/types.js +0 -87
- package/lib/families/ripple/types.js.map +1 -1
- package/lib/families/solana/api/cached.d.ts.map +1 -1
- package/lib/families/solana/api/cached.js +10 -0
- package/lib/families/solana/api/cached.js.map +1 -1
- package/lib/families/solana/api/chain/account/index.d.ts +1 -1
- package/lib/families/solana/api/chain/account/index.d.ts.map +1 -1
- package/lib/families/solana/api/chain/account/index.js +2 -1
- package/lib/families/solana/api/chain/account/index.js.map +1 -1
- package/lib/families/solana/api/chain/account/parser.d.ts +5 -0
- package/lib/families/solana/api/chain/account/parser.d.ts.map +1 -1
- package/lib/families/solana/api/chain/account/parser.js +24 -1
- package/lib/families/solana/api/chain/account/parser.js.map +1 -1
- package/lib/families/solana/api/chain/account/stake.d.ts +5 -5
- package/lib/families/solana/api/chain/account/token.d.ts +5 -5
- package/lib/families/solana/api/chain/account/vote.d.ts +252 -0
- package/lib/families/solana/api/chain/account/vote.d.ts.map +1 -0
- package/lib/families/solana/api/chain/account/vote.js +44 -0
- package/lib/families/solana/api/chain/account/vote.js.map +1 -0
- package/lib/families/solana/api/chain/index.d.ts +7 -0
- package/lib/families/solana/api/chain/index.d.ts.map +1 -1
- package/lib/families/solana/api/chain/index.js +35 -0
- package/lib/families/solana/api/chain/index.js.map +1 -1
- package/lib/families/solana/api/chain/instruction/stake/types.d.ts +7 -7
- package/lib/families/solana/api/chain/instruction/system/index.d.ts +15 -0
- package/lib/families/solana/api/chain/instruction/system/index.d.ts.map +1 -0
- package/lib/families/solana/api/chain/instruction/system/index.js +20 -0
- package/lib/families/solana/api/chain/instruction/system/index.js.map +1 -0
- package/lib/families/solana/api/chain/instruction/system/types.d.ts +298 -0
- package/lib/families/solana/api/chain/instruction/system/types.d.ts.map +1 -0
- package/lib/families/solana/api/chain/instruction/system/types.js +117 -0
- package/lib/families/solana/api/chain/instruction/system/types.js.map +1 -0
- package/lib/families/solana/api/chain/program/parser.d.ts +5 -0
- package/lib/families/solana/api/chain/program/parser.d.ts.map +1 -1
- package/lib/families/solana/api/chain/program/parser.js +7 -0
- package/lib/families/solana/api/chain/program/parser.js.map +1 -1
- package/lib/families/solana/api/chain/web3.d.ts +20 -1
- package/lib/families/solana/api/chain/web3.d.ts.map +1 -1
- package/lib/families/solana/api/chain/web3.js +122 -1
- package/lib/families/solana/api/chain/web3.js.map +1 -1
- package/lib/families/solana/api/logged.d.ts.map +1 -1
- package/lib/families/solana/api/logged.js +5 -0
- package/lib/families/solana/api/logged.js.map +1 -1
- package/lib/families/solana/bridge/bridge.d.ts.map +1 -1
- package/lib/families/solana/bridge/bridge.js +16 -7
- package/lib/families/solana/bridge/bridge.js.map +1 -1
- package/lib/families/solana/bridge/mock-data.d.ts +116 -11
- package/lib/families/solana/bridge/mock-data.d.ts.map +1 -1
- package/lib/families/solana/bridge/mock-data.js +19 -493
- package/lib/families/solana/bridge/mock-data.js.map +1 -1
- package/lib/families/solana/bridge/mock.d.ts.map +1 -1
- package/lib/families/solana/bridge/mock.js +1 -0
- package/lib/families/solana/bridge/mock.js.map +1 -1
- package/lib/families/solana/bridge.test.d.ts +2 -0
- package/lib/families/solana/bridge.test.d.ts.map +1 -0
- package/lib/families/solana/bridge.test.js +11 -0
- package/lib/families/solana/bridge.test.js.map +1 -0
- package/lib/families/solana/cli-transaction.d.ts +5 -1
- package/lib/families/solana/cli-transaction.d.ts.map +1 -1
- package/lib/families/solana/cli-transaction.js +72 -4
- package/lib/families/solana/cli-transaction.js.map +1 -1
- package/lib/families/solana/deviceTransactionConfig.d.ts +3 -3
- package/lib/families/solana/deviceTransactionConfig.d.ts.map +1 -1
- package/lib/families/solana/deviceTransactionConfig.js +128 -20
- package/lib/families/solana/deviceTransactionConfig.js.map +1 -1
- package/lib/families/solana/errors.d.ts +30 -0
- package/lib/families/solana/errors.d.ts.map +1 -1
- package/lib/families/solana/errors.js +11 -1
- package/lib/families/solana/errors.js.map +1 -1
- package/lib/families/solana/js-buildTransaction.d.ts.map +1 -1
- package/lib/families/solana/js-buildTransaction.js +13 -7
- package/lib/families/solana/js-buildTransaction.js.map +1 -1
- package/lib/families/solana/js-estimateMaxSpendable.d.ts.map +1 -1
- package/lib/families/solana/js-estimateMaxSpendable.js +26 -17
- package/lib/families/solana/js-estimateMaxSpendable.js.map +1 -1
- package/lib/families/solana/js-getTransactionStatus.d.ts +1 -1
- package/lib/families/solana/js-getTransactionStatus.d.ts.map +1 -1
- package/lib/families/solana/js-getTransactionStatus.js +36 -79
- package/lib/families/solana/js-getTransactionStatus.js.map +1 -1
- package/lib/families/solana/js-preload-data.d.ts +7 -0
- package/lib/families/solana/js-preload-data.d.ts.map +1 -0
- package/lib/families/solana/js-preload-data.js +45 -0
- package/lib/families/solana/js-preload-data.js.map +1 -0
- package/lib/families/solana/js-preload.d.ts +6 -0
- package/lib/families/solana/js-preload.d.ts.map +1 -0
- package/lib/{libcore/buildBigNumber.js → families/solana/js-preload.js} +60 -28
- package/lib/families/solana/js-preload.js.map +1 -0
- package/lib/families/solana/js-prepareTransaction.d.ts.map +1 -1
- package/lib/families/solana/js-prepareTransaction.js +453 -142
- package/lib/families/solana/js-prepareTransaction.js.map +1 -1
- package/lib/families/solana/js-signOperation.d.ts.map +1 -1
- package/lib/families/solana/js-signOperation.js +90 -68
- package/lib/families/solana/js-signOperation.js.map +1 -1
- package/lib/families/solana/js-synchronization.d.ts.map +1 -1
- package/lib/families/solana/js-synchronization.js +159 -57
- package/lib/families/solana/js-synchronization.js.map +1 -1
- package/lib/families/solana/logic.d.ts +16 -0
- package/lib/families/solana/logic.d.ts.map +1 -1
- package/lib/families/solana/logic.js +59 -1
- package/lib/families/solana/logic.js.map +1 -1
- package/lib/families/solana/react.d.ts +7 -0
- package/lib/families/solana/react.d.ts.map +1 -0
- package/lib/families/solana/react.js +56 -0
- package/lib/families/solana/react.js.map +1 -0
- package/lib/families/solana/serialization.d.ts +4 -0
- package/lib/families/solana/serialization.d.ts.map +1 -0
- package/lib/families/solana/serialization.js +16 -0
- package/lib/families/solana/serialization.js.map +1 -0
- package/lib/families/solana/specs.d.ts.map +1 -1
- package/lib/families/solana/specs.js +320 -0
- package/lib/families/solana/specs.js.map +1 -1
- package/lib/families/solana/speculos-deviceActions.d.ts +5 -0
- package/lib/families/solana/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/solana/speculos-deviceActions.js +189 -14
- package/lib/families/solana/speculos-deviceActions.js.map +1 -1
- package/lib/families/solana/test-dataset.d.ts +18 -0
- package/lib/families/solana/test-dataset.d.ts.map +1 -1
- package/lib/families/solana/test-dataset.js +694 -202
- package/lib/families/solana/test-dataset.js.map +1 -1
- package/lib/families/solana/test-specifics.d.ts +9 -0
- package/lib/families/solana/test-specifics.d.ts.map +1 -0
- package/lib/families/solana/test-specifics.js +238 -0
- package/lib/families/solana/test-specifics.js.map +1 -0
- package/lib/families/solana/transaction.d.ts.map +1 -1
- package/lib/families/solana/transaction.js +69 -13
- package/lib/families/solana/transaction.js.map +1 -1
- package/lib/families/solana/types.d.ts +129 -21
- package/lib/families/solana/types.d.ts.map +1 -1
- package/lib/families/solana/types.js +0 -3
- package/lib/families/solana/types.js.map +1 -1
- package/lib/families/solana/utils.d.ts +6 -0
- package/lib/families/solana/utils.d.ts.map +1 -1
- package/lib/families/solana/utils.js +76 -4
- package/lib/families/solana/utils.js.map +1 -1
- package/lib/families/solana/validator-app/index.d.ts +22 -0
- package/lib/families/solana/validator-app/index.d.ts.map +1 -0
- package/lib/families/{algorand/libcore-getFeesForTransaction.js → solana/validator-app/index.js} +45 -28
- package/lib/families/solana/validator-app/index.js.map +1 -0
- package/lib/families/stellar/api/horizon.d.ts +2 -1
- package/lib/families/stellar/api/horizon.d.ts.map +1 -1
- package/lib/families/stellar/api/horizon.js.map +1 -1
- package/lib/families/stellar/bridge.test.d.ts +2 -0
- package/lib/families/stellar/bridge.test.d.ts.map +1 -0
- package/lib/families/stellar/bridge.test.js +11 -0
- package/lib/families/stellar/bridge.test.js.map +1 -0
- package/lib/families/stellar/test-dataset.d.ts.map +1 -1
- package/lib/families/stellar/test-dataset.js +2 -4
- package/lib/families/stellar/test-dataset.js.map +1 -1
- package/lib/families/stellar/types.d.ts +0 -5
- package/lib/families/stellar/types.d.ts.map +1 -1
- package/lib/families/stellar/types.js +1 -3
- package/lib/families/stellar/types.js.map +1 -1
- package/lib/families/tezos/bridge/js.d.ts.map +1 -1
- package/lib/families/tezos/bridge/js.js +16 -3
- package/lib/families/tezos/bridge/js.js.map +1 -1
- package/lib/families/tezos/bridge.test.d.ts +2 -0
- package/lib/families/tezos/bridge.test.d.ts.map +1 -0
- package/lib/families/tezos/{test-specifics.js → bridge.test.js} +36 -33
- package/lib/families/tezos/bridge.test.js.map +1 -0
- package/lib/families/tezos/types.d.ts +0 -86
- package/lib/families/tezos/types.d.ts.map +1 -1
- package/lib/families/tezos/types.js +0 -138
- package/lib/families/tezos/types.js.map +1 -1
- package/lib/families/tron/types.d.ts +0 -6
- package/lib/families/tron/types.d.ts.map +1 -1
- package/lib/families/tron/types.js +0 -4
- package/lib/families/tron/types.js.map +1 -1
- package/lib/generated/cli-transaction.d.ts +5 -1
- package/lib/generated/cli-transaction.d.ts.map +1 -1
- package/lib/generated/customAddressValidation.d.ts +1 -10
- package/lib/generated/customAddressValidation.d.ts.map +1 -1
- package/lib/generated/customAddressValidation.js +1 -9
- package/lib/generated/customAddressValidation.js.map +1 -1
- package/lib/generated/speculos-deviceActions.d.ts +1 -0
- package/lib/generated/speculos-deviceActions.d.ts.map +1 -1
- package/lib/generated/types.d.ts +0 -92
- package/lib/generated/types.d.ts.map +1 -1
- package/lib/generated/types.js +0 -34
- package/lib/generated/types.js.map +1 -1
- package/lib/mock/account.d.ts.map +1 -1
- package/lib/mock/account.js +7 -1
- package/lib/mock/account.js.map +1 -1
- package/lib/nft/NftMetadataProvider/index.d.ts +9 -8
- package/lib/nft/NftMetadataProvider/index.d.ts.map +1 -1
- package/lib/nft/NftMetadataProvider/index.js +135 -69
- package/lib/nft/NftMetadataProvider/index.js.map +1 -1
- package/lib/nft/NftMetadataProvider/types.d.ts +13 -7
- package/lib/nft/NftMetadataProvider/types.d.ts.map +1 -1
- package/lib/nft/helpers.d.ts +24 -8
- package/lib/nft/helpers.d.ts.map +1 -1
- package/lib/nft/helpers.js +125 -40
- package/lib/nft/helpers.js.map +1 -1
- package/lib/nft/nftId.d.ts +7 -2
- package/lib/nft/nftId.d.ts.map +1 -1
- package/lib/nft/nftId.js +5 -4
- package/lib/nft/nftId.js.map +1 -1
- package/lib/nft/support.d.ts +2 -1
- package/lib/nft/support.d.ts.map +1 -1
- package/lib/nft/support.js +39 -1
- package/lib/nft/support.js.map +1 -1
- package/lib/reconciliation.d.ts.map +1 -1
- package/lib/reconciliation.js +8 -5
- package/lib/reconciliation.js.map +1 -1
- package/lib/types/account.d.ts +7 -3
- package/lib/types/account.d.ts.map +1 -1
- package/lib/types/bridge.d.ts +16 -1
- package/lib/types/bridge.d.ts.map +1 -1
- package/lib/types/nft.d.ts +28 -6
- package/lib/types/nft.d.ts.map +1 -1
- package/lib/walletconnect/index.d.ts.map +1 -1
- package/lib/walletconnect/index.js +7 -6
- package/lib/walletconnect/index.js.map +1 -1
- package/package.json +3 -4
- package/src/.DS_Store +0 -0
- package/src/{data/flags → __tests__}/.DS_Store +0 -0
- package/src/__tests__/families/bitcoin/wallet-btc/xpub.pickingStrategies.integration.test.ts +5 -5
- package/src/__tests__/test-helpers/bridge.ts +11 -7
- package/src/__tests__/test-helpers/libcore-setup.native.ts +0 -1
- package/src/__tests__/test-helpers/libcore-setup.ts +1 -7
- package/src/__tests__/test-helpers/setup.ts +2 -1
- package/src/account/formatters.ts +6 -8
- package/src/account/serialization.ts +46 -6
- package/src/account/support.ts +2 -19
- package/src/api/Ethereum.ts +36 -6
- package/src/api/Ledger.ts +1 -12
- package/src/api/explorerConfig/index.ts +8 -0
- package/src/appSupportsQuitApp.ts +1 -0
- package/src/apps/support.ts +1 -0
- package/src/bot/index.ts +1 -6
- package/src/bridge/impl.ts +5 -17
- package/src/bridge/jsHelpers.ts +6 -3
- package/src/cross.ts +2 -4
- package/src/currencies/__snapshots__/sortByMarketcap.test.ts.snap +6290 -0
- package/src/derivation.ts +1 -85
- package/src/env.ts +12 -23
- package/src/families/algorand/types.ts +2 -255
- package/src/{__tests__/__snapshots__/all.libcore.ts.snap → families/bitcoin/__snapshots__/bridge.test.ts.snap} +7085 -14082
- package/src/families/bitcoin/account.ts +0 -1
- package/src/families/bitcoin/bridge.test.ts +6 -0
- package/src/families/bitcoin/js-signOperation.ts +0 -5
- package/src/families/bitcoin/js-synchronisation.ts +5 -6
- package/src/families/bitcoin/logic.ts +2 -77
- package/src/families/bitcoin/networks.ts +1 -1
- package/src/families/bitcoin/serialization.ts +0 -4
- package/src/families/bitcoin/specs.ts +14 -7
- package/src/families/bitcoin/transaction.ts +0 -191
- package/src/families/bitcoin/types.ts +0 -225
- package/src/families/bitcoin/wallet-btc/explorer/index.ts +23 -23
- package/src/families/bitcoin/wallet-btc/storage/index.ts +6 -9
- package/src/families/bitcoin/wallet-btc/storage/types.ts +2 -2
- package/src/families/bitcoin/wallet-btc/utils.ts +1 -1
- package/src/families/celo/js-getTransactionStatus.ts +3 -1
- package/src/families/celo/types.ts +0 -6
- package/src/families/cosmos/__snapshots__/bridge.test.ts.snap +1156 -0
- package/src/families/cosmos/api/Cosmos.ts +1 -1
- package/src/families/cosmos/bridge.test.ts +6 -0
- package/src/families/cosmos/js-signOperation.ts +8 -0
- package/src/families/cosmos/js-synchronisation.ts +3 -1
- package/src/families/cosmos/logic.ts +4 -37
- package/src/families/cosmos/types.ts +1 -619
- package/src/families/crypto_org/js-buildTransaction.ts +1 -1
- package/src/families/crypto_org/js-signOperation.ts +2 -3
- package/src/families/crypto_org/types.ts +1 -5
- package/src/families/elrond/types.ts +2 -6
- package/src/families/ethereum/__snapshots__/bridge.test.ts.snap +3263 -0
- package/src/families/ethereum/bridge/js.ts +5 -0
- package/src/families/ethereum/bridge.test.ts +6 -0
- package/src/families/ethereum/modules/erc1155.ts +9 -9
- package/src/families/ethereum/modules/erc721.ts +11 -11
- package/src/families/ethereum/nft.unit.test.ts +147 -0
- package/src/families/ethereum/nftResolvers.ts +79 -0
- package/src/families/ethereum/synchronisation.ts +7 -2
- package/src/families/ethereum/types.ts +1 -6
- package/src/families/filecoin/types.ts +0 -6
- package/src/families/neo/types.ts +1 -5
- package/src/families/polkadot/bridge.test.ts +81 -0
- package/src/families/polkadot/types.ts +1 -5
- package/src/families/ripple/bridge.test.ts +12 -0
- package/src/families/ripple/types.ts +0 -143
- package/src/families/solana/__snapshots__/bridge.test.ts.snap +116 -0
- package/src/families/solana/api/cached.ts +40 -0
- package/src/families/solana/api/chain/account/index.ts +5 -1
- package/src/families/solana/api/chain/account/parser.ts +28 -0
- package/src/families/solana/api/chain/account/vote.ts +63 -0
- package/src/families/solana/api/chain/index.ts +63 -0
- package/src/families/solana/api/chain/instruction/system/index.ts +30 -0
- package/src/families/solana/api/chain/instruction/system/types.ts +141 -0
- package/src/families/solana/api/chain/program/parser.ts +18 -0
- package/src/families/solana/api/chain/web3.ts +173 -1
- package/src/families/solana/api/logged.ts +5 -0
- package/src/families/solana/bridge/bridge.ts +27 -4
- package/src/families/solana/bridge/mock-data.ts +19 -588
- package/src/families/solana/bridge/mock.ts +1 -0
- package/src/families/solana/bridge.test.ts +6 -0
- package/src/families/solana/cli-transaction.ts +87 -3
- package/src/families/solana/deviceTransactionConfig.ts +180 -24
- package/src/families/solana/errors.ts +40 -0
- package/src/families/solana/js-buildTransaction.ts +19 -8
- package/src/families/solana/js-estimateMaxSpendable.ts +20 -7
- package/src/families/solana/js-getTransactionStatus.ts +34 -93
- package/src/families/solana/js-preload-data.ts +53 -0
- package/src/families/solana/js-preload.ts +66 -0
- package/src/families/solana/js-prepareTransaction.ts +471 -148
- package/src/families/solana/js-signOperation.ts +177 -74
- package/src/families/solana/js-synchronization.ts +195 -54
- package/src/families/solana/logic.ts +80 -0
- package/src/families/solana/react.ts +81 -0
- package/src/families/solana/serialization.ts +17 -0
- package/src/families/solana/specs.ts +411 -1
- package/src/families/solana/speculos-deviceActions.ts +192 -15
- package/src/families/solana/test-dataset.ts +707 -327
- package/src/families/solana/test-specifics.ts +171 -0
- package/src/families/solana/transaction.ts +93 -16
- package/src/families/solana/types.ts +158 -27
- package/src/families/solana/utils.ts +52 -1
- package/src/families/solana/validator-app/index.ts +106 -0
- package/src/families/stellar/__snapshots__/bridge.test.ts.snap +2570 -0
- package/src/families/stellar/api/horizon.ts +2 -1
- package/src/families/stellar/bridge.test.ts +6 -0
- package/src/families/stellar/test-dataset.ts +2 -4
- package/src/families/stellar/types.ts +0 -5
- package/src/families/tezos/bridge/js.ts +16 -1
- package/src/families/tezos/bridge.test.ts +24 -0
- package/src/families/tezos/types.ts +0 -224
- package/src/families/tron/types.ts +1 -6
- package/src/generated/customAddressValidation.ts +0 -6
- package/src/generated/types.ts +0 -202
- package/src/mock/account.ts +7 -1
- package/src/nft/NftMetadataProvider/index.tsx +163 -75
- package/src/nft/NftMetadataProvider/types.ts +31 -8
- package/src/nft/helpers.ts +169 -35
- package/src/nft/nftId.ts +13 -4
- package/src/nft/support.ts +14 -1
- package/src/reconciliation.ts +10 -5
- package/src/types/account.ts +7 -3
- package/src/types/bridge.ts +20 -0
- package/src/types/nft.ts +32 -9
- package/src/walletconnect/index.ts +3 -1
- package/lib/__tests__/all.libcore.d.ts +0 -2
- package/lib/__tests__/all.libcore.d.ts.map +0 -1
- package/lib/__tests__/all.libcore.js +0 -203
- package/lib/__tests__/all.libcore.js.map +0 -1
- package/lib/__tests__/test-helpers/implement-react-native-libcore/index.d.ts +0 -2
- package/lib/__tests__/test-helpers/implement-react-native-libcore/index.d.ts.map +0 -1
- package/lib/__tests__/test-helpers/implement-react-native-libcore/index.js +0 -12
- package/lib/__tests__/test-helpers/implement-react-native-libcore/index.js.map +0 -1
- package/lib/__tests__/test-helpers/implement-react-native-libcore/specific.android.d.ts +0 -2
- package/lib/__tests__/test-helpers/implement-react-native-libcore/specific.android.d.ts.map +0 -1
- package/lib/__tests__/test-helpers/implement-react-native-libcore/specific.android.js +0 -10
- package/lib/__tests__/test-helpers/implement-react-native-libcore/specific.android.js.map +0 -1
- package/lib/__tests__/test-helpers/implement-react-native-libcore/specific.ios.d.ts +0 -2
- package/lib/__tests__/test-helpers/implement-react-native-libcore/specific.ios.d.ts.map +0 -1
- package/lib/__tests__/test-helpers/implement-react-native-libcore/specific.ios.js +0 -10
- package/lib/__tests__/test-helpers/implement-react-native-libcore/specific.ios.js.map +0 -1
- package/lib/bridge/shared.d.ts +0 -6
- package/lib/bridge/shared.d.ts.map +0 -1
- package/lib/bridge/shared.js +0 -78
- package/lib/bridge/shared.js.map +0 -1
- package/lib/families/algorand/bridge/libcore.d.ts +0 -17
- package/lib/families/algorand/bridge/libcore.d.ts.map +0 -1
- package/lib/families/algorand/bridge/libcore.js +0 -404
- package/lib/families/algorand/bridge/libcore.js.map +0 -1
- package/lib/families/algorand/buildASAOperation.d.ts +0 -8
- package/lib/families/algorand/buildASAOperation.d.ts.map +0 -1
- package/lib/families/algorand/buildASAOperation.js +0 -140
- package/lib/families/algorand/buildASAOperation.js.map +0 -1
- package/lib/families/algorand/libcore-broadcast.d.ts +0 -3
- package/lib/families/algorand/libcore-broadcast.d.ts.map +0 -1
- package/lib/families/algorand/libcore-broadcast.js +0 -63
- package/lib/families/algorand/libcore-broadcast.js.map +0 -1
- package/lib/families/algorand/libcore-buildOperation.d.ts +0 -7
- package/lib/families/algorand/libcore-buildOperation.d.ts.map +0 -1
- package/lib/families/algorand/libcore-buildOperation.js +0 -131
- package/lib/families/algorand/libcore-buildOperation.js.map +0 -1
- package/lib/families/algorand/libcore-buildSubAccounts.d.ts +0 -11
- package/lib/families/algorand/libcore-buildSubAccounts.d.ts.map +0 -1
- package/lib/families/algorand/libcore-buildSubAccounts.js +0 -221
- package/lib/families/algorand/libcore-buildSubAccounts.js.map +0 -1
- package/lib/families/algorand/libcore-buildTransaction.d.ts +0 -13
- package/lib/families/algorand/libcore-buildTransaction.d.ts.map +0 -1
- package/lib/families/algorand/libcore-buildTransaction.js +0 -144
- package/lib/families/algorand/libcore-buildTransaction.js.map +0 -1
- package/lib/families/algorand/libcore-getFeesForTransaction.d.ts +0 -17
- package/lib/families/algorand/libcore-getFeesForTransaction.d.ts.map +0 -1
- package/lib/families/algorand/libcore-getFeesForTransaction.js.map +0 -1
- package/lib/families/algorand/libcore-postBuildAccount.d.ts +0 -8
- package/lib/families/algorand/libcore-postBuildAccount.d.ts.map +0 -1
- package/lib/families/algorand/libcore-postBuildAccount.js +0 -99
- package/lib/families/algorand/libcore-postBuildAccount.js.map +0 -1
- package/lib/families/algorand/libcore-signOperation.d.ts +0 -4
- package/lib/families/algorand/libcore-signOperation.d.ts.map +0 -1
- package/lib/families/algorand/libcore-signOperation.js +0 -146
- package/lib/families/algorand/libcore-signOperation.js.map +0 -1
- package/lib/families/bitcoin/bridge/libcore.d.ts +0 -8
- package/lib/families/bitcoin/bridge/libcore.d.ts.map +0 -1
- package/lib/families/bitcoin/bridge/libcore.js +0 -333
- package/lib/families/bitcoin/bridge/libcore.js.map +0 -1
- package/lib/families/bitcoin/customAddressValidation.d.ts +0 -8
- package/lib/families/bitcoin/customAddressValidation.d.ts.map +0 -1
- package/lib/families/bitcoin/customAddressValidation.js +0 -67
- package/lib/families/bitcoin/customAddressValidation.js.map +0 -1
- package/lib/families/bitcoin/libcore-broadcast.d.ts +0 -3
- package/lib/families/bitcoin/libcore-broadcast.d.ts.map +0 -1
- package/lib/families/bitcoin/libcore-broadcast.js +0 -61
- package/lib/families/bitcoin/libcore-broadcast.js.map +0 -1
- package/lib/families/bitcoin/libcore-buildOperation.d.ts +0 -9
- package/lib/families/bitcoin/libcore-buildOperation.d.ts.map +0 -1
- package/lib/families/bitcoin/libcore-buildOperation.js +0 -74
- package/lib/families/bitcoin/libcore-buildOperation.js.map +0 -1
- package/lib/families/bitcoin/libcore-buildTransaction.d.ts +0 -14
- package/lib/families/bitcoin/libcore-buildTransaction.d.ts.map +0 -1
- package/lib/families/bitcoin/libcore-buildTransaction.js +0 -199
- package/lib/families/bitcoin/libcore-buildTransaction.js.map +0 -1
- package/lib/families/bitcoin/libcore-getAccountNetworkInfo.d.ts +0 -12
- package/lib/families/bitcoin/libcore-getAccountNetworkInfo.d.ts.map +0 -1
- package/lib/families/bitcoin/libcore-getAccountNetworkInfo.js +0 -87
- package/lib/families/bitcoin/libcore-getAccountNetworkInfo.js.map +0 -1
- package/lib/families/bitcoin/libcore-getAccountNetworkInfo.test.d.ts +0 -2
- package/lib/families/bitcoin/libcore-getAccountNetworkInfo.test.d.ts.map +0 -1
- package/lib/families/bitcoin/libcore-getAccountNetworkInfo.test.js +0 -71
- package/lib/families/bitcoin/libcore-getAccountNetworkInfo.test.js.map +0 -1
- package/lib/families/bitcoin/libcore-getFeesForTransaction.d.ts +0 -10
- package/lib/families/bitcoin/libcore-getFeesForTransaction.d.ts.map +0 -1
- package/lib/families/bitcoin/libcore-getFeesForTransaction.js +0 -110
- package/lib/families/bitcoin/libcore-getFeesForTransaction.js.map +0 -1
- package/lib/families/bitcoin/libcore-postBuildAccount.d.ts +0 -8
- package/lib/families/bitcoin/libcore-postBuildAccount.d.ts.map +0 -1
- package/lib/families/bitcoin/libcore-postBuildAccount.js +0 -108
- package/lib/families/bitcoin/libcore-postBuildAccount.js.map +0 -1
- package/lib/families/bitcoin/libcore-signOperation.d.ts +0 -4
- package/lib/families/bitcoin/libcore-signOperation.d.ts.map +0 -1
- package/lib/families/bitcoin/libcore-signOperation.js +0 -328
- package/lib/families/bitcoin/libcore-signOperation.js.map +0 -1
- package/lib/families/cosmos/bridge/libcore.d.ts +0 -8
- package/lib/families/cosmos/bridge/libcore.d.ts.map +0 -1
- package/lib/families/cosmos/bridge/libcore.js +0 -216
- package/lib/families/cosmos/bridge/libcore.js.map +0 -1
- package/lib/families/cosmos/libcore-broadcast.d.ts +0 -3
- package/lib/families/cosmos/libcore-broadcast.d.ts.map +0 -1
- package/lib/families/cosmos/libcore-broadcast.js +0 -66
- package/lib/families/cosmos/libcore-broadcast.js.map +0 -1
- package/lib/families/cosmos/libcore-buildOperation.d.ts +0 -8
- package/lib/families/cosmos/libcore-buildOperation.d.ts.map +0 -1
- package/lib/families/cosmos/libcore-buildOperation.js +0 -217
- package/lib/families/cosmos/libcore-buildOperation.js.map +0 -1
- package/lib/families/cosmos/libcore-buildTransaction.d.ts +0 -14
- package/lib/families/cosmos/libcore-buildTransaction.d.ts.map +0 -1
- package/lib/families/cosmos/libcore-buildTransaction.js +0 -275
- package/lib/families/cosmos/libcore-buildTransaction.js.map +0 -1
- package/lib/families/cosmos/libcore-getFeesForTransaction.d.ts +0 -18
- package/lib/families/cosmos/libcore-getFeesForTransaction.d.ts.map +0 -1
- package/lib/families/cosmos/libcore-getFeesForTransaction.js +0 -84
- package/lib/families/cosmos/libcore-getFeesForTransaction.js.map +0 -1
- package/lib/families/cosmos/libcore-getTransactionStatus.d.ts +0 -5
- package/lib/families/cosmos/libcore-getTransactionStatus.d.ts.map +0 -1
- package/lib/families/cosmos/libcore-getTransactionStatus.js +0 -272
- package/lib/families/cosmos/libcore-getTransactionStatus.js.map +0 -1
- package/lib/families/cosmos/libcore-mergeOperations.d.ts +0 -4
- package/lib/families/cosmos/libcore-mergeOperations.d.ts.map +0 -1
- package/lib/families/cosmos/libcore-mergeOperations.js +0 -49
- package/lib/families/cosmos/libcore-mergeOperations.js.map +0 -1
- package/lib/families/cosmos/libcore-postBuildAccount.d.ts +0 -8
- package/lib/families/cosmos/libcore-postBuildAccount.d.ts.map +0 -1
- package/lib/families/cosmos/libcore-postBuildAccount.js +0 -313
- package/lib/families/cosmos/libcore-postBuildAccount.js.map +0 -1
- package/lib/families/cosmos/libcore-signOperation.d.ts +0 -4
- package/lib/families/cosmos/libcore-signOperation.d.ts.map +0 -1
- package/lib/families/cosmos/libcore-signOperation.js +0 -142
- package/lib/families/cosmos/libcore-signOperation.js.map +0 -1
- package/lib/families/cosmos/message.d.ts +0 -5
- package/lib/families/cosmos/message.d.ts.map +0 -1
- package/lib/families/cosmos/message.js +0 -233
- package/lib/families/cosmos/message.js.map +0 -1
- package/lib/families/cosmos/test-specifics.d.ts +0 -3
- package/lib/families/cosmos/test-specifics.d.ts.map +0 -1
- package/lib/families/cosmos/test-specifics.js +0 -307
- package/lib/families/cosmos/test-specifics.js.map +0 -1
- package/lib/families/ethereum/nft.merging.unit.test.d.ts +0 -2
- package/lib/families/ethereum/nft.merging.unit.test.d.ts.map +0 -1
- package/lib/families/ethereum/nft.merging.unit.test.js.map +0 -1
- package/lib/families/filecoin/customAddressValidation.d.ts +0 -8
- package/lib/families/filecoin/customAddressValidation.d.ts.map +0 -1
- package/lib/families/filecoin/customAddressValidation.js +0 -50
- package/lib/families/filecoin/customAddressValidation.js.map +0 -1
- package/lib/families/polkadot/test-specifics.d.ts +0 -3
- package/lib/families/polkadot/test-specifics.d.ts.map +0 -1
- package/lib/families/polkadot/test-specifics.js +0 -91
- package/lib/families/polkadot/test-specifics.js.map +0 -1
- package/lib/families/tezos/bridge/libcore.d.ts +0 -14
- package/lib/families/tezos/bridge/libcore.d.ts.map +0 -1
- package/lib/families/tezos/bridge/libcore.js +0 -336
- package/lib/families/tezos/bridge/libcore.js.map +0 -1
- package/lib/families/tezos/libcore-broadcast.d.ts +0 -3
- package/lib/families/tezos/libcore-broadcast.d.ts.map +0 -1
- package/lib/families/tezos/libcore-broadcast.js +0 -61
- package/lib/families/tezos/libcore-broadcast.js.map +0 -1
- package/lib/families/tezos/libcore-buildOperation.d.ts +0 -7
- package/lib/families/tezos/libcore-buildOperation.d.ts.map +0 -1
- package/lib/families/tezos/libcore-buildOperation.js +0 -93
- package/lib/families/tezos/libcore-buildOperation.js.map +0 -1
- package/lib/families/tezos/libcore-buildSubAccounts.d.ts +0 -11
- package/lib/families/tezos/libcore-buildSubAccounts.d.ts.map +0 -1
- package/lib/families/tezos/libcore-buildSubAccounts.js +0 -214
- package/lib/families/tezos/libcore-buildSubAccounts.js.map +0 -1
- package/lib/families/tezos/libcore-buildTransaction.d.ts +0 -14
- package/lib/families/tezos/libcore-buildTransaction.d.ts.map +0 -1
- package/lib/families/tezos/libcore-buildTransaction.js +0 -225
- package/lib/families/tezos/libcore-buildTransaction.js.map +0 -1
- package/lib/families/tezos/libcore-getAccountNetworkInfo.d.ts +0 -11
- package/lib/families/tezos/libcore-getAccountNetworkInfo.d.ts.map +0 -1
- package/lib/families/tezos/libcore-getAccountNetworkInfo.js +0 -66
- package/lib/families/tezos/libcore-getAccountNetworkInfo.js.map +0 -1
- package/lib/families/tezos/libcore-getFeesForTransaction.d.ts +0 -18
- package/lib/families/tezos/libcore-getFeesForTransaction.d.ts.map +0 -1
- package/lib/families/tezos/libcore-getFeesForTransaction.js +0 -73
- package/lib/families/tezos/libcore-getFeesForTransaction.js.map +0 -1
- package/lib/families/tezos/libcore-signOperation.d.ts +0 -4
- package/lib/families/tezos/libcore-signOperation.d.ts.map +0 -1
- package/lib/families/tezos/libcore-signOperation.js +0 -187
- package/lib/families/tezos/libcore-signOperation.js.map +0 -1
- package/lib/families/tezos/test-specifics.d.ts +0 -3
- package/lib/families/tezos/test-specifics.d.ts.map +0 -1
- package/lib/families/tezos/test-specifics.js.map +0 -1
- package/lib/families/tron/test-specifics.d.ts +0 -3
- package/lib/families/tron/test-specifics.d.ts.map +0 -1
- package/lib/families/tron/test-specifics.js +0 -205
- package/lib/families/tron/test-specifics.js.map +0 -1
- package/lib/generated/bridge/libcore.d.ts +0 -20
- package/lib/generated/bridge/libcore.d.ts.map +0 -1
- package/lib/generated/bridge/libcore.js +0 -16
- package/lib/generated/bridge/libcore.js.map +0 -1
- package/lib/generated/libcore-buildOperation.d.ts +0 -12
- package/lib/generated/libcore-buildOperation.d.ts.map +0 -1
- package/lib/generated/libcore-buildOperation.js +0 -16
- package/lib/generated/libcore-buildOperation.js.map +0 -1
- package/lib/generated/libcore-buildSubAccounts.d.ts +0 -8
- package/lib/generated/libcore-buildSubAccounts.d.ts.map +0 -1
- package/lib/generated/libcore-buildSubAccounts.js +0 -12
- package/lib/generated/libcore-buildSubAccounts.js.map +0 -1
- package/lib/generated/libcore-getAccountNetworkInfo.d.ts +0 -8
- package/lib/generated/libcore-getAccountNetworkInfo.d.ts.map +0 -1
- package/lib/generated/libcore-getAccountNetworkInfo.js +0 -12
- package/lib/generated/libcore-getAccountNetworkInfo.js.map +0 -1
- package/lib/generated/libcore-getFeesForTransaction.d.ts +0 -12
- package/lib/generated/libcore-getFeesForTransaction.d.ts.map +0 -1
- package/lib/generated/libcore-getFeesForTransaction.js +0 -16
- package/lib/generated/libcore-getFeesForTransaction.js.map +0 -1
- package/lib/generated/libcore-mergeOperations.d.ts +0 -5
- package/lib/generated/libcore-mergeOperations.d.ts.map +0 -1
- package/lib/generated/libcore-mergeOperations.js +0 -10
- package/lib/generated/libcore-mergeOperations.js.map +0 -1
- package/lib/generated/libcore-postBuildAccount.d.ts +0 -16
- package/lib/generated/libcore-postBuildAccount.d.ts.map +0 -1
- package/lib/generated/libcore-postBuildAccount.js +0 -14
- package/lib/generated/libcore-postBuildAccount.js.map +0 -1
- package/lib/generated/libcore-postSyncPatch.d.ts +0 -3
- package/lib/generated/libcore-postSyncPatch.d.ts.map +0 -1
- package/lib/generated/libcore-postSyncPatch.js +0 -4
- package/lib/generated/libcore-postSyncPatch.js.map +0 -1
- package/lib/generated/test-specifics.d.ts +0 -8
- package/lib/generated/test-specifics.d.ts.map +0 -1
- package/lib/generated/test-specifics.js +0 -16
- package/lib/generated/test-specifics.js.map +0 -1
- package/lib/libcore/access.d.ts +0 -11
- package/lib/libcore/access.d.ts.map +0 -1
- package/lib/libcore/access.js +0 -229
- package/lib/libcore/access.js.map +0 -1
- package/lib/libcore/broadcast.d.ts +0 -14
- package/lib/libcore/broadcast.d.ts.map +0 -1
- package/lib/libcore/broadcast.js +0 -68
- package/lib/libcore/broadcast.js.map +0 -1
- package/lib/libcore/buildAccount/buildOperation.d.ts +0 -15
- package/lib/libcore/buildAccount/buildOperation.d.ts.map +0 -1
- package/lib/libcore/buildAccount/buildOperation.js +0 -162
- package/lib/libcore/buildAccount/buildOperation.js.map +0 -1
- package/lib/libcore/buildAccount/buildSubAccounts.d.ts +0 -12
- package/lib/libcore/buildAccount/buildSubAccounts.d.ts.map +0 -1
- package/lib/libcore/buildAccount/buildSubAccounts.js.map +0 -1
- package/lib/libcore/buildAccount/index.d.ts +0 -15
- package/lib/libcore/buildAccount/index.d.ts.map +0 -1
- package/lib/libcore/buildAccount/index.js +0 -339
- package/lib/libcore/buildAccount/index.js.map +0 -1
- package/lib/libcore/buildBigNumber.d.ts +0 -7
- package/lib/libcore/buildBigNumber.d.ts.map +0 -1
- package/lib/libcore/buildBigNumber.js.map +0 -1
- package/lib/libcore/createAccountFromDevice.d.ts +0 -23
- package/lib/libcore/createAccountFromDevice.d.ts.map +0 -1
- package/lib/libcore/createAccountFromDevice.js +0 -143
- package/lib/libcore/createAccountFromDevice.js.map +0 -1
- package/lib/libcore/errors.d.ts +0 -6
- package/lib/libcore/errors.d.ts.map +0 -1
- package/lib/libcore/errors.js +0 -27
- package/lib/libcore/errors.js.map +0 -1
- package/lib/libcore/getAccountBalanceHistory.d.ts +0 -5
- package/lib/libcore/getAccountBalanceHistory.d.ts.map +0 -1
- package/lib/libcore/getAccountBalanceHistory.js +0 -87
- package/lib/libcore/getAccountBalanceHistory.js.map +0 -1
- package/lib/libcore/getAccountNetworkInfo.d.ts +0 -6
- package/lib/libcore/getAccountNetworkInfo.d.ts.map +0 -1
- package/lib/libcore/getAccountNetworkInfo.js +0 -91
- package/lib/libcore/getAccountNetworkInfo.js.map +0 -1
- package/lib/libcore/getCoreAccount.d.ts +0 -8
- package/lib/libcore/getCoreAccount.d.ts.map +0 -1
- package/lib/libcore/getCoreAccount.js +0 -78
- package/lib/libcore/getCoreAccount.js.map +0 -1
- package/lib/libcore/getFeesForTransaction.d.ts +0 -17
- package/lib/libcore/getFeesForTransaction.d.ts.map +0 -1
- package/lib/libcore/getFeesForTransaction.js +0 -87
- package/lib/libcore/getFeesForTransaction.js.map +0 -1
- package/lib/libcore/getOrCreateAccount.d.ts +0 -11
- package/lib/libcore/getOrCreateAccount.d.ts.map +0 -1
- package/lib/libcore/getOrCreateAccount.js +0 -142
- package/lib/libcore/getOrCreateAccount.js.map +0 -1
- package/lib/libcore/getOrCreateWallet.d.ts +0 -12
- package/lib/libcore/getOrCreateWallet.d.ts.map +0 -1
- package/lib/libcore/getOrCreateWallet.js +0 -138
- package/lib/libcore/getOrCreateWallet.js.map +0 -1
- package/lib/libcore/isValidRecipient.d.ts +0 -8
- package/lib/libcore/isValidRecipient.d.ts.map +0 -1
- package/lib/libcore/isValidRecipient.js +0 -78
- package/lib/libcore/isValidRecipient.js.map +0 -1
- package/lib/libcore/nativeSegwitAppsVersionsMap.d.ts +0 -6
- package/lib/libcore/nativeSegwitAppsVersionsMap.d.ts.map +0 -1
- package/lib/libcore/nativeSegwitAppsVersionsMap.js +0 -7
- package/lib/libcore/nativeSegwitAppsVersionsMap.js.map +0 -1
- package/lib/libcore/platforms/nodejs.d.ts +0 -7
- package/lib/libcore/platforms/nodejs.d.ts.map +0 -1
- package/lib/libcore/platforms/nodejs.js +0 -613
- package/lib/libcore/platforms/nodejs.js.map +0 -1
- package/lib/libcore/platforms/react-native.d.ts +0 -5
- package/lib/libcore/platforms/react-native.d.ts.map +0 -1
- package/lib/libcore/platforms/react-native.js +0 -286
- package/lib/libcore/platforms/react-native.js.map +0 -1
- package/lib/libcore/scanAccounts.d.ts +0 -12
- package/lib/libcore/scanAccounts.d.ts.map +0 -1
- package/lib/libcore/scanAccounts.js +0 -285
- package/lib/libcore/scanAccounts.js.map +0 -1
- package/lib/libcore/signOperation.d.ts +0 -38
- package/lib/libcore/signOperation.d.ts.map +0 -1
- package/lib/libcore/signOperation.js +0 -149
- package/lib/libcore/signOperation.js.map +0 -1
- package/lib/libcore/syncAccount.d.ts +0 -18
- package/lib/libcore/syncAccount.d.ts.map +0 -1
- package/lib/libcore/syncAccount.js +0 -165
- package/lib/libcore/syncAccount.js.map +0 -1
- package/lib/libcore/types/index.d.ts +0 -185
- package/lib/libcore/types/index.d.ts.map +0 -1
- package/lib/libcore/types/index.js +0 -359
- package/lib/libcore/types/index.js.map +0 -1
- package/src/__tests__/all.libcore.ts +0 -90
- package/src/__tests__/test-helpers/implement-react-native-libcore/index.ts +0 -6
- package/src/__tests__/test-helpers/implement-react-native-libcore/specific.android.ts +0 -4
- package/src/__tests__/test-helpers/implement-react-native-libcore/specific.ios.ts +0 -4
- package/src/bridge/shared.ts +0 -38
- package/src/families/algorand/bridge/libcore.ts +0 -345
- package/src/families/algorand/buildASAOperation.ts +0 -66
- package/src/families/algorand/libcore-broadcast.ts +0 -18
- package/src/families/algorand/libcore-buildOperation.ts +0 -69
- package/src/families/algorand/libcore-buildSubAccounts.ts +0 -132
- package/src/families/algorand/libcore-buildTransaction.ts +0 -115
- package/src/families/algorand/libcore-getFeesForTransaction.ts +0 -25
- package/src/families/algorand/libcore-postBuildAccount.ts +0 -42
- package/src/families/algorand/libcore-signOperation.ts +0 -104
- package/src/families/bitcoin/bridge/libcore.ts +0 -297
- package/src/families/bitcoin/customAddressValidation.ts +0 -30
- package/src/families/bitcoin/libcore-broadcast.ts +0 -15
- package/src/families/bitcoin/libcore-buildOperation.ts +0 -38
- package/src/families/bitcoin/libcore-buildTransaction.ts +0 -118
- package/src/families/bitcoin/libcore-getAccountNetworkInfo.test.ts +0 -27
- package/src/families/bitcoin/libcore-getAccountNetworkInfo.ts +0 -50
- package/src/families/bitcoin/libcore-getFeesForTransaction.ts +0 -67
- package/src/families/bitcoin/libcore-postBuildAccount.ts +0 -70
- package/src/families/bitcoin/libcore-signOperation.ts +0 -227
- package/src/families/cosmos/bridge/libcore.ts +0 -177
- package/src/families/cosmos/libcore-broadcast.ts +0 -24
- package/src/families/cosmos/libcore-buildOperation.ts +0 -121
- package/src/families/cosmos/libcore-buildTransaction.ts +0 -212
- package/src/families/cosmos/libcore-getFeesForTransaction.ts +0 -27
- package/src/families/cosmos/libcore-getTransactionStatus.ts +0 -299
- package/src/families/cosmos/libcore-mergeOperations.ts +0 -43
- package/src/families/cosmos/libcore-postBuildAccount.ts +0 -177
- package/src/families/cosmos/libcore-signOperation.ts +0 -96
- package/src/families/cosmos/message.ts +0 -155
- package/src/families/cosmos/test-specifics.ts +0 -225
- package/src/families/ethereum/nft.merging.unit.test.ts +0 -78
- package/src/families/filecoin/customAddressValidation.ts +0 -19
- package/src/families/polkadot/test-specifics.ts +0 -70
- package/src/families/tezos/bridge/libcore.ts +0 -312
- package/src/families/tezos/libcore-broadcast.ts +0 -16
- package/src/families/tezos/libcore-buildOperation.ts +0 -52
- package/src/families/tezos/libcore-buildSubAccounts.ts +0 -137
- package/src/families/tezos/libcore-buildTransaction.ts +0 -154
- package/src/families/tezos/libcore-getAccountNetworkInfo.ts +0 -25
- package/src/families/tezos/libcore-getFeesForTransaction.ts +0 -27
- package/src/families/tezos/libcore-signOperation.ts +0 -122
- package/src/families/tezos/test-specifics.ts +0 -19
- package/src/families/tron/test-specifics.ts +0 -137
- package/src/generated/bridge/libcore.ts +0 -15
- package/src/generated/libcore-buildOperation.ts +0 -15
- package/src/generated/libcore-buildSubAccounts.ts +0 -9
- package/src/generated/libcore-getAccountNetworkInfo.ts +0 -9
- package/src/generated/libcore-getFeesForTransaction.ts +0 -15
- package/src/generated/libcore-mergeOperations.ts +0 -6
- package/src/generated/libcore-postBuildAccount.ts +0 -12
- package/src/generated/libcore-postSyncPatch.ts +0 -3
- package/src/generated/test-specifics.ts +0 -15
- package/src/libcore/access.ts +0 -135
- package/src/libcore/broadcast.ts +0 -34
- package/src/libcore/buildAccount/buildOperation.ts +0 -96
- package/src/libcore/buildAccount/buildSubAccounts.ts +0 -24
- package/src/libcore/buildAccount/index.ts +0 -259
- package/src/libcore/buildBigNumber.ts +0 -28
- package/src/libcore/createAccountFromDevice.ts +0 -108
- package/src/libcore/errors.ts +0 -20
- package/src/libcore/getAccountBalanceHistory.ts +0 -56
- package/src/libcore/getAccountNetworkInfo.ts +0 -46
- package/src/libcore/getCoreAccount.ts +0 -37
- package/src/libcore/getFeesForTransaction.ts +0 -46
- package/src/libcore/getOrCreateAccount.ts +0 -93
- package/src/libcore/getOrCreateWallet.ts +0 -91
- package/src/libcore/isValidRecipient.ts +0 -36
- package/src/libcore/nativeSegwitAppsVersionsMap.ts +0 -4
- package/src/libcore/platforms/nodejs.ts +0 -627
- package/src/libcore/platforms/react-native.ts +0 -242
- package/src/libcore/scanAccounts.ts +0 -280
- package/src/libcore/signOperation.ts +0 -141
- package/src/libcore/syncAccount.ts +0 -152
- package/src/libcore/types/index.ts +0 -645
|
@@ -33,6 +33,7 @@ import { signOperation } from "../signOperation";
|
|
|
33
33
|
import { modes } from "../modules";
|
|
34
34
|
import postSyncPatch from "../postSyncPatch";
|
|
35
35
|
import { inferDynamicRange } from "../../../range";
|
|
36
|
+
import { nftMetadata, collectionMetadata } from "../nftResolvers";
|
|
36
37
|
|
|
37
38
|
const receive = makeAccountBridgeReceive();
|
|
38
39
|
|
|
@@ -210,6 +211,10 @@ const currencyBridge: CurrencyBridge = {
|
|
|
210
211
|
preload,
|
|
211
212
|
hydrate,
|
|
212
213
|
scanAccounts,
|
|
214
|
+
nftResolvers: {
|
|
215
|
+
nftMetadata,
|
|
216
|
+
collectionMetadata,
|
|
217
|
+
},
|
|
213
218
|
};
|
|
214
219
|
const accountBridge: AccountBridge<Transaction> = {
|
|
215
220
|
createTransaction,
|
|
@@ -11,10 +11,10 @@ import type { ModeModule, Transaction } from "../types";
|
|
|
11
11
|
import type { Account } from "../../../types";
|
|
12
12
|
import { prepareTransaction } from "./erc721";
|
|
13
13
|
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
14
|
+
const NotOwnedNft = createCustomErrorClass("NotOwnedNft");
|
|
15
|
+
const NotEnoughNftOwned = createCustomErrorClass("NotEnoughNftOwned");
|
|
16
|
+
const NotTokenIdsProvided = createCustomErrorClass("NotTokenIdsProvided");
|
|
17
|
+
const QuantityNeedsToBePositive = createCustomErrorClass(
|
|
18
18
|
"QuantityNeedsToBePositive"
|
|
19
19
|
);
|
|
20
20
|
|
|
@@ -47,8 +47,8 @@ const erc1155Transfer: ModeModule = {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
t.quantities?.forEach((quantity) => {
|
|
50
|
-
if (quantity.isLessThan(1)) {
|
|
51
|
-
result.errors.amount = new
|
|
50
|
+
if (!quantity || quantity.isLessThan(1)) {
|
|
51
|
+
result.errors.amount = new QuantityNeedsToBePositive();
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
|
|
@@ -62,15 +62,15 @@ const erc1155Transfer: ModeModule = {
|
|
|
62
62
|
const transferQuantity = Number(t.quantities?.[index]);
|
|
63
63
|
|
|
64
64
|
if (!nft) {
|
|
65
|
-
return new
|
|
65
|
+
return new NotOwnedNft();
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
if (transferQuantity && !nft.amount.gte(transferQuantity)) {
|
|
69
|
-
return new
|
|
69
|
+
return new NotEnoughNftOwned();
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
return true;
|
|
73
|
-
}, true as true | Error) || new
|
|
73
|
+
}, true as true | Error) || new NotTokenIdsProvided();
|
|
74
74
|
|
|
75
75
|
if (!enoughTokensOwned || enoughTokensOwned instanceof Error) {
|
|
76
76
|
result.errors.amount = enoughTokensOwned;
|
|
@@ -11,7 +11,7 @@ import type { ModeModule, Transaction } from "../types";
|
|
|
11
11
|
import type { Account } from "../../../types";
|
|
12
12
|
import { apiForCurrency } from "../../../api/Ethereum";
|
|
13
13
|
|
|
14
|
-
const
|
|
14
|
+
const NotOwnedNft = createCustomErrorClass("NotOwnedNft");
|
|
15
15
|
|
|
16
16
|
export type Modes = "erc721.transfer";
|
|
17
17
|
|
|
@@ -23,12 +23,14 @@ export async function prepareTransaction(
|
|
|
23
23
|
const { collection, collectionName, tokenIds } = transaction;
|
|
24
24
|
if (collection && tokenIds && typeof collectionName === "undefined") {
|
|
25
25
|
const api = apiForCurrency(account.currency);
|
|
26
|
-
const [{ status, result }] = await api.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
const [{ status, result }] = await api.getNFTCollectionMetadata(
|
|
27
|
+
[
|
|
28
|
+
{
|
|
29
|
+
contract: collection,
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
account.currency?.ethereumLikeInfo?.chainId?.toString() || "1"
|
|
33
|
+
);
|
|
32
34
|
let collectionName = ""; // default value fallback if issue
|
|
33
35
|
if (status === 200) {
|
|
34
36
|
collectionName = result?.tokenName || "";
|
|
@@ -66,12 +68,10 @@ const erc721Transfer: ModeModule = {
|
|
|
66
68
|
|
|
67
69
|
if (
|
|
68
70
|
!a.nfts?.find?.(
|
|
69
|
-
(n) =>
|
|
70
|
-
n.tokenId === t.tokenIds?.[0] &&
|
|
71
|
-
n.collection.contract === t.collection
|
|
71
|
+
(n) => n.tokenId === t.tokenIds?.[0] && n.contract === t.collection
|
|
72
72
|
)
|
|
73
73
|
) {
|
|
74
|
-
result.errors.amount = new
|
|
74
|
+
result.errors.amount = new NotOwnedNft();
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
},
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import "../../__tests__/test-helpers/setup";
|
|
2
|
+
import BigNumber from "bignumber.js";
|
|
3
|
+
import { encodeAccountId, toNFTRaw } from "../../account";
|
|
4
|
+
import { Operation } from "../../types";
|
|
5
|
+
import { ProtoNFT } from "../../types/nft";
|
|
6
|
+
import { mergeNfts } from "../../bridge/jsHelpers";
|
|
7
|
+
import { encodeNftId, nftsFromOperations } from "../../nft";
|
|
8
|
+
|
|
9
|
+
describe("nft merging", () => {
|
|
10
|
+
const makeNFT = (
|
|
11
|
+
tokenId: string,
|
|
12
|
+
contract: string,
|
|
13
|
+
amount: number
|
|
14
|
+
): ProtoNFT => ({
|
|
15
|
+
id: encodeNftId("test", contract, tokenId, "ethereum"),
|
|
16
|
+
tokenId,
|
|
17
|
+
amount: new BigNumber(amount),
|
|
18
|
+
contract,
|
|
19
|
+
standard: "ERC721",
|
|
20
|
+
currencyId: "ethereum",
|
|
21
|
+
});
|
|
22
|
+
const oldNfts = [
|
|
23
|
+
makeNFT("1", "contract1", 10),
|
|
24
|
+
makeNFT("2", "contract1", 1),
|
|
25
|
+
makeNFT("3", "contract2", 6),
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
test("should remove first NFT and return new array with same refs", () => {
|
|
29
|
+
const nfts = [makeNFT("2", "contract1", 1), makeNFT("3", "contract2", 6)];
|
|
30
|
+
const newNfts = mergeNfts(oldNfts, nfts);
|
|
31
|
+
|
|
32
|
+
expect(newNfts.map(toNFTRaw)).toEqual(nfts.map(toNFTRaw));
|
|
33
|
+
expect(oldNfts[1]).toBe(newNfts[0]);
|
|
34
|
+
expect(oldNfts[2]).toBe(newNfts[1]);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
test("should remove any NFT and return new array with same refs", () => {
|
|
38
|
+
const nfts = [makeNFT("1", "contract1", 10), makeNFT("3", "contract2", 6)];
|
|
39
|
+
const newNfts = mergeNfts(oldNfts, nfts);
|
|
40
|
+
|
|
41
|
+
expect(newNfts.map(toNFTRaw)).toEqual(nfts.map(toNFTRaw));
|
|
42
|
+
expect(oldNfts[0]).toBe(newNfts[0]);
|
|
43
|
+
expect(oldNfts[2]).toBe(newNfts[1]);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
test("should change NFT amount and return new array with new ref", () => {
|
|
47
|
+
const nfts = [
|
|
48
|
+
makeNFT("1", "contract1", 10),
|
|
49
|
+
makeNFT("2", "contract1", 5),
|
|
50
|
+
makeNFT("3", "contract2", 6),
|
|
51
|
+
];
|
|
52
|
+
const addToNft1 = mergeNfts(oldNfts, nfts);
|
|
53
|
+
|
|
54
|
+
expect(addToNft1.map(toNFTRaw)).toEqual(nfts.map(toNFTRaw));
|
|
55
|
+
expect(oldNfts[0]).toBe(addToNft1[0]);
|
|
56
|
+
expect(oldNfts[1]).not.toBe(addToNft1[1]);
|
|
57
|
+
expect(oldNfts[2]).toBe(addToNft1[2]);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
test("should add NFT and return new array with new ref", () => {
|
|
61
|
+
const nfts = [
|
|
62
|
+
makeNFT("1", "contract1", 10),
|
|
63
|
+
makeNFT("2", "contract1", 1),
|
|
64
|
+
makeNFT("3", "contract2", 6),
|
|
65
|
+
makeNFT("4", "contract2", 4),
|
|
66
|
+
];
|
|
67
|
+
const addToNft1 = mergeNfts(oldNfts, nfts);
|
|
68
|
+
|
|
69
|
+
expect(addToNft1.map(toNFTRaw)).toEqual(
|
|
70
|
+
[
|
|
71
|
+
makeNFT("4", "contract2", 4),
|
|
72
|
+
makeNFT("1", "contract1", 10),
|
|
73
|
+
makeNFT("2", "contract1", 1),
|
|
74
|
+
makeNFT("3", "contract2", 6),
|
|
75
|
+
].map(toNFTRaw)
|
|
76
|
+
);
|
|
77
|
+
expect(oldNfts[0]).toBe(addToNft1[1]);
|
|
78
|
+
expect(oldNfts[1]).toBe(addToNft1[2]);
|
|
79
|
+
expect(oldNfts[2]).toBe(addToNft1[3]);
|
|
80
|
+
expect(addToNft1[0]).toBe(nfts[3]);
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
describe("OpenSea lazy minting bs", () => {
|
|
85
|
+
test("should have a correct on-chain nft amount even with OpenSea lazy minting", () => {
|
|
86
|
+
const makeNftOperation = (
|
|
87
|
+
type: Operation["type"],
|
|
88
|
+
value: string | number,
|
|
89
|
+
dateOrder: number
|
|
90
|
+
): Operation => {
|
|
91
|
+
if (!["NFT_IN", "NFT_OUT"].includes(type)) {
|
|
92
|
+
return {} as Operation;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const id = encodeAccountId({
|
|
96
|
+
type: "type",
|
|
97
|
+
currencyId: "polygon",
|
|
98
|
+
xpubOrAddress: "0xbob",
|
|
99
|
+
derivationMode: "",
|
|
100
|
+
version: "1",
|
|
101
|
+
});
|
|
102
|
+
const sender = type === "NFT_IN" ? "0xbob" : "0xkvn";
|
|
103
|
+
const receiver = type === "NFT_IN" ? "0xkvn" : "0xbob";
|
|
104
|
+
const contract = "0x0000000000000000000000000000000000000000";
|
|
105
|
+
const fee = new BigNumber(0);
|
|
106
|
+
const tokenId = "42069";
|
|
107
|
+
const hash = "FaKeHasH";
|
|
108
|
+
const date = new Date(Date.now() + dateOrder ?? 0);
|
|
109
|
+
|
|
110
|
+
return {
|
|
111
|
+
id,
|
|
112
|
+
hash,
|
|
113
|
+
senders: [sender],
|
|
114
|
+
recipients: [receiver],
|
|
115
|
+
contract,
|
|
116
|
+
fee,
|
|
117
|
+
standard: "ERC1155",
|
|
118
|
+
tokenId,
|
|
119
|
+
value: new BigNumber(value),
|
|
120
|
+
type,
|
|
121
|
+
accountId: id,
|
|
122
|
+
date,
|
|
123
|
+
} as Operation;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
// scenario with bob lazy minting 10 NFTs
|
|
127
|
+
const ops = [
|
|
128
|
+
makeNftOperation("NFT_OUT", 5, 0), // lazy mint sending 5 NFT
|
|
129
|
+
makeNftOperation("NFT_IN", 1, 1), // receiving 1 of them back
|
|
130
|
+
makeNftOperation("NFT_IN", 2, 2), // receiving 2 of them back
|
|
131
|
+
makeNftOperation("NFT_OUT", 2, 3), // lazy mint sending 5 NFT (transformed by OpenSea in 2 txs) 1/2 (off-chain)
|
|
132
|
+
makeNftOperation("NFT_OUT", 3, 4), // lazy mint sending 5 NFT (transformed by OpenSea in 2 txs) 2/2 (on-chain)
|
|
133
|
+
makeNftOperation("NFT_IN", 1, 5), // receiving 1 back
|
|
134
|
+
];
|
|
135
|
+
|
|
136
|
+
// What happened for bob:
|
|
137
|
+
//
|
|
138
|
+
// -5 off-chain -> 0 on-chain (5 off-chain)
|
|
139
|
+
// +1 on-chain -> 1 on-chain (5 off-chain)
|
|
140
|
+
// +2 on-chain -> 3 on-chain (5 off-chain)
|
|
141
|
+
// -2 off-chain & -3 on-chain -> 0 on-chain (3 off-chain)
|
|
142
|
+
// +1 on-chain -> 1 on-chain (and 3 off-chain)
|
|
143
|
+
|
|
144
|
+
const nfts = nftsFromOperations(ops);
|
|
145
|
+
expect(nfts[0].amount.toNumber()).toBe(1);
|
|
146
|
+
});
|
|
147
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CurrencyBridge,
|
|
3
|
+
NFTCollectionMetadataResponse,
|
|
4
|
+
NFTMetadataResponse,
|
|
5
|
+
} from "../../types";
|
|
6
|
+
import { getCryptoCurrencyById } from "../../currencies";
|
|
7
|
+
import { metadataCallBatcher } from "../../nft";
|
|
8
|
+
|
|
9
|
+
const SUPPORTED_CHAIN_IDS = new Set([
|
|
10
|
+
1, // Ethereum
|
|
11
|
+
137, // Polygon
|
|
12
|
+
]);
|
|
13
|
+
|
|
14
|
+
type NftResolvers = NonNullable<CurrencyBridge["nftResolvers"]>;
|
|
15
|
+
|
|
16
|
+
export const nftMetadata: NftResolvers["nftMetadata"] = async ({
|
|
17
|
+
contract,
|
|
18
|
+
tokenId,
|
|
19
|
+
currencyId,
|
|
20
|
+
metadata,
|
|
21
|
+
}): Promise<NFTMetadataResponse> => {
|
|
22
|
+
// This is for test/mock purposes
|
|
23
|
+
if (typeof metadata !== "undefined") {
|
|
24
|
+
return {
|
|
25
|
+
status: 200,
|
|
26
|
+
result: {
|
|
27
|
+
contract,
|
|
28
|
+
tokenId,
|
|
29
|
+
...metadata,
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const currency = getCryptoCurrencyById(currencyId);
|
|
35
|
+
const chainId = currency?.ethereumLikeInfo?.chainId;
|
|
36
|
+
|
|
37
|
+
if (!chainId || !SUPPORTED_CHAIN_IDS.has(chainId)) {
|
|
38
|
+
throw new Error("Ethereum Bridge NFT Resolver: Unsupported chainId");
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const response = (await metadataCallBatcher(currency).loadNft({
|
|
42
|
+
contract,
|
|
43
|
+
tokenId,
|
|
44
|
+
})) as NFTMetadataResponse;
|
|
45
|
+
|
|
46
|
+
return response;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const collectionMetadata: NftResolvers["collectionMetadata"] = async ({
|
|
50
|
+
contract,
|
|
51
|
+
currencyId,
|
|
52
|
+
metadata,
|
|
53
|
+
}): Promise<NFTCollectionMetadataResponse> => {
|
|
54
|
+
// This is for test/mock purposes
|
|
55
|
+
if (typeof metadata !== "undefined") {
|
|
56
|
+
return {
|
|
57
|
+
status: 200,
|
|
58
|
+
result: {
|
|
59
|
+
contract,
|
|
60
|
+
...metadata,
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const currency = getCryptoCurrencyById(currencyId);
|
|
66
|
+
const chainId = currency?.ethereumLikeInfo?.chainId;
|
|
67
|
+
|
|
68
|
+
if (!chainId || !SUPPORTED_CHAIN_IDS.has(chainId)) {
|
|
69
|
+
throw new Error("Ethereum Bridge NFT Resolver: Unsupported chainId");
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const response = (await metadataCallBatcher(currency).loadCollection({
|
|
73
|
+
contract,
|
|
74
|
+
})) as NFTCollectionMetadataResponse;
|
|
75
|
+
|
|
76
|
+
return response;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export default { nftMetadata, collectionMetadata };
|
|
@@ -336,7 +336,7 @@ const txToOps =
|
|
|
336
336
|
const receiver = safeEncodeEIP55(event.receiver);
|
|
337
337
|
const contract = safeEncodeEIP55(event.contract);
|
|
338
338
|
const tokenId = event.token_id;
|
|
339
|
-
const nftId = encodeNftId(id, event.contract, tokenId);
|
|
339
|
+
const nftId = encodeNftId(id, event.contract, tokenId, currency.id);
|
|
340
340
|
const sending = addr === sender;
|
|
341
341
|
const receiving = addr === receiver;
|
|
342
342
|
|
|
@@ -414,7 +414,12 @@ const txToOps =
|
|
|
414
414
|
event.transfers.forEach((transfer, j) => {
|
|
415
415
|
const tokenId = transfer.id;
|
|
416
416
|
const value = new BigNumber(transfer.value);
|
|
417
|
-
const nftId = encodeNftId(
|
|
417
|
+
const nftId = encodeNftId(
|
|
418
|
+
id,
|
|
419
|
+
event.contract,
|
|
420
|
+
tokenId,
|
|
421
|
+
currency.id
|
|
422
|
+
);
|
|
418
423
|
|
|
419
424
|
if (sending) {
|
|
420
425
|
const type = "NFT_OUT";
|
|
@@ -8,6 +8,7 @@ import type { TransactionMode, ModeModule } from "./modules";
|
|
|
8
8
|
import type { Range, RangeRaw } from "../../range";
|
|
9
9
|
import type { CryptoCurrency } from "../../types";
|
|
10
10
|
import type { DerivationMode } from "../../derivation";
|
|
11
|
+
|
|
11
12
|
export type EthereumGasLimitRequest = {
|
|
12
13
|
from?: string;
|
|
13
14
|
to?: string;
|
|
@@ -91,9 +92,3 @@ export type TypedMessageData = {
|
|
|
91
92
|
stringHash: string;
|
|
92
93
|
};
|
|
93
94
|
};
|
|
94
|
-
//
|
|
95
|
-
export type CoreStatics = Record<string, never>;
|
|
96
|
-
export type CoreAccountSpecifics = Record<string, never>;
|
|
97
|
-
export type CoreOperationSpecifics = Record<string, never>;
|
|
98
|
-
export type CoreCurrencySpecifics = Record<string, never>;
|
|
99
|
-
export const reflect = (_declare: any) => {};
|
|
@@ -38,9 +38,3 @@ export type TransactionRaw = TransactionCommonRaw & {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
export type BroadcastFnSignature = (arg0: BroadcastArg0) => Promise<Operation>;
|
|
41
|
-
|
|
42
|
-
export type CoreStatics = Record<string, never>;
|
|
43
|
-
export type CoreAccountSpecifics = Record<string, never>;
|
|
44
|
-
export type CoreOperationSpecifics = Record<string, never>;
|
|
45
|
-
export type CoreCurrencySpecifics = Record<string, never>;
|
|
46
|
-
export const reflect = (_declare: any) => {};
|
|
@@ -2,10 +2,7 @@ import type {
|
|
|
2
2
|
TransactionCommon,
|
|
3
3
|
TransactionCommonRaw,
|
|
4
4
|
} from "../../types/transaction";
|
|
5
|
-
|
|
6
|
-
export type CoreAccountSpecifics = Record<string, never>;
|
|
7
|
-
export type CoreOperationSpecifics = Record<string, never>;
|
|
8
|
-
export type CoreCurrencySpecifics = Record<string, never>;
|
|
5
|
+
|
|
9
6
|
export type NetworkInfo = {
|
|
10
7
|
family: "neo";
|
|
11
8
|
};
|
|
@@ -18,4 +15,3 @@ export type Transaction = TransactionCommon & {
|
|
|
18
15
|
export type TransactionRaw = TransactionCommonRaw & {
|
|
19
16
|
family: "neo";
|
|
20
17
|
};
|
|
21
|
-
export const reflect = (_declare: any) => {};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { setup } from "../../__tests__/test-helpers/libcore-setup";
|
|
2
|
+
import { testBridge } from "../../__tests__/test-helpers/bridge";
|
|
3
|
+
import dataset from "./test-dataset";
|
|
4
|
+
import { disconnect } from "./api";
|
|
5
|
+
import { BigNumber } from "bignumber.js";
|
|
6
|
+
import { canUnbond, MAX_UNLOCKINGS } from "./logic";
|
|
7
|
+
import type { Account } from "../../types";
|
|
8
|
+
|
|
9
|
+
// Disconnect all api clients that could be open.
|
|
10
|
+
afterAll(async () => {
|
|
11
|
+
await disconnect();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
setup("polkadot");
|
|
15
|
+
testBridge("polkadot", dataset);
|
|
16
|
+
|
|
17
|
+
describe("canUnbond", () => {
|
|
18
|
+
test("can unbond", () => {
|
|
19
|
+
const account: Partial<Account> = {
|
|
20
|
+
polkadotResources: {
|
|
21
|
+
controller: "",
|
|
22
|
+
stash: "",
|
|
23
|
+
nonce: 0,
|
|
24
|
+
numSlashingSpans: 0,
|
|
25
|
+
lockedBalance: new BigNumber(10000),
|
|
26
|
+
unlockedBalance: new BigNumber(0),
|
|
27
|
+
unlockingBalance: new BigNumber(0),
|
|
28
|
+
nominations: [],
|
|
29
|
+
unlockings: [
|
|
30
|
+
...Array(MAX_UNLOCKINGS - 1).map(() => ({
|
|
31
|
+
amount: new BigNumber(Math.random()),
|
|
32
|
+
completionDate: new Date(),
|
|
33
|
+
})),
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
expect(canUnbond(account as Account)).toBeTruthy();
|
|
38
|
+
});
|
|
39
|
+
test("can't unbond because unlockings is too much", () => {
|
|
40
|
+
const account: Partial<Account> = {
|
|
41
|
+
polkadotResources: {
|
|
42
|
+
controller: "",
|
|
43
|
+
stash: "",
|
|
44
|
+
nonce: 0,
|
|
45
|
+
numSlashingSpans: 0,
|
|
46
|
+
lockedBalance: new BigNumber(1000000),
|
|
47
|
+
unlockedBalance: new BigNumber(0),
|
|
48
|
+
unlockingBalance: new BigNumber(0),
|
|
49
|
+
nominations: [],
|
|
50
|
+
unlockings: [
|
|
51
|
+
...Array(MAX_UNLOCKINGS).map(() => ({
|
|
52
|
+
amount: new BigNumber(Math.random()),
|
|
53
|
+
completionDate: new Date(),
|
|
54
|
+
})),
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
expect(canUnbond(account as Account)).toBeFalsy();
|
|
59
|
+
});
|
|
60
|
+
test("can't unbond because not enough lockedBalance", () => {
|
|
61
|
+
const account: Partial<Account> = {
|
|
62
|
+
polkadotResources: {
|
|
63
|
+
controller: "",
|
|
64
|
+
stash: "",
|
|
65
|
+
nonce: 0,
|
|
66
|
+
numSlashingSpans: 0,
|
|
67
|
+
lockedBalance: new BigNumber(100),
|
|
68
|
+
unlockedBalance: new BigNumber(0),
|
|
69
|
+
unlockingBalance: new BigNumber(100),
|
|
70
|
+
nominations: [],
|
|
71
|
+
unlockings: [
|
|
72
|
+
...Array(MAX_UNLOCKINGS).map(() => ({
|
|
73
|
+
amount: new BigNumber(Math.random()),
|
|
74
|
+
completionDate: new Date(),
|
|
75
|
+
})),
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
expect(canUnbond(account as Account)).toBeFalsy();
|
|
80
|
+
});
|
|
81
|
+
});
|
|
@@ -3,10 +3,7 @@ import type {
|
|
|
3
3
|
TransactionCommon,
|
|
4
4
|
TransactionCommonRaw,
|
|
5
5
|
} from "../../types/transaction";
|
|
6
|
-
|
|
7
|
-
export type CoreAccountSpecifics = Record<string, never>;
|
|
8
|
-
export type CoreOperationSpecifics = Record<string, never>;
|
|
9
|
-
export type CoreCurrencySpecifics = Record<string, never>;
|
|
6
|
+
|
|
10
7
|
export type RewardDestinationType =
|
|
11
8
|
| "Staked"
|
|
12
9
|
| "Stash"
|
|
@@ -107,4 +104,3 @@ export type PolkadotPreloadData = {
|
|
|
107
104
|
export type PolkadotSearchFilter = (
|
|
108
105
|
query: string
|
|
109
106
|
) => (validator: PolkadotValidator) => boolean;
|
|
110
|
-
export const reflect = (_declare: any): void => {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { setup } from "../../__tests__/test-helpers/libcore-setup";
|
|
2
|
+
import { testBridge } from "../../__tests__/test-helpers/bridge";
|
|
3
|
+
import dataset from "./test-dataset";
|
|
4
|
+
import { disconnect } from "../../api/Ripple";
|
|
5
|
+
|
|
6
|
+
// Disconnect all api clients that could be open.
|
|
7
|
+
afterAll(async () => {
|
|
8
|
+
await disconnect();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
setup("ripple");
|
|
12
|
+
testBridge("ripple", dataset);
|
|
@@ -4,65 +4,7 @@ import type {
|
|
|
4
4
|
TransactionCommon,
|
|
5
5
|
TransactionCommonRaw,
|
|
6
6
|
} from "../../types/transaction";
|
|
7
|
-
import type { CoreAmount, CoreBigInt, Spec } from "../../libcore/types";
|
|
8
7
|
|
|
9
|
-
declare class CoreRippleLikeAddress {
|
|
10
|
-
toBase58(): Promise<string>;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
declare class CoreRippleLikeTransaction {
|
|
14
|
-
getHash(): Promise<string>;
|
|
15
|
-
getFees(): Promise<CoreAmount>;
|
|
16
|
-
getReceiver(): Promise<CoreRippleLikeAddress>;
|
|
17
|
-
getSender(): Promise<CoreRippleLikeAddress>;
|
|
18
|
-
serialize(): Promise<string>;
|
|
19
|
-
setSignature(arg0: string, arg1: string): Promise<void>;
|
|
20
|
-
setDERSignature(arg0: string): Promise<void>;
|
|
21
|
-
getDestinationTag(): Promise<number | null | undefined>;
|
|
22
|
-
getSequence(): Promise<CoreBigInt>;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
declare class CoreRippleLikeOperation {
|
|
26
|
-
getTransaction(): Promise<CoreRippleLikeTransaction>;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
declare class CoreRippleLikeTransactionBuilder {
|
|
30
|
-
wipeToAddress(address: string): Promise<void>;
|
|
31
|
-
sendToAddress(amount: CoreAmount, recipient: string): Promise<void>;
|
|
32
|
-
setDestinationTag(tag: number): Promise<void>;
|
|
33
|
-
setFees(fees: CoreAmount): Promise<void>;
|
|
34
|
-
build(): Promise<CoreRippleLikeTransaction>;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
declare class CoreRippleLikeAccount {
|
|
38
|
-
buildTransaction(): Promise<CoreRippleLikeTransactionBuilder>;
|
|
39
|
-
broadcastRawTransaction(signed: string): Promise<string>;
|
|
40
|
-
getFees(): Promise<CoreAmount>;
|
|
41
|
-
getBaseReserve(): Promise<CoreAmount>;
|
|
42
|
-
isAddressActivated(address: string): Promise<boolean>;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export type CoreStatics = {
|
|
46
|
-
RippleLikeOperation: CoreRippleLikeOperation;
|
|
47
|
-
RippleLikeAddress: CoreRippleLikeAddress;
|
|
48
|
-
RippleLikeTransaction: CoreRippleLikeTransaction;
|
|
49
|
-
RippleLikeAccount: CoreRippleLikeAccount;
|
|
50
|
-
RippleLikeTransactionBuilder: CoreRippleLikeTransactionBuilder;
|
|
51
|
-
};
|
|
52
|
-
export type {
|
|
53
|
-
CoreRippleLikeAccount,
|
|
54
|
-
CoreRippleLikeAddress,
|
|
55
|
-
CoreRippleLikeOperation,
|
|
56
|
-
CoreRippleLikeTransaction,
|
|
57
|
-
CoreRippleLikeTransactionBuilder,
|
|
58
|
-
};
|
|
59
|
-
export type CoreAccountSpecifics = {
|
|
60
|
-
asRippleLikeAccount(): Promise<CoreRippleLikeAccount>;
|
|
61
|
-
};
|
|
62
|
-
export type CoreOperationSpecifics = {
|
|
63
|
-
asRippleLikeOperation(): Promise<CoreRippleLikeOperation>;
|
|
64
|
-
};
|
|
65
|
-
export type CoreCurrencySpecifics = Record<string, never>;
|
|
66
8
|
export type NetworkInfo = {
|
|
67
9
|
family: "ripple";
|
|
68
10
|
serverFee: BigNumber;
|
|
@@ -87,88 +29,3 @@ export type TransactionRaw = TransactionCommonRaw & {
|
|
|
87
29
|
tag: number | null | undefined;
|
|
88
30
|
feeCustomUnit: Unit | null | undefined;
|
|
89
31
|
};
|
|
90
|
-
export const reflect = (declare: (arg0: string, arg1: Spec) => void) => {
|
|
91
|
-
declare("RippleLikeAddress", {
|
|
92
|
-
methods: {
|
|
93
|
-
toBase58: {},
|
|
94
|
-
},
|
|
95
|
-
});
|
|
96
|
-
declare("RippleLikeOperation", {
|
|
97
|
-
methods: {
|
|
98
|
-
getTransaction: {
|
|
99
|
-
returns: "RippleLikeTransaction",
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
});
|
|
103
|
-
declare("RippleLikeTransaction", {
|
|
104
|
-
methods: {
|
|
105
|
-
getHash: {},
|
|
106
|
-
getDestinationTag: {},
|
|
107
|
-
getSequence: {
|
|
108
|
-
returns: "BigInt",
|
|
109
|
-
},
|
|
110
|
-
getFees: {
|
|
111
|
-
returns: "Amount",
|
|
112
|
-
},
|
|
113
|
-
getReceiver: {
|
|
114
|
-
returns: "RippleLikeAddress",
|
|
115
|
-
},
|
|
116
|
-
getSender: {
|
|
117
|
-
returns: "RippleLikeAddress",
|
|
118
|
-
},
|
|
119
|
-
serialize: {
|
|
120
|
-
returns: "hex",
|
|
121
|
-
},
|
|
122
|
-
setSignature: {
|
|
123
|
-
params: ["hex", "hex"],
|
|
124
|
-
},
|
|
125
|
-
setDERSignature: {
|
|
126
|
-
params: ["hex"],
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
});
|
|
130
|
-
declare("RippleLikeTransactionBuilder", {
|
|
131
|
-
methods: {
|
|
132
|
-
wipeToAddress: {},
|
|
133
|
-
sendToAddress: {
|
|
134
|
-
params: ["Amount"],
|
|
135
|
-
},
|
|
136
|
-
setFees: {
|
|
137
|
-
params: ["Amount"],
|
|
138
|
-
},
|
|
139
|
-
setDestinationTag: {},
|
|
140
|
-
build: {
|
|
141
|
-
returns: "RippleLikeTransaction",
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
});
|
|
145
|
-
declare("RippleLikeAccount", {
|
|
146
|
-
methods: {
|
|
147
|
-
buildTransaction: {
|
|
148
|
-
returns: "RippleLikeTransactionBuilder",
|
|
149
|
-
},
|
|
150
|
-
broadcastRawTransaction: {
|
|
151
|
-
params: ["hex"],
|
|
152
|
-
},
|
|
153
|
-
getFees: {
|
|
154
|
-
returns: "Amount",
|
|
155
|
-
},
|
|
156
|
-
getBaseReserve: {
|
|
157
|
-
returns: "Amount",
|
|
158
|
-
},
|
|
159
|
-
isAddressActivated: {},
|
|
160
|
-
},
|
|
161
|
-
});
|
|
162
|
-
return {
|
|
163
|
-
OperationMethods: {
|
|
164
|
-
asRippleLikeOperation: {
|
|
165
|
-
returns: "RippleLikeOperation",
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
AccountMethods: {
|
|
169
|
-
asRippleLikeAccount: {
|
|
170
|
-
returns: "RippleLikeAccount",
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
};
|
|
174
|
-
};
|