@bitgo/account-lib 3.0.0-hotfix.0 → 3.0.0
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/.mocharc.js +1 -1
- package/CHANGELOG.md +192 -30
- package/README.md +5 -7
- package/dist/resources/README.md +0 -22
- package/dist/src/index.d.ts +34 -20
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +57 -40
- package/dist/tsconfig.tsbuildinfo +25937 -40830
- package/package.json +29 -77
- package/resources/README.md +0 -22
- package/dist/browser/bitgo-account-lib.js +0 -2
- package/dist/browser/bitgo-account-lib.js.LICENSE.txt +0 -335
- package/dist/resources/hbar/protobuf/BasicTypes.proto +0 -424
- package/dist/resources/hbar/protobuf/CryptoCreate.proto +0 -47
- package/dist/resources/hbar/protobuf/CryptoTransfer.proto +0 -33
- package/dist/resources/hbar/protobuf/Duration.proto +0 -28
- package/dist/resources/hbar/protobuf/Timestamp.proto +0 -34
- package/dist/resources/hbar/protobuf/Transaction.proto +0 -35
- package/dist/resources/hbar/protobuf/TransactionBody.proto +0 -24
- package/dist/resources/hbar/protobuf/TransactionContents.proto +0 -33
- package/dist/resources/hbar/protobuf/hedera.d.ts +0 -4612
- package/dist/resources/hbar/protobuf/hedera.js +0 -12192
- package/dist/resources/trx/protobuf/Contract.proto +0 -256
- package/dist/resources/trx/protobuf/Discover.proto +0 -44
- package/dist/resources/trx/protobuf/tron.d.ts +0 -11024
- package/dist/resources/trx/protobuf/tron.js +0 -31510
- package/dist/resources/trx/protobuf/tron.proto +0 -677
- package/dist/src/coin/algo/assetTransferBuilder.d.ts +0 -42
- package/dist/src/coin/algo/assetTransferBuilder.d.ts.map +0 -1
- package/dist/src/coin/algo/assetTransferBuilder.js +0 -105
- package/dist/src/coin/algo/errors.d.ts +0 -11
- package/dist/src/coin/algo/errors.d.ts.map +0 -1
- package/dist/src/coin/algo/errors.js +0 -27
- package/dist/src/coin/algo/ifaces.d.ts +0 -46
- package/dist/src/coin/algo/ifaces.d.ts.map +0 -1
- package/dist/src/coin/algo/ifaces.js +0 -3
- package/dist/src/coin/algo/index.d.ts +0 -13
- package/dist/src/coin/algo/index.d.ts.map +0 -1
- package/dist/src/coin/algo/index.js +0 -47
- package/dist/src/coin/algo/keyPair.d.ts +0 -25
- package/dist/src/coin/algo/keyPair.d.ts.map +0 -1
- package/dist/src/coin/algo/keyPair.js +0 -77
- package/dist/src/coin/algo/keyRegistrationBuilder.d.ts +0 -104
- package/dist/src/coin/algo/keyRegistrationBuilder.d.ts.map +0 -1
- package/dist/src/coin/algo/keyRegistrationBuilder.js +0 -239
- package/dist/src/coin/algo/seedEncoding.d.ts +0 -25
- package/dist/src/coin/algo/seedEncoding.d.ts.map +0 -1
- package/dist/src/coin/algo/seedEncoding.js +0 -97
- package/dist/src/coin/algo/transaction.d.ts +0 -75
- package/dist/src/coin/algo/transaction.d.ts.map +0 -1
- package/dist/src/coin/algo/transaction.js +0 -251
- package/dist/src/coin/algo/transactionBuilder.d.ts +0 -204
- package/dist/src/coin/algo/transactionBuilder.d.ts.map +0 -1
- package/dist/src/coin/algo/transactionBuilder.js +0 -373
- package/dist/src/coin/algo/transactionBuilderFactory.d.ts +0 -16
- package/dist/src/coin/algo/transactionBuilderFactory.d.ts.map +0 -1
- package/dist/src/coin/algo/transactionBuilderFactory.js +0 -52
- package/dist/src/coin/algo/transferBuilder.d.ts +0 -40
- package/dist/src/coin/algo/transferBuilder.d.ts.map +0 -1
- package/dist/src/coin/algo/transferBuilder.js +0 -89
- package/dist/src/coin/algo/txnSchema.d.ts +0 -7
- package/dist/src/coin/algo/txnSchema.d.ts.map +0 -1
- package/dist/src/coin/algo/txnSchema.js +0 -68
- package/dist/src/coin/algo/utils.d.ts +0 -249
- package/dist/src/coin/algo/utils.d.ts.map +0 -1
- package/dist/src/coin/algo/utils.js +0 -539
- package/dist/src/coin/avaxc/index.d.ts +0 -8
- package/dist/src/coin/avaxc/index.d.ts.map +0 -1
- package/dist/src/coin/avaxc/index.js +0 -35
- package/dist/src/coin/avaxc/keyPair.d.ts +0 -26
- package/dist/src/coin/avaxc/keyPair.d.ts.map +0 -1
- package/dist/src/coin/avaxc/keyPair.js +0 -83
- package/dist/src/coin/avaxc/resources.d.ts +0 -12
- package/dist/src/coin/avaxc/resources.d.ts.map +0 -1
- package/dist/src/coin/avaxc/resources.js +0 -27
- package/dist/src/coin/avaxc/transactionBuilder.d.ts +0 -17
- package/dist/src/coin/avaxc/transactionBuilder.d.ts.map +0 -1
- package/dist/src/coin/avaxc/transactionBuilder.js +0 -45
- package/dist/src/coin/avaxc/transferBuilder.d.ts +0 -17
- package/dist/src/coin/avaxc/transferBuilder.d.ts.map +0 -1
- package/dist/src/coin/avaxc/transferBuilder.js +0 -25
- package/dist/src/coin/avaxc/utils.d.ts +0 -39
- package/dist/src/coin/avaxc/utils.d.ts.map +0 -1
- package/dist/src/coin/avaxc/utils.js +0 -70
- package/dist/src/coin/avaxc/walletUtil.d.ts +0 -22
- package/dist/src/coin/avaxc/walletUtil.d.ts.map +0 -1
- package/dist/src/coin/avaxc/walletUtil.js +0 -62
- package/dist/src/coin/baseCoin/baseKeyPair.d.ts +0 -27
- package/dist/src/coin/baseCoin/baseKeyPair.d.ts.map +0 -1
- package/dist/src/coin/baseCoin/baseKeyPair.js +0 -3
- package/dist/src/coin/baseCoin/baseTransaction.d.ts +0 -71
- package/dist/src/coin/baseCoin/baseTransaction.d.ts.map +0 -1
- package/dist/src/coin/baseCoin/baseTransaction.js +0 -94
- package/dist/src/coin/baseCoin/baseTransactionBuilder.d.ts +0 -128
- package/dist/src/coin/baseCoin/baseTransactionBuilder.d.ts.map +0 -1
- package/dist/src/coin/baseCoin/baseTransactionBuilder.js +0 -179
- package/dist/src/coin/baseCoin/baseTransactionBuilderFactory.d.ts +0 -30
- package/dist/src/coin/baseCoin/baseTransactionBuilderFactory.d.ts.map +0 -1
- package/dist/src/coin/baseCoin/baseTransactionBuilderFactory.js +0 -20
- package/dist/src/coin/baseCoin/baseUtils.d.ts +0 -45
- package/dist/src/coin/baseCoin/baseUtils.d.ts.map +0 -1
- package/dist/src/coin/baseCoin/baseUtils.js +0 -3
- package/dist/src/coin/baseCoin/blsKeyPair.d.ts +0 -75
- package/dist/src/coin/baseCoin/blsKeyPair.d.ts.map +0 -1
- package/dist/src/coin/baseCoin/blsKeyPair.js +0 -232
- package/dist/src/coin/baseCoin/ed25519KeyPair.d.ts +0 -50
- package/dist/src/coin/baseCoin/ed25519KeyPair.d.ts.map +0 -1
- package/dist/src/coin/baseCoin/ed25519KeyPair.js +0 -141
- package/dist/src/coin/baseCoin/enum.d.ts +0 -43
- package/dist/src/coin/baseCoin/enum.d.ts.map +0 -1
- package/dist/src/coin/baseCoin/enum.js +0 -70
- package/dist/src/coin/baseCoin/errors.d.ts +0 -65
- package/dist/src/coin/baseCoin/errors.d.ts.map +0 -1
- package/dist/src/coin/baseCoin/errors.js +0 -156
- package/dist/src/coin/baseCoin/iface.d.ts +0 -162
- package/dist/src/coin/baseCoin/iface.d.ts.map +0 -1
- package/dist/src/coin/baseCoin/iface.js +0 -38
- package/dist/src/coin/baseCoin/index.d.ts +0 -12
- package/dist/src/coin/baseCoin/index.d.ts.map +0 -1
- package/dist/src/coin/baseCoin/index.js +0 -41
- package/dist/src/coin/baseCoin/secp256k1ExtendedKeyPair.d.ts +0 -55
- package/dist/src/coin/baseCoin/secp256k1ExtendedKeyPair.d.ts.map +0 -1
- package/dist/src/coin/baseCoin/secp256k1ExtendedKeyPair.js +0 -124
- package/dist/src/coin/celo/index.d.ts +0 -8
- package/dist/src/coin/celo/index.d.ts.map +0 -1
- package/dist/src/coin/celo/index.js +0 -35
- package/dist/src/coin/celo/resources.d.ts +0 -10
- package/dist/src/coin/celo/resources.d.ts.map +0 -1
- package/dist/src/coin/celo/resources.js +0 -26
- package/dist/src/coin/celo/stakingBuilder.d.ts +0 -91
- package/dist/src/coin/celo/stakingBuilder.d.ts.map +0 -1
- package/dist/src/coin/celo/stakingBuilder.js +0 -277
- package/dist/src/coin/celo/stakingCall.d.ts +0 -7
- package/dist/src/coin/celo/stakingCall.d.ts.map +0 -1
- package/dist/src/coin/celo/stakingCall.js +0 -13
- package/dist/src/coin/celo/stakingUtils.d.ts +0 -15
- package/dist/src/coin/celo/stakingUtils.d.ts.map +0 -1
- package/dist/src/coin/celo/stakingUtils.js +0 -98
- package/dist/src/coin/celo/transaction.d.ts +0 -10
- package/dist/src/coin/celo/transaction.d.ts.map +0 -1
- package/dist/src/coin/celo/transaction.js +0 -37
- package/dist/src/coin/celo/transactionBuilder.d.ts +0 -86
- package/dist/src/coin/celo/transactionBuilder.d.ts.map +0 -1
- package/dist/src/coin/celo/transactionBuilder.js +0 -228
- package/dist/src/coin/celo/transferBuilder.d.ts +0 -19
- package/dist/src/coin/celo/transferBuilder.d.ts.map +0 -1
- package/dist/src/coin/celo/transferBuilder.js +0 -27
- package/dist/src/coin/celo/types.d.ts +0 -52
- package/dist/src/coin/celo/types.d.ts.map +0 -1
- package/dist/src/coin/celo/types.js +0 -222
- package/dist/src/coin/celo/utils.d.ts +0 -18
- package/dist/src/coin/celo/utils.d.ts.map +0 -1
- package/dist/src/coin/celo/utils.js +0 -99
- package/dist/src/coin/cspr/constants.d.ts +0 -19
- package/dist/src/coin/cspr/constants.d.ts.map +0 -1
- package/dist/src/coin/cspr/constants.js +0 -28
- package/dist/src/coin/cspr/delegateBuilder.d.ts +0 -49
- package/dist/src/coin/cspr/delegateBuilder.d.ts.map +0 -1
- package/dist/src/coin/cspr/delegateBuilder.js +0 -111
- package/dist/src/coin/cspr/ifaces.d.ts +0 -69
- package/dist/src/coin/cspr/ifaces.d.ts.map +0 -1
- package/dist/src/coin/cspr/ifaces.js +0 -3
- package/dist/src/coin/cspr/index.d.ts +0 -5
- package/dist/src/coin/cspr/index.d.ts.map +0 -1
- package/dist/src/coin/cspr/index.js +0 -29
- package/dist/src/coin/cspr/keyPair.d.ts +0 -18
- package/dist/src/coin/cspr/keyPair.d.ts.map +0 -1
- package/dist/src/coin/cspr/keyPair.js +0 -75
- package/dist/src/coin/cspr/transaction.d.ts +0 -55
- package/dist/src/coin/cspr/transaction.d.ts.map +0 -1
- package/dist/src/coin/cspr/transaction.js +0 -227
- package/dist/src/coin/cspr/transactionBuilder.d.ts +0 -124
- package/dist/src/coin/cspr/transactionBuilder.d.ts.map +0 -1
- package/dist/src/coin/cspr/transactionBuilder.js +0 -312
- package/dist/src/coin/cspr/transactionBuilderFactory.d.ts +0 -46
- package/dist/src/coin/cspr/transactionBuilderFactory.d.ts.map +0 -1
- package/dist/src/coin/cspr/transactionBuilderFactory.js +0 -98
- package/dist/src/coin/cspr/transferBuilder.d.ts +0 -39
- package/dist/src/coin/cspr/transferBuilder.d.ts.map +0 -1
- package/dist/src/coin/cspr/transferBuilder.js +0 -106
- package/dist/src/coin/cspr/undelegateBuilder.d.ts +0 -49
- package/dist/src/coin/cspr/undelegateBuilder.d.ts.map +0 -1
- package/dist/src/coin/cspr/undelegateBuilder.js +0 -111
- package/dist/src/coin/cspr/utils.d.ts +0 -188
- package/dist/src/coin/cspr/utils.d.ts.map +0 -1
- package/dist/src/coin/cspr/utils.js +0 -478
- package/dist/src/coin/cspr/walletInitializationBuilder.d.ts +0 -27
- package/dist/src/coin/cspr/walletInitializationBuilder.d.ts.map +0 -1
- package/dist/src/coin/cspr/walletInitializationBuilder.js +0 -95
- package/dist/src/coin/dot/addressInitializationBuilder.d.ts +0 -79
- package/dist/src/coin/dot/addressInitializationBuilder.d.ts.map +0 -1
- package/dist/src/coin/dot/addressInitializationBuilder.js +0 -182
- package/dist/src/coin/dot/batchTransactionBuilder.d.ts +0 -47
- package/dist/src/coin/dot/batchTransactionBuilder.d.ts.map +0 -1
- package/dist/src/coin/dot/batchTransactionBuilder.js +0 -122
- package/dist/src/coin/dot/claimBuilder.d.ts +0 -58
- package/dist/src/coin/dot/claimBuilder.d.ts.map +0 -1
- package/dist/src/coin/dot/claimBuilder.js +0 -117
- package/dist/src/coin/dot/errors.d.ts +0 -8
- package/dist/src/coin/dot/errors.d.ts.map +0 -1
- package/dist/src/coin/dot/errors.js +0 -19
- package/dist/src/coin/dot/iface.d.ts +0 -194
- package/dist/src/coin/dot/iface.d.ts.map +0 -1
- package/dist/src/coin/dot/iface.js +0 -39
- package/dist/src/coin/dot/index.d.ts +0 -17
- package/dist/src/coin/dot/index.d.ts.map +0 -1
- package/dist/src/coin/dot/index.js +0 -53
- package/dist/src/coin/dot/keyPair.d.ts +0 -31
- package/dist/src/coin/dot/keyPair.d.ts.map +0 -1
- package/dist/src/coin/dot/keyPair.js +0 -74
- package/dist/src/coin/dot/singletonRegistry.d.ts +0 -7
- package/dist/src/coin/dot/singletonRegistry.d.ts.map +0 -1
- package/dist/src/coin/dot/singletonRegistry.js +0 -20
- package/dist/src/coin/dot/stakingBuilder.d.ts +0 -58
- package/dist/src/coin/dot/stakingBuilder.d.ts.map +0 -1
- package/dist/src/coin/dot/stakingBuilder.js +0 -135
- package/dist/src/coin/dot/transaction.d.ts +0 -65
- package/dist/src/coin/dot/transaction.d.ts.map +0 -1
- package/dist/src/coin/dot/transaction.js +0 -396
- package/dist/src/coin/dot/transactionBuilder.d.ts +0 -131
- package/dist/src/coin/dot/transactionBuilder.d.ts.map +0 -1
- package/dist/src/coin/dot/transactionBuilder.js +0 -332
- package/dist/src/coin/dot/transactionBuilderFactory.d.ts +0 -26
- package/dist/src/coin/dot/transactionBuilderFactory.d.ts.map +0 -1
- package/dist/src/coin/dot/transactionBuilderFactory.js +0 -93
- package/dist/src/coin/dot/transferBuilder.d.ts +0 -71
- package/dist/src/coin/dot/transferBuilder.d.ts.map +0 -1
- package/dist/src/coin/dot/transferBuilder.js +0 -171
- package/dist/src/coin/dot/txnSchema.d.ts +0 -14
- package/dist/src/coin/dot/txnSchema.d.ts.map +0 -1
- package/dist/src/coin/dot/txnSchema.js +0 -104
- package/dist/src/coin/dot/unnominateBuilder.d.ts +0 -24
- package/dist/src/coin/dot/unnominateBuilder.d.ts.map +0 -1
- package/dist/src/coin/dot/unnominateBuilder.js +0 -50
- package/dist/src/coin/dot/unstakeBuilder.d.ts +0 -38
- package/dist/src/coin/dot/unstakeBuilder.d.ts.map +0 -1
- package/dist/src/coin/dot/unstakeBuilder.js +0 -89
- package/dist/src/coin/dot/utils.d.ts +0 -138
- package/dist/src/coin/dot/utils.d.ts.map +0 -1
- package/dist/src/coin/dot/utils.js +0 -269
- package/dist/src/coin/dot/withdrawUnstakedBuilder.d.ts +0 -38
- package/dist/src/coin/dot/withdrawUnstakedBuilder.d.ts.map +0 -1
- package/dist/src/coin/dot/withdrawUnstakedBuilder.js +0 -90
- package/dist/src/coin/etc/index.d.ts +0 -8
- package/dist/src/coin/etc/index.d.ts.map +0 -1
- package/dist/src/coin/etc/index.js +0 -35
- package/dist/src/coin/etc/resources.d.ts +0 -10
- package/dist/src/coin/etc/resources.d.ts.map +0 -1
- package/dist/src/coin/etc/resources.js +0 -26
- package/dist/src/coin/etc/transactionBuilder.d.ts +0 -17
- package/dist/src/coin/etc/transactionBuilder.d.ts.map +0 -1
- package/dist/src/coin/etc/transactionBuilder.js +0 -45
- package/dist/src/coin/etc/transferBuilder.d.ts +0 -19
- package/dist/src/coin/etc/transferBuilder.d.ts.map +0 -1
- package/dist/src/coin/etc/transferBuilder.js +0 -27
- package/dist/src/coin/etc/utils.d.ts +0 -18
- package/dist/src/coin/etc/utils.d.ts.map +0 -1
- package/dist/src/coin/etc/utils.js +0 -42
- package/dist/src/coin/eth/contractCall.d.ts +0 -8
- package/dist/src/coin/eth/contractCall.d.ts.map +0 -1
- package/dist/src/coin/eth/contractCall.js +0 -17
- package/dist/src/coin/eth/iface.d.ts +0 -122
- package/dist/src/coin/eth/iface.d.ts.map +0 -1
- package/dist/src/coin/eth/iface.js +0 -8
- package/dist/src/coin/eth/index.d.ts +0 -10
- package/dist/src/coin/eth/index.d.ts.map +0 -1
- package/dist/src/coin/eth/index.js +0 -39
- package/dist/src/coin/eth/keyPair.d.ts +0 -26
- package/dist/src/coin/eth/keyPair.d.ts.map +0 -1
- package/dist/src/coin/eth/keyPair.js +0 -85
- package/dist/src/coin/eth/transaction.d.ts +0 -64
- package/dist/src/coin/eth/transaction.d.ts.map +0 -1
- package/dist/src/coin/eth/transaction.js +0 -137
- package/dist/src/coin/eth/transactionBuilder.d.ts +0 -194
- package/dist/src/coin/eth/transactionBuilder.d.ts.map +0 -1
- package/dist/src/coin/eth/transactionBuilder.js +0 -624
- package/dist/src/coin/eth/transferBuilder/baseNFTTransferBuilder.d.ts +0 -47
- package/dist/src/coin/eth/transferBuilder/baseNFTTransferBuilder.d.ts.map +0 -1
- package/dist/src/coin/eth/transferBuilder/baseNFTTransferBuilder.js +0 -113
- package/dist/src/coin/eth/transferBuilder/transferBuilderERC1155.d.ts +0 -14
- package/dist/src/coin/eth/transferBuilder/transferBuilderERC1155.d.ts.map +0 -1
- package/dist/src/coin/eth/transferBuilder/transferBuilderERC1155.js +0 -83
- package/dist/src/coin/eth/transferBuilder/transferBuilderERC721.d.ts +0 -13
- package/dist/src/coin/eth/transferBuilder/transferBuilderERC721.d.ts.map +0 -1
- package/dist/src/coin/eth/transferBuilder/transferBuilderERC721.js +0 -68
- package/dist/src/coin/eth/transferBuilder.d.ts +0 -65
- package/dist/src/coin/eth/transferBuilder.d.ts.map +0 -1
- package/dist/src/coin/eth/transferBuilder.js +0 -197
- package/dist/src/coin/eth/types.d.ts +0 -39
- package/dist/src/coin/eth/types.d.ts.map +0 -1
- package/dist/src/coin/eth/types.js +0 -135
- package/dist/src/coin/eth/utils.d.ts +0 -202
- package/dist/src/coin/eth/utils.d.ts.map +0 -1
- package/dist/src/coin/eth/utils.js +0 -485
- package/dist/src/coin/eth/walletUtil.d.ts +0 -19
- package/dist/src/coin/eth/walletUtil.d.ts.map +0 -1
- package/dist/src/coin/eth/walletUtil.js +0 -29
- package/dist/src/coin/eth2/index.d.ts +0 -2
- package/dist/src/coin/eth2/index.d.ts.map +0 -1
- package/dist/src/coin/eth2/index.js +0 -6
- package/dist/src/coin/eth2/keyPair.d.ts +0 -33
- package/dist/src/coin/eth2/keyPair.d.ts.map +0 -1
- package/dist/src/coin/eth2/keyPair.js +0 -65
- package/dist/src/coin/hbar/ifaces.d.ts +0 -26
- package/dist/src/coin/hbar/ifaces.d.ts.map +0 -1
- package/dist/src/coin/hbar/ifaces.js +0 -3
- package/dist/src/coin/hbar/index.d.ts +0 -6
- package/dist/src/coin/hbar/index.d.ts.map +0 -1
- package/dist/src/coin/hbar/index.js +0 -31
- package/dist/src/coin/hbar/keyPair.d.ts +0 -23
- package/dist/src/coin/hbar/keyPair.d.ts.map +0 -1
- package/dist/src/coin/hbar/keyPair.js +0 -70
- package/dist/src/coin/hbar/transaction.d.ts +0 -98
- package/dist/src/coin/hbar/transaction.d.ts.map +0 -1
- package/dist/src/coin/hbar/transaction.js +0 -245
- package/dist/src/coin/hbar/transactionBuilder.d.ts +0 -112
- package/dist/src/coin/hbar/transactionBuilder.d.ts.map +0 -1
- package/dist/src/coin/hbar/transactionBuilder.js +0 -264
- package/dist/src/coin/hbar/transactionBuilderFactory.d.ts +0 -37
- package/dist/src/coin/hbar/transactionBuilderFactory.d.ts.map +0 -1
- package/dist/src/coin/hbar/transactionBuilderFactory.js +0 -77
- package/dist/src/coin/hbar/transferBuilder.d.ts +0 -44
- package/dist/src/coin/hbar/transferBuilder.d.ts.map +0 -1
- package/dist/src/coin/hbar/transferBuilder.js +0 -130
- package/dist/src/coin/hbar/utils.d.ts +0 -139
- package/dist/src/coin/hbar/utils.d.ts.map +0 -1
- package/dist/src/coin/hbar/utils.js +0 -310
- package/dist/src/coin/hbar/walletInitializationBuilder.d.ts +0 -28
- package/dist/src/coin/hbar/walletInitializationBuilder.d.ts.map +0 -1
- package/dist/src/coin/hbar/walletInitializationBuilder.js +0 -90
- package/dist/src/coin/near/constants.d.ts +0 -12
- package/dist/src/coin/near/constants.d.ts.map +0 -1
- package/dist/src/coin/near/constants.js +0 -15
- package/dist/src/coin/near/contractCallWrapper.d.ts +0 -33
- package/dist/src/coin/near/contractCallWrapper.d.ts.map +0 -1
- package/dist/src/coin/near/contractCallWrapper.js +0 -68
- package/dist/src/coin/near/errors.d.ts +0 -5
- package/dist/src/coin/near/errors.d.ts.map +0 -1
- package/dist/src/coin/near/errors.js +0 -12
- package/dist/src/coin/near/iface.d.ts +0 -40
- package/dist/src/coin/near/iface.d.ts.map +0 -1
- package/dist/src/coin/near/iface.js +0 -8
- package/dist/src/coin/near/index.d.ts +0 -11
- package/dist/src/coin/near/index.d.ts.map +0 -1
- package/dist/src/coin/near/index.js +0 -41
- package/dist/src/coin/near/keyPair.d.ts +0 -25
- package/dist/src/coin/near/keyPair.d.ts.map +0 -1
- package/dist/src/coin/near/keyPair.js +0 -73
- package/dist/src/coin/near/stakingActivateBuilder.d.ts +0 -32
- package/dist/src/coin/near/stakingActivateBuilder.d.ts.map +0 -1
- package/dist/src/coin/near/stakingActivateBuilder.js +0 -90
- package/dist/src/coin/near/stakingDeactivateBuilder.d.ts +0 -32
- package/dist/src/coin/near/stakingDeactivateBuilder.d.ts.map +0 -1
- package/dist/src/coin/near/stakingDeactivateBuilder.js +0 -89
- package/dist/src/coin/near/stakingWithdrawBuilder.d.ts +0 -32
- package/dist/src/coin/near/stakingWithdrawBuilder.d.ts.map +0 -1
- package/dist/src/coin/near/stakingWithdrawBuilder.js +0 -89
- package/dist/src/coin/near/transaction.d.ts +0 -90
- package/dist/src/coin/near/transaction.d.ts.map +0 -1
- package/dist/src/coin/near/transaction.js +0 -368
- package/dist/src/coin/near/transactionBuilder.d.ts +0 -89
- package/dist/src/coin/near/transactionBuilder.d.ts.map +0 -1
- package/dist/src/coin/near/transactionBuilder.js +0 -216
- package/dist/src/coin/near/transactionBuilderFactory.d.ts +0 -30
- package/dist/src/coin/near/transactionBuilderFactory.d.ts.map +0 -1
- package/dist/src/coin/near/transactionBuilderFactory.js +0 -71
- package/dist/src/coin/near/transferBuilder.d.ts +0 -26
- package/dist/src/coin/near/transferBuilder.d.ts.map +0 -1
- package/dist/src/coin/near/transferBuilder.js +0 -72
- package/dist/src/coin/near/utils.d.ts +0 -42
- package/dist/src/coin/near/utils.d.ts.map +0 -1
- package/dist/src/coin/near/utils.js +0 -92
- package/dist/src/coin/near/walletInitializationBuilder.d.ts +0 -12
- package/dist/src/coin/near/walletInitializationBuilder.d.ts.map +0 -1
- package/dist/src/coin/near/walletInitializationBuilder.js +0 -20
- package/dist/src/coin/rbtc/index.d.ts +0 -8
- package/dist/src/coin/rbtc/index.d.ts.map +0 -1
- package/dist/src/coin/rbtc/index.js +0 -35
- package/dist/src/coin/rbtc/resources.d.ts +0 -10
- package/dist/src/coin/rbtc/resources.d.ts.map +0 -1
- package/dist/src/coin/rbtc/resources.js +0 -25
- package/dist/src/coin/rbtc/transactionBuilder.d.ts +0 -17
- package/dist/src/coin/rbtc/transactionBuilder.d.ts.map +0 -1
- package/dist/src/coin/rbtc/transactionBuilder.js +0 -44
- package/dist/src/coin/rbtc/transferBuilder.d.ts +0 -19
- package/dist/src/coin/rbtc/transferBuilder.d.ts.map +0 -1
- package/dist/src/coin/rbtc/transferBuilder.js +0 -27
- package/dist/src/coin/rbtc/utils.d.ts +0 -18
- package/dist/src/coin/rbtc/utils.d.ts.map +0 -1
- package/dist/src/coin/rbtc/utils.js +0 -42
- package/dist/src/coin/sol/ataInitializationBuilder.d.ts +0 -33
- package/dist/src/coin/sol/ataInitializationBuilder.d.ts.map +0 -1
- package/dist/src/coin/sol/ataInitializationBuilder.js +0 -93
- package/dist/src/coin/sol/ataInitializationTransaction.d.ts +0 -14
- package/dist/src/coin/sol/ataInitializationTransaction.d.ts.map +0 -1
- package/dist/src/coin/sol/ataInitializationTransaction.js +0 -81
- package/dist/src/coin/sol/constants.d.ts +0 -58
- package/dist/src/coin/sol/constants.d.ts.map +0 -1
- package/dist/src/coin/sol/constants.js +0 -76
- package/dist/src/coin/sol/iface.d.ts +0 -99
- package/dist/src/coin/sol/iface.d.ts.map +0 -1
- package/dist/src/coin/sol/iface.js +0 -3
- package/dist/src/coin/sol/index.d.ts +0 -11
- package/dist/src/coin/sol/index.d.ts.map +0 -1
- package/dist/src/coin/sol/index.js +0 -41
- package/dist/src/coin/sol/instructionParamsFactory.d.ts +0 -12
- package/dist/src/coin/sol/instructionParamsFactory.d.ts.map +0 -1
- package/dist/src/coin/sol/instructionParamsFactory.js +0 -260
- package/dist/src/coin/sol/keyPair.d.ts +0 -26
- package/dist/src/coin/sol/keyPair.d.ts.map +0 -1
- package/dist/src/coin/sol/keyPair.js +0 -63
- package/dist/src/coin/sol/solInstructionFactory.d.ts +0 -10
- package/dist/src/coin/sol/solInstructionFactory.d.ts.map +0 -1
- package/dist/src/coin/sol/solInstructionFactory.js +0 -213
- package/dist/src/coin/sol/stakingActivateBuilder.d.ts +0 -41
- package/dist/src/coin/sol/stakingActivateBuilder.d.ts.map +0 -1
- package/dist/src/coin/sol/stakingActivateBuilder.js +0 -94
- package/dist/src/coin/sol/stakingDeactivateBuilder.d.ts +0 -23
- package/dist/src/coin/sol/stakingDeactivateBuilder.d.ts.map +0 -1
- package/dist/src/coin/sol/stakingDeactivateBuilder.js +0 -62
- package/dist/src/coin/sol/stakingWithdrawBuilder.d.ts +0 -31
- package/dist/src/coin/sol/stakingWithdrawBuilder.d.ts.map +0 -1
- package/dist/src/coin/sol/stakingWithdrawBuilder.js +0 -78
- package/dist/src/coin/sol/tokenEncodeDecode.d.ts +0 -85
- package/dist/src/coin/sol/tokenEncodeDecode.d.ts.map +0 -1
- package/dist/src/coin/sol/tokenEncodeDecode.js +0 -133
- package/dist/src/coin/sol/tokenTransferBuilder.d.ts +0 -27
- package/dist/src/coin/sol/tokenTransferBuilder.d.ts.map +0 -1
- package/dist/src/coin/sol/tokenTransferBuilder.js +0 -73
- package/dist/src/coin/sol/transaction.d.ts +0 -61
- package/dist/src/coin/sol/transaction.d.ts.map +0 -1
- package/dist/src/coin/sol/transaction.js +0 -369
- package/dist/src/coin/sol/transactionBuilder.d.ts +0 -101
- package/dist/src/coin/sol/transactionBuilder.d.ts.map +0 -1
- package/dist/src/coin/sol/transactionBuilder.js +0 -261
- package/dist/src/coin/sol/transactionBuilderFactory.d.ts +0 -76
- package/dist/src/coin/sol/transactionBuilderFactory.d.ts.map +0 -1
- package/dist/src/coin/sol/transactionBuilderFactory.js +0 -136
- package/dist/src/coin/sol/transferBuilder.d.ts +0 -26
- package/dist/src/coin/sol/transferBuilder.d.ts.map +0 -1
- package/dist/src/coin/sol/transferBuilder.js +0 -67
- package/dist/src/coin/sol/utils.d.ts +0 -146
- package/dist/src/coin/sol/utils.d.ts.map +0 -1
- package/dist/src/coin/sol/utils.js +0 -361
- package/dist/src/coin/sol/walletInitializationBuilder.d.ts +0 -26
- package/dist/src/coin/sol/walletInitializationBuilder.d.ts.map +0 -1
- package/dist/src/coin/sol/walletInitializationBuilder.js +0 -71
- package/dist/src/coin/stx/abstractContractBuilder.d.ts +0 -19
- package/dist/src/coin/stx/abstractContractBuilder.d.ts.map +0 -1
- package/dist/src/coin/stx/abstractContractBuilder.js +0 -70
- package/dist/src/coin/stx/constants.d.ts +0 -8
- package/dist/src/coin/stx/constants.d.ts.map +0 -1
- package/dist/src/coin/stx/constants.js +0 -19
- package/dist/src/coin/stx/contractBuilder.d.ts +0 -33
- package/dist/src/coin/stx/contractBuilder.d.ts.map +0 -1
- package/dist/src/coin/stx/contractBuilder.js +0 -116
- package/dist/src/coin/stx/iface.d.ts +0 -48
- package/dist/src/coin/stx/iface.d.ts.map +0 -1
- package/dist/src/coin/stx/iface.js +0 -3
- package/dist/src/coin/stx/index.d.ts +0 -6
- package/dist/src/coin/stx/index.d.ts.map +0 -1
- package/dist/src/coin/stx/index.js +0 -32
- package/dist/src/coin/stx/keyPair.d.ts +0 -55
- package/dist/src/coin/stx/keyPair.d.ts.map +0 -1
- package/dist/src/coin/stx/keyPair.js +0 -140
- package/dist/src/coin/stx/sendmanyBuilder.d.ts +0 -23
- package/dist/src/coin/stx/sendmanyBuilder.d.ts.map +0 -1
- package/dist/src/coin/stx/sendmanyBuilder.js +0 -75
- package/dist/src/coin/stx/transaction.d.ts +0 -49
- package/dist/src/coin/stx/transaction.d.ts.map +0 -1
- package/dist/src/coin/stx/transaction.js +0 -225
- package/dist/src/coin/stx/transactionBuilder.d.ts +0 -86
- package/dist/src/coin/stx/transactionBuilder.d.ts.map +0 -1
- package/dist/src/coin/stx/transactionBuilder.js +0 -263
- package/dist/src/coin/stx/transactionBuilderFactory.d.ts +0 -30
- package/dist/src/coin/stx/transactionBuilderFactory.d.ts.map +0 -1
- package/dist/src/coin/stx/transactionBuilderFactory.js +0 -81
- package/dist/src/coin/stx/transferBuilder.d.ts +0 -30
- package/dist/src/coin/stx/transferBuilder.d.ts.map +0 -1
- package/dist/src/coin/stx/transferBuilder.js +0 -99
- package/dist/src/coin/stx/utils.d.ts +0 -207
- package/dist/src/coin/stx/utils.d.ts.map +0 -1
- package/dist/src/coin/stx/utils.js +0 -504
- package/dist/src/coin/trx/address.d.ts +0 -11
- package/dist/src/coin/trx/address.d.ts.map +0 -1
- package/dist/src/coin/trx/address.js +0 -13
- package/dist/src/coin/trx/contractCallBuilder.d.ts +0 -96
- package/dist/src/coin/trx/contractCallBuilder.d.ts.map +0 -1
- package/dist/src/coin/trx/contractCallBuilder.js +0 -281
- package/dist/src/coin/trx/enum.d.ts +0 -23
- package/dist/src/coin/trx/enum.d.ts.map +0 -1
- package/dist/src/coin/trx/enum.js +0 -28
- package/dist/src/coin/trx/iface.d.ts +0 -92
- package/dist/src/coin/trx/iface.d.ts.map +0 -1
- package/dist/src/coin/trx/iface.js +0 -3
- package/dist/src/coin/trx/index.d.ts +0 -10
- package/dist/src/coin/trx/index.d.ts.map +0 -1
- package/dist/src/coin/trx/index.js +0 -39
- package/dist/src/coin/trx/keyPair.d.ts +0 -44
- package/dist/src/coin/trx/keyPair.d.ts.map +0 -1
- package/dist/src/coin/trx/keyPair.js +0 -121
- package/dist/src/coin/trx/transaction.d.ts +0 -74
- package/dist/src/coin/trx/transaction.d.ts.map +0 -1
- package/dist/src/coin/trx/transaction.js +0 -205
- package/dist/src/coin/trx/transactionBuilder.d.ts +0 -65
- package/dist/src/coin/trx/transactionBuilder.d.ts.map +0 -1
- package/dist/src/coin/trx/transactionBuilder.js +0 -215
- package/dist/src/coin/trx/utils.d.ts +0 -127
- package/dist/src/coin/trx/utils.d.ts.map +0 -1
- package/dist/src/coin/trx/utils.js +0 -369
- package/dist/src/coin/trx/wrappedBuilder.d.ts +0 -52
- package/dist/src/coin/trx/wrappedBuilder.d.ts.map +0 -1
- package/dist/src/coin/trx/wrappedBuilder.js +0 -104
- package/dist/src/coin/xrp/index.d.ts +0 -5
- package/dist/src/coin/xrp/index.d.ts.map +0 -1
- package/dist/src/coin/xrp/index.js +0 -29
- package/dist/src/coin/xrp/keyPair.d.ts +0 -10
- package/dist/src/coin/xrp/keyPair.d.ts.map +0 -1
- package/dist/src/coin/xrp/keyPair.js +0 -16
- package/dist/src/coin/xrp/transaction.d.ts +0 -10
- package/dist/src/coin/xrp/transaction.d.ts.map +0 -1
- package/dist/src/coin/xrp/transaction.js +0 -20
- package/dist/src/coin/xrp/transactionBuilder.d.ts +0 -27
- package/dist/src/coin/xrp/transactionBuilder.d.ts.map +0 -1
- package/dist/src/coin/xrp/transactionBuilder.js +0 -46
- package/dist/src/coin/xrp/transactionBuilderFactory.d.ts +0 -24
- package/dist/src/coin/xrp/transactionBuilderFactory.d.ts.map +0 -1
- package/dist/src/coin/xrp/transactionBuilderFactory.js +0 -38
- package/dist/src/coin/xrp/transferBuilder.d.ts +0 -14
- package/dist/src/coin/xrp/transferBuilder.d.ts.map +0 -1
- package/dist/src/coin/xrp/transferBuilder.js +0 -24
- package/dist/src/coin/xrp/utils.d.ts +0 -16
- package/dist/src/coin/xrp/utils.d.ts.map +0 -1
- package/dist/src/coin/xrp/utils.js +0 -32
- package/dist/src/coin/xrp/walletInitializationBuilder.d.ts +0 -14
- package/dist/src/coin/xrp/walletInitializationBuilder.d.ts.map +0 -1
- package/dist/src/coin/xrp/walletInitializationBuilder.js +0 -24
- package/dist/src/coin/xtz/address.d.ts +0 -8
- package/dist/src/coin/xtz/address.d.ts.map +0 -1
- package/dist/src/coin/xtz/address.js +0 -10
- package/dist/src/coin/xtz/iface.d.ts +0 -81
- package/dist/src/coin/xtz/iface.d.ts.map +0 -1
- package/dist/src/coin/xtz/iface.js +0 -3
- package/dist/src/coin/xtz/index.d.ts +0 -8
- package/dist/src/coin/xtz/index.d.ts.map +0 -1
- package/dist/src/coin/xtz/index.js +0 -37
- package/dist/src/coin/xtz/keyPair.d.ts +0 -40
- package/dist/src/coin/xtz/keyPair.d.ts.map +0 -1
- package/dist/src/coin/xtz/keyPair.js +0 -136
- package/dist/src/coin/xtz/multisigUtils.d.ts +0 -134
- package/dist/src/coin/xtz/multisigUtils.d.ts.map +0 -1
- package/dist/src/coin/xtz/multisigUtils.js +0 -1180
- package/dist/src/coin/xtz/transaction.d.ts +0 -119
- package/dist/src/coin/xtz/transaction.d.ts.map +0 -1
- package/dist/src/coin/xtz/transaction.js +0 -315
- package/dist/src/coin/xtz/transactionBuilder.d.ts +0 -171
- package/dist/src/coin/xtz/transactionBuilder.d.ts.map +0 -1
- package/dist/src/coin/xtz/transactionBuilder.js +0 -453
- package/dist/src/coin/xtz/transferBuilder.d.ts +0 -24
- package/dist/src/coin/xtz/transferBuilder.d.ts.map +0 -1
- package/dist/src/coin/xtz/transferBuilder.js +0 -64
- package/dist/src/coin/xtz/utils.d.ts +0 -265
- package/dist/src/coin/xtz/utils.d.ts.map +0 -1
- package/dist/src/coin/xtz/utils.js +0 -460
- package/dist/src/mpc/curves/baseCurve.d.ts +0 -18
- package/dist/src/mpc/curves/baseCurve.d.ts.map +0 -1
- package/dist/src/mpc/curves/baseCurve.js +0 -6
- package/dist/src/mpc/curves/ed25519.d.ts +0 -17
- package/dist/src/mpc/curves/ed25519.d.ts.map +0 -1
- package/dist/src/mpc/curves/ed25519.js +0 -48
- package/dist/src/mpc/curves/index.d.ts +0 -5
- package/dist/src/mpc/curves/index.d.ts.map +0 -1
- package/dist/src/mpc/curves/index.js +0 -6
- package/dist/src/mpc/curves/secp256k1.d.ts +0 -16
- package/dist/src/mpc/curves/secp256k1.d.ts.map +0 -1
- package/dist/src/mpc/curves/secp256k1.js +0 -66
- package/dist/src/mpc/hdTree.d.ts +0 -24
- package/dist/src/mpc/hdTree.d.ts.map +0 -1
- package/dist/src/mpc/hdTree.js +0 -94
- package/dist/src/mpc/shamir.d.ts +0 -26
- package/dist/src/mpc/shamir.d.ts.map +0 -1
- package/dist/src/mpc/shamir.js +0 -86
- package/dist/src/mpc/tss/eddsa/eddsa.d.ts +0 -29
- package/dist/src/mpc/tss/eddsa/eddsa.d.ts.map +0 -1
- package/dist/src/mpc/tss/eddsa/eddsa.js +0 -273
- package/dist/src/mpc/tss/eddsa/index.d.ts +0 -4
- package/dist/src/mpc/tss/eddsa/index.d.ts.map +0 -1
- package/dist/src/mpc/tss/eddsa/index.js +0 -30
- package/dist/src/mpc/tss/eddsa/types.d.ts +0 -70
- package/dist/src/mpc/tss/eddsa/types.d.ts.map +0 -1
- package/dist/src/mpc/tss/eddsa/types.js +0 -3
- package/dist/src/mpc/tss/index.d.ts +0 -5
- package/dist/src/mpc/tss/index.d.ts.map +0 -1
- package/dist/src/mpc/tss/index.js +0 -32
- package/dist/src/mpc/tss.d.ts +0 -98
- package/dist/src/mpc/tss.d.ts.map +0 -1
- package/dist/src/mpc/tss.js +0 -277
- package/dist/src/mpc/util.d.ts +0 -7
- package/dist/src/mpc/util.d.ts.map +0 -1
- package/dist/src/mpc/util.js +0 -38
- package/dist/src/utils/crypto.d.ts +0 -99
- package/dist/src/utils/crypto.d.ts.map +0 -1
- package/dist/src/utils/crypto.js +0 -260
- package/dist/src/utils/ed25519KeyDeriver.d.ts +0 -49
- package/dist/src/utils/ed25519KeyDeriver.d.ts.map +0 -1
- package/dist/src/utils/ed25519KeyDeriver.js +0 -92
- package/resources/hbar/protobuf/BasicTypes.proto +0 -424
- package/resources/hbar/protobuf/CryptoCreate.proto +0 -47
- package/resources/hbar/protobuf/CryptoTransfer.proto +0 -33
- package/resources/hbar/protobuf/Duration.proto +0 -28
- package/resources/hbar/protobuf/Timestamp.proto +0 -34
- package/resources/hbar/protobuf/Transaction.proto +0 -35
- package/resources/hbar/protobuf/TransactionBody.proto +0 -24
- package/resources/hbar/protobuf/TransactionContents.proto +0 -33
- package/resources/hbar/protobuf/hedera.d.ts +0 -4612
- package/resources/hbar/protobuf/hedera.js +0 -12192
- package/resources/trx/protobuf/Contract.proto +0 -256
- package/resources/trx/protobuf/Discover.proto +0 -44
- package/resources/trx/protobuf/tron.d.ts +0 -11024
- package/resources/trx/protobuf/tron.js +0 -31510
- package/resources/trx/protobuf/tron.proto +0 -677
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.TransferBuilder = void 0;
|
|
7
|
-
const bn_js_1 = __importDefault(require("bn.js"));
|
|
8
|
-
const transactions_1 = require("@stacks/transactions");
|
|
9
|
-
const sdk_core_1 = require("@bitgo/sdk-core");
|
|
10
|
-
const transactionBuilder_1 = require("./transactionBuilder");
|
|
11
|
-
const utils_1 = require("./utils");
|
|
12
|
-
class TransferBuilder extends transactionBuilder_1.TransactionBuilder {
|
|
13
|
-
constructor(_coinConfig) {
|
|
14
|
-
super(_coinConfig);
|
|
15
|
-
}
|
|
16
|
-
initBuilder(tx) {
|
|
17
|
-
const txData = tx.toJson();
|
|
18
|
-
if (txData.payload === undefined) {
|
|
19
|
-
throw new sdk_core_1.InvalidTransactionError('payload must not be undefined');
|
|
20
|
-
}
|
|
21
|
-
if (txData.payload.payloadType === transactions_1.PayloadType.TokenTransfer) {
|
|
22
|
-
this.to(txData.payload.to);
|
|
23
|
-
this.amount(txData.payload.amount);
|
|
24
|
-
if (txData.payload.memo) {
|
|
25
|
-
this.memo(txData.payload.memo);
|
|
26
|
-
}
|
|
27
|
-
super.initBuilder(tx);
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
throw new sdk_core_1.BuildTransactionError('Transaction should be transfer');
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
/** @inheritdoc */
|
|
34
|
-
async buildImplementation() {
|
|
35
|
-
this._options = this.buildTokenTransferOptions();
|
|
36
|
-
this.transaction.setTransactionType(sdk_core_1.TransactionType.Send);
|
|
37
|
-
this.transaction.stxTransaction = await transactions_1.makeUnsignedSTXTokenTransfer(this._options);
|
|
38
|
-
return await super.buildImplementation();
|
|
39
|
-
}
|
|
40
|
-
buildTokenTransferOptions() {
|
|
41
|
-
const defaultOpts = {
|
|
42
|
-
recipient: this._toAddress,
|
|
43
|
-
amount: this._amount,
|
|
44
|
-
memo: this._memo,
|
|
45
|
-
anchorMode: this._anchorMode,
|
|
46
|
-
network: this._network,
|
|
47
|
-
fee: new bn_js_1.default(this._fee.fee),
|
|
48
|
-
nonce: new bn_js_1.default(this._nonce),
|
|
49
|
-
};
|
|
50
|
-
if (this._fromPubKeys.length > 0) {
|
|
51
|
-
if (this._fromPubKeys.length === 1) {
|
|
52
|
-
return {
|
|
53
|
-
...defaultOpts,
|
|
54
|
-
publicKey: this._fromPubKeys[0],
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
return {
|
|
59
|
-
...defaultOpts,
|
|
60
|
-
publicKeys: this._fromPubKeys,
|
|
61
|
-
numSignatures: this._numberSignatures,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
throw new sdk_core_1.InvalidParameterValueError('supply at least 1 public key');
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
// region Transfer fields
|
|
70
|
-
/**
|
|
71
|
-
* Set the destination address where the funds will be sent,
|
|
72
|
-
* it may take the format `'<shard>.<realm>.<account>'` or `'<account>'`
|
|
73
|
-
*
|
|
74
|
-
* @param {string} address the address to transfer funds to
|
|
75
|
-
* @returns {TransferBuilder} the builder with the new parameter set
|
|
76
|
-
*/
|
|
77
|
-
to(address) {
|
|
78
|
-
if (!utils_1.isValidAddress(address)) {
|
|
79
|
-
throw new sdk_core_1.InvalidParameterValueError('Invalid address');
|
|
80
|
-
}
|
|
81
|
-
this._toAddress = address;
|
|
82
|
-
return this;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Set the amount to be transferred
|
|
86
|
-
*
|
|
87
|
-
* @param {string} amount amount to transfer in tinyBars (there are 100,000,000 tinyBars in one Hbar)
|
|
88
|
-
* @returns {TransferBuilder} the builder with the new parameter set
|
|
89
|
-
*/
|
|
90
|
-
amount(amount) {
|
|
91
|
-
if (!utils_1.isValidAmount(amount)) {
|
|
92
|
-
throw new sdk_core_1.InvalidParameterValueError('Invalid amount');
|
|
93
|
-
}
|
|
94
|
-
this._amount = new bn_js_1.default(amount);
|
|
95
|
-
return this;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
exports.TransferBuilder = TransferBuilder;
|
|
99
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNmZXJCdWlsZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2NvaW4vc3R4L3RyYW5zZmVyQnVpbGRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFDQSxrREFBMkI7QUFDM0IsdURBTThCO0FBQzlCLDhDQUt5QjtBQUV6Qiw2REFBMEQ7QUFDMUQsbUNBQXdEO0FBRXhELE1BQWEsZUFBZ0IsU0FBUSx1Q0FBa0I7SUFLckQsWUFBWSxXQUFpQztRQUMzQyxLQUFLLENBQUMsV0FBVyxDQUFDLEN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tb3VudCk7XG4gICAgcmV0dXJuIHRoaXM7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { AddressHashMode, AddressVersion, ClarityValue, StacksTransaction } from '@stacks/transactions';
|
|
3
|
-
import { AddressDetails, SendParams } from './iface';
|
|
4
|
-
import { KeyPair } from '.';
|
|
5
|
-
import { StacksNetwork as BitgoStacksNetwork } from '@bitgo/statics';
|
|
6
|
-
/**
|
|
7
|
-
* Encodes a buffer as a "0x" prefixed lower-case hex string.
|
|
8
|
-
*
|
|
9
|
-
* @param {Buffer} buff - a buffer with a hexadecimal string
|
|
10
|
-
* @returns {string} - the hexadecimal string prefixed with "0x"
|
|
11
|
-
*/
|
|
12
|
-
export declare function bufferToHexPrefixString(buff: Buffer): string;
|
|
13
|
-
/**
|
|
14
|
-
* Remove the "0x" prefix from the given string, if present.
|
|
15
|
-
*
|
|
16
|
-
* @param {string} hex - a hexadecimal string
|
|
17
|
-
* @returns {string} - the hexadecimal string without a leading "0x"
|
|
18
|
-
*/
|
|
19
|
-
export declare function removeHexPrefix(hex: string): string;
|
|
20
|
-
/**
|
|
21
|
-
* @param tx
|
|
22
|
-
*/
|
|
23
|
-
export declare function getTxSenderAddress(tx: StacksTransaction): string;
|
|
24
|
-
/**
|
|
25
|
-
* Returns whether or not the string is a valid amount number
|
|
26
|
-
*
|
|
27
|
-
* @param {string} amount - the string to validate
|
|
28
|
-
* @returns {boolean} - the validation result
|
|
29
|
-
*/
|
|
30
|
-
export declare function isValidAmount(amount: string): boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Returns whether or not the string is a valid protocol address
|
|
33
|
-
*
|
|
34
|
-
* @param {string} address - the address to be validated
|
|
35
|
-
* @returns {boolean} - the validation result
|
|
36
|
-
*/
|
|
37
|
-
export declare function isValidAddress(address: string): boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Returns whether or not the string is a valid protocol transaction id or not.
|
|
40
|
-
*
|
|
41
|
-
* A valid transaction id is a SHA-512/256 hash of a serialized transaction; see
|
|
42
|
-
* the txidFromData function in @stacks/transaction:
|
|
43
|
-
* https://github.com/blockstack/stacks.js/blob/master/packages/transactions/src/utils.ts#L97
|
|
44
|
-
*
|
|
45
|
-
* @param {string} txId - the transaction id to be validated
|
|
46
|
-
* @returns {boolean} - the validation result
|
|
47
|
-
*/
|
|
48
|
-
export declare function isValidTransactionId(txId: string): boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Returns whether or not the string is a valid protocol public key or
|
|
51
|
-
* extended public key.
|
|
52
|
-
*
|
|
53
|
-
* The key format is documented at
|
|
54
|
-
* https://github.com/stacksgov/sips/blob/main/sips/sip-005/sip-005-blocks-and-transactions.md#transaction-authorization
|
|
55
|
-
*
|
|
56
|
-
* @param {string} pub - the public key to be validated
|
|
57
|
-
* @returns {boolean} - the validation result
|
|
58
|
-
*/
|
|
59
|
-
export declare function isValidPublicKey(pub: string): boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Returns whether or not the string is a valid protocol private key, or extended
|
|
62
|
-
* private key.
|
|
63
|
-
*
|
|
64
|
-
* The protocol key format is described in the @stacks/transactions npm package, in the
|
|
65
|
-
* createStacksPrivateKey function:
|
|
66
|
-
* https://github.com/blockstack/stacks.js/blob/master/packages/transactions/src/keys.ts#L125
|
|
67
|
-
*
|
|
68
|
-
* @param {string} prv - the private key (or extended private key) to be validated
|
|
69
|
-
* @returns {boolean} - the validation result
|
|
70
|
-
*/
|
|
71
|
-
export declare function isValidPrivateKey(prv: string): boolean;
|
|
72
|
-
/**
|
|
73
|
-
* Checks if raw transaction can be deserialized
|
|
74
|
-
*
|
|
75
|
-
* @param {unknown} rawTransaction - transaction in raw hex format
|
|
76
|
-
* @returns {boolean} - the validation result
|
|
77
|
-
*/
|
|
78
|
-
export declare function isValidRawTransaction(rawTransaction: unknown): boolean;
|
|
79
|
-
/**
|
|
80
|
-
* Returns whether or not the memo string is valid
|
|
81
|
-
*
|
|
82
|
-
* @param {string} memo - the string to be validated
|
|
83
|
-
* @returns {boolean} - the validation result
|
|
84
|
-
*/
|
|
85
|
-
export declare function isValidMemo(memo: string): boolean;
|
|
86
|
-
/**
|
|
87
|
-
* Checks for valid contract address
|
|
88
|
-
*
|
|
89
|
-
* @param {string} addr - contract deployer address
|
|
90
|
-
* @param {BitgoStacksNetwork} network - network object
|
|
91
|
-
* @returns {boolean} - the validation result
|
|
92
|
-
*/
|
|
93
|
-
export declare function isValidContractAddress(addr: string, network: BitgoStacksNetwork): boolean;
|
|
94
|
-
/**
|
|
95
|
-
* Check if the name is one of valid contract names
|
|
96
|
-
*
|
|
97
|
-
* @param {string} name - function name
|
|
98
|
-
* @returns {boolean} - validation result
|
|
99
|
-
*/
|
|
100
|
-
export declare function isValidContractFunctionName(name: string): boolean;
|
|
101
|
-
/**
|
|
102
|
-
* Unpads a memo string, so it removes nulls.
|
|
103
|
-
*
|
|
104
|
-
* Useful when memo is fill up the length. Result is becomes readable.
|
|
105
|
-
*
|
|
106
|
-
* @param {string} memo - the string to be validated
|
|
107
|
-
* @returns {boolean} - the validation result
|
|
108
|
-
*/
|
|
109
|
-
export declare function unpadMemo(memo: string): string;
|
|
110
|
-
/**
|
|
111
|
-
* Generate a multisig address from multiple STX public keys
|
|
112
|
-
*
|
|
113
|
-
* @param {string[]} pubKeys - list of public keys as strings
|
|
114
|
-
* @param {AddressVersion} addressVersion - MainnetMultiSig, TestnetMultiSig
|
|
115
|
-
* @param {AddressHashMode} addressHashMode - SerializeP2SH
|
|
116
|
-
* @param {number} [signaturesRequired] - number of signatures required, default value its 2
|
|
117
|
-
* @returns {address: string, hash160: string} - a multisig address
|
|
118
|
-
*/
|
|
119
|
-
export declare function getSTXAddressFromPubKeys(pubKeys: string[], addressVersion?: AddressVersion, addressHashMode?: AddressHashMode, signaturesRequired?: number): {
|
|
120
|
-
address: string;
|
|
121
|
-
hash160: string;
|
|
122
|
-
};
|
|
123
|
-
/**
|
|
124
|
-
* signs a string message
|
|
125
|
-
*
|
|
126
|
-
* @param keyPair
|
|
127
|
-
* @param data - message to be signed
|
|
128
|
-
* @returns signed message string
|
|
129
|
-
*/
|
|
130
|
-
export declare function signMessage(keyPair: KeyPair, data: string): string;
|
|
131
|
-
/**
|
|
132
|
-
* Verifies a signed message
|
|
133
|
-
*
|
|
134
|
-
* The signature must be 130 bytes long -- see RECOVERABLE_ECDSA_SIG_LENGTH_BYTES
|
|
135
|
-
* in @stacks/transactions/src/constants.ts
|
|
136
|
-
*
|
|
137
|
-
* @param {string} message - message to verify the signature
|
|
138
|
-
* @param {string} signature - signature to verify
|
|
139
|
-
* @param {string} publicKey - public key as hex string used to verify the signature
|
|
140
|
-
* @returns {boolean} - verification result
|
|
141
|
-
*/
|
|
142
|
-
export declare function verifySignature(message: string, signature: string, publicKey: string): boolean;
|
|
143
|
-
/**
|
|
144
|
-
* Process address into address and memo id
|
|
145
|
-
*
|
|
146
|
-
* @param {string} address the address to process
|
|
147
|
-
* @returns {Object} object containing address and memo id
|
|
148
|
-
*/
|
|
149
|
-
export declare function getAddressDetails(address: string): AddressDetails;
|
|
150
|
-
/**
|
|
151
|
-
* Validate and return address with appended memo id
|
|
152
|
-
*
|
|
153
|
-
* @param {AddressDetails} addressDetails
|
|
154
|
-
* @returns {string} address with memo id
|
|
155
|
-
*/
|
|
156
|
-
export declare function normalizeAddress({ address, memoId }: AddressDetails): string;
|
|
157
|
-
/**
|
|
158
|
-
* Return boolean indicating whether input is a valid address with memo id
|
|
159
|
-
*
|
|
160
|
-
* @param {string} address address in the form <address>?memoId=<memoId>
|
|
161
|
-
* @returns {boolean} true is input is a valid address
|
|
162
|
-
*/
|
|
163
|
-
export declare function isValidAddressWithPaymentId(address: string): boolean;
|
|
164
|
-
/**
|
|
165
|
-
* Return string representation of clarity value input
|
|
166
|
-
*
|
|
167
|
-
* @param {ClarityValue} cv clarity value function argument
|
|
168
|
-
* @returns {String} stringified clarity value
|
|
169
|
-
*/
|
|
170
|
-
export declare function stringifyCv(cv: ClarityValue): any;
|
|
171
|
-
/**
|
|
172
|
-
* Parse functionArgs into send params for send-many-memo contract calls
|
|
173
|
-
*
|
|
174
|
-
* @param {ClarityValue[]} args functionArgs from a contract call payload
|
|
175
|
-
* @returns {SendParams[]} An array of sendParams
|
|
176
|
-
*/
|
|
177
|
-
export declare function functionArgsToSendParams(args: ClarityValue[]): SendParams[];
|
|
178
|
-
/**
|
|
179
|
-
* Gets the version of an address
|
|
180
|
-
*
|
|
181
|
-
* @param {String} address the address with or without the memoId
|
|
182
|
-
* @returns {AddressVersion} A number that represent the Address Version
|
|
183
|
-
*/
|
|
184
|
-
export declare function getAddressVersion(address: string): AddressVersion;
|
|
185
|
-
/**
|
|
186
|
-
* Returns a STX pub key from an xpub
|
|
187
|
-
*
|
|
188
|
-
* @param {String} xpub an xpub
|
|
189
|
-
* @returns {String} a compressed STX pub key
|
|
190
|
-
*/
|
|
191
|
-
export declare function xpubToSTXPubkey(xpub: string, compressed?: boolean): string;
|
|
192
|
-
/**
|
|
193
|
-
* Returns the base address portion of an address
|
|
194
|
-
*
|
|
195
|
-
* @param {String} address - an address
|
|
196
|
-
* @returns {String} - the base address
|
|
197
|
-
*/
|
|
198
|
-
export declare function getBaseAddress(address: string): string;
|
|
199
|
-
/**
|
|
200
|
-
* Compares an address to the base address to check if matchs.
|
|
201
|
-
*
|
|
202
|
-
* @param {String} address - an address
|
|
203
|
-
* @param {String} baseAddress - a base address
|
|
204
|
-
* @returns {boolean}
|
|
205
|
-
*/
|
|
206
|
-
export declare function isSameBaseAddress(address: string, baseAddress: string): boolean;
|
|
207
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/coin/stx/utils.ts"],"names":[],"mappings":";AAIA,OAAO,EAGL,eAAe,EAGf,cAAc,EAGd,YAAY,EAYZ,iBAAiB,EAGlB,MAAM,sBAAsB,CAAC;AAI9B,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