@bitgo/account-lib 3.0.0-hotfix.0 → 4.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 +203 -29
- 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 +26050 -40851
- 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,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.Secp256k1ExtendedKeyPair = void 0;
|
|
23
|
-
var bip32 = __importStar(require("bip32"));
|
|
24
|
-
var bitcoinjs_lib_1 = require("bitcoinjs-lib");
|
|
25
|
-
var Crypto = __importStar(require("../../utils/crypto"));
|
|
26
|
-
var errors_1 = require("./errors");
|
|
27
|
-
/**
|
|
28
|
-
* Base class for SECP256K1 extended keypairs.
|
|
29
|
-
*/
|
|
30
|
-
var Secp256k1ExtendedKeyPair = /** @class */ (function () {
|
|
31
|
-
/**
|
|
32
|
-
* Public constructor. By default, creates a key pair with a random master seed.
|
|
33
|
-
*
|
|
34
|
-
* @param {KeyPairOptions} source Either a master seed, a private key (extended or raw), or a public key
|
|
35
|
-
* (extended, compressed, or uncompressed)
|
|
36
|
-
*/
|
|
37
|
-
function Secp256k1ExtendedKeyPair(source) {
|
|
38
|
-
this.source = source;
|
|
39
|
-
}
|
|
40
|
-
Secp256k1ExtendedKeyPair.toKeyPair = function (hdNode) {
|
|
41
|
-
if (hdNode.privateKey) {
|
|
42
|
-
return bitcoinjs_lib_1.ECPair.fromPrivateKey(hdNode.privateKey);
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
return bitcoinjs_lib_1.ECPair.fromPublicKey(hdNode.publicKey);
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* @param compressed
|
|
50
|
-
* @return Buffer 33 bytes if `compressed` is set, 65 bytes otherwise. Standard libsecp256k1 format.
|
|
51
|
-
*/
|
|
52
|
-
Secp256k1ExtendedKeyPair.prototype.getPublicKey = function (_a) {
|
|
53
|
-
var compressed = _a.compressed;
|
|
54
|
-
return bitcoinjs_lib_1.ECPair.fromPublicKey(this.keyPair.publicKey, { compressed: compressed }).publicKey;
|
|
55
|
-
};
|
|
56
|
-
/**
|
|
57
|
-
* @return Buffer 32 bytes in standard libsecp256k1 format
|
|
58
|
-
*/
|
|
59
|
-
Secp256k1ExtendedKeyPair.prototype.getPrivateKey = function () {
|
|
60
|
-
return this.keyPair.privateKey;
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* Build a Hierarchical Deterministic node or an ECPair from a private key.
|
|
64
|
-
*
|
|
65
|
-
* @param {string} prv An extended or raw private key
|
|
66
|
-
*/
|
|
67
|
-
Secp256k1ExtendedKeyPair.prototype.recordKeysFromPrivateKey = function (prv) {
|
|
68
|
-
if (Crypto.isValidXprv(prv)) {
|
|
69
|
-
this.hdNode = bip32.fromBase58(prv);
|
|
70
|
-
}
|
|
71
|
-
else if (Crypto.isValidPrv(prv)) {
|
|
72
|
-
// Cannot create the HD node without the chain code, so create a regular Key Chain
|
|
73
|
-
this.keyPair = bitcoinjs_lib_1.ECPair.fromPrivateKey(Buffer.from(prv, 'hex'));
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
throw new Error('Unsupported private key');
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* Build a Hierarchical Deterministic node or an ECPair from a public key.
|
|
81
|
-
*
|
|
82
|
-
* @param {string} pub - An extended, compressed, or uncompressed public key
|
|
83
|
-
*/
|
|
84
|
-
Secp256k1ExtendedKeyPair.prototype.recordKeysFromPublicKey = function (pub) {
|
|
85
|
-
if (Crypto.isValidXpub(pub)) {
|
|
86
|
-
this.hdNode = bip32.fromBase58(pub);
|
|
87
|
-
}
|
|
88
|
-
else if (Crypto.isValidPub(pub)) {
|
|
89
|
-
// Cannot create an HD node without the chain code, so create a regular Key Chain
|
|
90
|
-
this.keyPair = bitcoinjs_lib_1.ECPair.fromPublicKey(Buffer.from(pub, 'hex'));
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
throw new Error('Unsupported public key: ' + pub);
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
/**
|
|
97
|
-
* Get the extended public key, and the private key if one is available. This is only possible
|
|
98
|
-
* when the key pair was created from a seed or extended keys.
|
|
99
|
-
*
|
|
100
|
-
* @returns {ExtendedKeys} The Extended keys object
|
|
101
|
-
*/
|
|
102
|
-
Secp256k1ExtendedKeyPair.prototype.getExtendedKeys = function () {
|
|
103
|
-
if (!this.hdNode) {
|
|
104
|
-
throw new Error('Cannot get extended keys');
|
|
105
|
-
}
|
|
106
|
-
var result = {
|
|
107
|
-
xpub: this.hdNode.neutered().toBase58(),
|
|
108
|
-
};
|
|
109
|
-
// A neutered HD node means it only contains the public key information
|
|
110
|
-
if (!this.hdNode.isNeutered()) {
|
|
111
|
-
result.xprv = this.hdNode.toBase58();
|
|
112
|
-
}
|
|
113
|
-
return result;
|
|
114
|
-
};
|
|
115
|
-
Secp256k1ExtendedKeyPair.prototype.getAddress = function (format) {
|
|
116
|
-
throw new errors_1.NotImplementedError('getAddress not implemented');
|
|
117
|
-
};
|
|
118
|
-
Secp256k1ExtendedKeyPair.prototype.getKeys = function () {
|
|
119
|
-
throw new errors_1.NotImplementedError('getKeys not implemented');
|
|
120
|
-
};
|
|
121
|
-
return Secp256k1ExtendedKeyPair;
|
|
122
|
-
}());
|
|
123
|
-
exports.Secp256k1ExtendedKeyPair = Secp256k1ExtendedKeyPair;
|
|
124
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VjcDI1NmsxRXh0ZW5kZWRLZXlQYWlyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2NvaW4vYmFzZUNvaW4vc2VjcDI1NmsxRXh0ZW5kZWRLZXlQYWlyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSwyQ0FBK0I7QUFDL0IsK0NBQXVDO0FBQ3ZDLHlEQUE2QztBQUk3QyxtQ0FBK0M7QUFFL0M7O0dBRUc7QUFDSDtJQWNFOzs7OztPQUtHO0lBQ0gsa0NBQXNCLE1BQXVCO1FBQzNDLElBQUksQ0FBQyxNQUF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 +0,0 @@
|
|
|
1
|
-
export { KeyPair } from '../eth/keyPair';
|
|
2
|
-
export { Transaction } from './transaction';
|
|
3
|
-
export { TransactionBuilder } from './transactionBuilder';
|
|
4
|
-
export { TransferBuilder } from './transferBuilder';
|
|
5
|
-
import * as Interface from '../eth/iface';
|
|
6
|
-
import * as Utils from './utils';
|
|
7
|
-
export { Interface, Utils };
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/coin/celo/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.Utils = exports.Interface = exports.TransferBuilder = exports.TransactionBuilder = exports.Transaction = exports.KeyPair = void 0;
|
|
23
|
-
var keyPair_1 = require("../eth/keyPair");
|
|
24
|
-
Object.defineProperty(exports, "KeyPair", { enumerable: true, get: function () { return keyPair_1.KeyPair; } });
|
|
25
|
-
var transaction_1 = require("./transaction");
|
|
26
|
-
Object.defineProperty(exports, "Transaction", { enumerable: true, get: function () { return transaction_1.Transaction; } });
|
|
27
|
-
var transactionBuilder_1 = require("./transactionBuilder");
|
|
28
|
-
Object.defineProperty(exports, "TransactionBuilder", { enumerable: true, get: function () { return transactionBuilder_1.TransactionBuilder; } });
|
|
29
|
-
var transferBuilder_1 = require("./transferBuilder");
|
|
30
|
-
Object.defineProperty(exports, "TransferBuilder", { enumerable: true, get: function () { return transferBuilder_1.TransferBuilder; } });
|
|
31
|
-
const Interface = __importStar(require("../eth/iface"));
|
|
32
|
-
exports.Interface = Interface;
|
|
33
|
-
const Utils = __importStar(require("./utils"));
|
|
34
|
-
exports.Utils = Utils;
|
|
35
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY29pbi9jZWxvL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSwwQ0FBeUM7QUFBaEMsa0dBQUEsT0FBTyxPQUFBO0FBQ2hCLDZDQUE0QztBQUFuQywwR0FBQSxXQUFXLE9BQUE7QUFDcEIsMkRBQTBEO0FBQWpELHdIQUFBLGtCQUFrQixPQUFBO0FBQzNCLHFEQUFvRDtBQUEzQyxrSEFBQSxlQUFlLE9BQUE7QUFFeEIsd0RBQTBDO0FBR2pDLDhCQUFTO0FBRmxCLCtDQUFpQztBQUViLHNCQUFLIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHsgS2V5UGFpciB9IGZyb20gJy4uL2V0aC9rZXlQYWlyJztcbmV4cG9ydCB7IFRyYW5zYWN0aW9uIH0gZnJvbSAnLi90cmFuc2FjdGlvbic7XG5leHBvcnQgeyBUcmFuc2FjdGlvbkJ1aWxkZXIgfSBmcm9tICcuL3RyYW5zYWN0aW9uQnVpbGRlcic7XG5leHBvcnQgeyBUcmFuc2ZlckJ1aWxkZXIgfSBmcm9tICcuL3RyYW5zZmVyQnVpbGRlcic7XG5cbmltcG9ydCAqIGFzIEludGVyZmFjZSBmcm9tICcuLi9ldGgvaWZhY2UnO1xuaW1wb3J0ICogYXMgVXRpbHMgZnJvbSAnLi91dGlscyc7XG5cbmV4cG9ydCB7IEludGVyZmFjZSwgVXRpbHMgfTtcbiJdfQ==
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import EthereumCommon from '@ethereumjs/common';
|
|
2
|
-
/**
|
|
3
|
-
* A Common object defining the chain and the hardfork for CELO Testnet
|
|
4
|
-
*/
|
|
5
|
-
export declare const testnetCommon: EthereumCommon;
|
|
6
|
-
/**
|
|
7
|
-
* A Common object defining the chain and the hardfork for CELO Mainnet
|
|
8
|
-
*/
|
|
9
|
-
export declare const mainnetCommon: EthereumCommon;
|
|
10
|
-
//# sourceMappingURL=resources.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../../src/coin/celo/resources.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,aAAa,gBAQzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,gBAQzB,CAAC"}
|
|
@@ -1,26 +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.mainnetCommon = exports.testnetCommon = void 0;
|
|
7
|
-
const statics_1 = require("@bitgo/statics");
|
|
8
|
-
const common_1 = __importDefault(require("@ethereumjs/common"));
|
|
9
|
-
/**
|
|
10
|
-
* A Common object defining the chain and the hardfork for CELO Testnet
|
|
11
|
-
*/
|
|
12
|
-
exports.testnetCommon = common_1.default.forCustomChain('mainnet', // It's a test net based on the main ethereum net
|
|
13
|
-
{
|
|
14
|
-
name: 'alfajores',
|
|
15
|
-
networkId: statics_1.coins.get('tcelo').network.chainId,
|
|
16
|
-
chainId: statics_1.coins.get('tcelo').network.chainId,
|
|
17
|
-
}, 'petersburg');
|
|
18
|
-
/**
|
|
19
|
-
* A Common object defining the chain and the hardfork for CELO Mainnet
|
|
20
|
-
*/
|
|
21
|
-
exports.mainnetCommon = common_1.default.forCustomChain('mainnet', {
|
|
22
|
-
name: 'rc1',
|
|
23
|
-
networkId: statics_1.coins.get('celo').network.chainId,
|
|
24
|
-
chainId: statics_1.coins.get('celo').network.chainId,
|
|
25
|
-
}, 'petersburg');
|
|
26
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb3VyY2VzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2NvaW4vY2Vsby9yZXNvdXJjZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEsNENBQXdEO0FBQ3hELGdFQUFnRDtBQUVoRDs7R0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gdGVzdCBuZXQgYmFzZWQgb24gdGhlIG1haW4gZXRoZXJldW0gbmV0XG4gIHtcbiAgICBuYW1lOiAnYWxmYWpvcmVzJyxcbiAgICBuZXR3b3JrSWQ6IChjb2lucy5nZXQoJ3RjZWxvJykubmV0d29yayBhcyBFdGhlcmV1bU5ldHdvcmspLmNoYWluSWQsXG4gICAgY2hhaW5JZDogKGNvaW5zLmdldCgndGNlbG8nKS5uZXR3b3JrIGFzIEV0aGVyZXVtTmV0d29yaykuY2hhaW5JZCxcbiAgfSxcbiAgJ3BldGVyc2J1cmcnLFxuKTtcblxuLyoqXG4gKiBBIENvbW1vbiBvYmplY3QgZGVmaW5pbmcgdGhlIGNoYWluIGFuZCB0aGUgaGFyZGZvcmsgZm9yIENFTE8gTWFpbm5ldFxuICovXG5leHBvcnQgY29uc3QgbWFpbm5ldENvbW1vbiA9IEV0aGVyZXVtQ29tbW9uLmZvckN1c3RvbUNoYWluKFxuICAnbWFpbm5ldCcsXG4gIHtcbiAgICBuYW1lOiAncmMxJyxcbiAgICBuZXR3b3JrSWQ6IChjb2lucy5nZXQoJ2NlbG8nKS5uZXR3b3JrIGFzIEV0aGVyZXVtTmV0d29yaykuY2hhaW5JZCxcbiAgICBjaGFpbklkOiAoY29pbnMuZ2V0KCdjZWxvJykubmV0d29yayBhcyBFdGhlcmV1bU5ldHdvcmspLmNoYWluSWQsXG4gIH0sXG4gICdwZXRlcnNidXJnJyxcbik7XG4iXX0=
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { BaseCoin as CoinConfig } from '@bitgo/statics';
|
|
2
|
-
import { StakingOperationTypes } from '@bitgo/sdk-core';
|
|
3
|
-
import { StakingCall } from './stakingCall';
|
|
4
|
-
export declare class StakingBuilder {
|
|
5
|
-
private readonly DEFAULT_ADDRESS;
|
|
6
|
-
private _amount;
|
|
7
|
-
private _validatorGroup;
|
|
8
|
-
private _lesser;
|
|
9
|
-
private _greater;
|
|
10
|
-
private _index;
|
|
11
|
-
private _type;
|
|
12
|
-
private _coinConfig;
|
|
13
|
-
constructor(coinConfig: Readonly<CoinConfig>, serializedData?: string);
|
|
14
|
-
type(type: StakingOperationTypes): this;
|
|
15
|
-
amount(value: string): this;
|
|
16
|
-
group(validatorGroup: string): this;
|
|
17
|
-
lesser(lesser: string): this;
|
|
18
|
-
greater(greater: string): this;
|
|
19
|
-
index(index: number): this;
|
|
20
|
-
build(): StakingCall;
|
|
21
|
-
/**
|
|
22
|
-
* Builds a lock gold operation sending the amount on the transaction value field
|
|
23
|
-
*
|
|
24
|
-
* @returns {StakingCall} a lock gold operation using the LockedGold contract
|
|
25
|
-
*/
|
|
26
|
-
private buildLockStaking;
|
|
27
|
-
/**
|
|
28
|
-
* Builds an unlock gold operation sending the amount encoded on the data field
|
|
29
|
-
*
|
|
30
|
-
* params
|
|
31
|
-
* amount: amount of locked gold to be unlocked
|
|
32
|
-
*
|
|
33
|
-
* @returns {StakingCall} an unlock gold operation using the LockedGold contract
|
|
34
|
-
*/
|
|
35
|
-
private buildUnlockStaking;
|
|
36
|
-
/**
|
|
37
|
-
* Builds a vote operation that uses locked gold to add pending votes for a validator group.
|
|
38
|
-
*
|
|
39
|
-
* params
|
|
40
|
-
* validatorGroup: group to vote for
|
|
41
|
-
* amount: amount of votes (locked gold) for the group
|
|
42
|
-
* lesser: validator group that has less votes than the validatorGroup
|
|
43
|
-
* greater: validator group that has more vots than the validatorGroup
|
|
44
|
-
*
|
|
45
|
-
* @returns {StakingCall} an vote operation using the Election contract
|
|
46
|
-
*/
|
|
47
|
-
private buildVoteStaking;
|
|
48
|
-
/**
|
|
49
|
-
* Builds an unvote operation to revoke active votes for a validator group.
|
|
50
|
-
*
|
|
51
|
-
* params
|
|
52
|
-
* validatorGroup: group whose votes will be revoked
|
|
53
|
-
* amount: amount of votes (locked gold) that will be revoked
|
|
54
|
-
* lesser: validator group that has less votes than the validatorGroup
|
|
55
|
-
* greater: validator group that has more vots than the validatorGroup
|
|
56
|
-
* index: index of the validatorGroup on the list of groups the address has voted for
|
|
57
|
-
*
|
|
58
|
-
* @returns {StakingCall} an vote operation using the Election contract
|
|
59
|
-
*/
|
|
60
|
-
private buildUnvoteStaking;
|
|
61
|
-
/**
|
|
62
|
-
* Builds an activate vote operation to change all the votes casted for a validator
|
|
63
|
-
* from 'pending' to 'active'
|
|
64
|
-
*
|
|
65
|
-
* params
|
|
66
|
-
* validatorGroup: group whose votes will be activated
|
|
67
|
-
*
|
|
68
|
-
* @returns {StakingCall} an activate votes operation
|
|
69
|
-
*/
|
|
70
|
-
private buildActivateStaking;
|
|
71
|
-
/**
|
|
72
|
-
* Builds a withdraw operation for locked gold that has been unlocked
|
|
73
|
-
* after the unlocking period has passed.
|
|
74
|
-
*
|
|
75
|
-
* params
|
|
76
|
-
* index: index of the unlock operation whose unlocking period has passed.
|
|
77
|
-
*
|
|
78
|
-
* @returns {StakingCall} an activate votes operation
|
|
79
|
-
*/
|
|
80
|
-
private buildWithdrawStaking;
|
|
81
|
-
private validateMandatoryFields;
|
|
82
|
-
private validateElectionFields;
|
|
83
|
-
private validateIndex;
|
|
84
|
-
private validateAmount;
|
|
85
|
-
private validateUnvoteFields;
|
|
86
|
-
private validateGroup;
|
|
87
|
-
private decodeStakingData;
|
|
88
|
-
private validateDecodedDataLength;
|
|
89
|
-
private classifyStakingType;
|
|
90
|
-
}
|
|
91
|
-
//# sourceMappingURL=stakingBuilder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stakingBuilder.d.ts","sourceRoot":"","sources":["../../../../src/coin/celo/stakingBuilder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAIL,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAU5C,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAgD;IAChF,O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