@ledgerhq/live-common 21.20.0 → 21.21.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/__tests__/families/bitcoin/wallet-btc/utils.test.js +4 -0
- package/lib/__tests__/families/bitcoin/wallet-btc/utils.test.js.map +1 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.js +12 -0
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.js.map +1 -1
- package/lib/__tests__/test-helpers/setup.js +1 -0
- package/lib/__tests__/test-helpers/setup.js.map +1 -1
- package/lib/account/pending.d.ts +1 -1
- package/lib/api/Ledger.d.ts.map +1 -1
- package/lib/api/Ledger.js +12 -2
- package/lib/api/Ledger.js.map +1 -1
- package/lib/api/explorerConfig/index.d.ts.map +1 -1
- package/lib/api/explorerConfig/index.js +5 -1
- package/lib/api/explorerConfig/index.js.map +1 -1
- package/lib/data/icons/react/cro.d.ts +8 -0
- package/lib/data/icons/react/cro.d.ts.map +1 -0
- package/lib/data/icons/react/cro.js +33 -0
- package/lib/data/icons/react/cro.js.map +1 -0
- package/lib/data/icons/react/index.d.ts +2 -0
- package/lib/data/icons/react/index.d.ts.map +1 -1
- package/lib/data/icons/react/index.js +12 -8
- package/lib/data/icons/react/index.js.map +1 -1
- package/lib/data/icons/react/sol.d.ts +8 -0
- package/lib/data/icons/react/sol.d.ts.map +1 -0
- package/lib/data/icons/react/sol.js +30 -0
- package/lib/data/icons/react/sol.js.map +1 -0
- package/lib/data/icons/reactNative/cro.d.ts +8 -0
- package/lib/data/icons/reactNative/cro.d.ts.map +1 -0
- package/lib/data/icons/reactNative/cro.js +34 -0
- package/lib/data/icons/reactNative/cro.js.map +1 -0
- package/lib/data/icons/reactNative/index.d.ts +2 -0
- package/lib/data/icons/reactNative/index.d.ts.map +1 -1
- package/lib/data/icons/reactNative/index.js +12 -8
- package/lib/data/icons/reactNative/index.js.map +1 -1
- package/lib/data/icons/reactNative/sol.d.ts +8 -0
- package/lib/data/icons/reactNative/sol.d.ts.map +1 -0
- package/lib/data/icons/reactNative/sol.js +31 -0
- package/lib/data/icons/reactNative/sol.js.map +1 -0
- package/lib/derivation.d.ts +7 -0
- package/lib/derivation.d.ts.map +1 -1
- package/lib/derivation.js +16 -1
- package/lib/derivation.js.map +1 -1
- package/lib/errors.d.ts +1 -0
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -0
- package/lib/errors.js.map +1 -1
- package/lib/families/bitcoin/exchange.d.ts +1 -1
- package/lib/families/bitcoin/getAccountNetworkInfo.d.ts.map +1 -1
- package/lib/families/bitcoin/getAccountNetworkInfo.js +3 -2
- package/lib/families/bitcoin/getAccountNetworkInfo.js.map +1 -1
- package/lib/families/bitcoin/js-signOperation.d.ts.map +1 -1
- package/lib/families/bitcoin/js-signOperation.js +7 -2
- package/lib/families/bitcoin/js-signOperation.js.map +1 -1
- package/lib/families/bitcoin/js-synchronisation.d.ts +2 -2
- package/lib/families/bitcoin/specs.d.ts +1 -0
- package/lib/families/bitcoin/specs.d.ts.map +1 -1
- package/lib/families/bitcoin/specs.js +14 -1
- package/lib/families/bitcoin/specs.js.map +1 -1
- package/lib/families/bitcoin/wallet-btc/crypto/base.d.ts +1 -1
- package/lib/families/bitcoin/wallet-btc/crypto/base.d.ts.map +1 -1
- package/lib/families/bitcoin/wallet-btc/crypto/base.js.map +1 -1
- package/lib/families/bitcoin/wallet-btc/crypto/bitcoincash.d.ts.map +1 -1
- package/lib/families/bitcoin/wallet-btc/crypto/bitcoincash.js +8 -1
- package/lib/families/bitcoin/wallet-btc/crypto/bitcoincash.js.map +1 -1
- package/lib/families/bitcoin/wallet-btc/crypto/decred.d.ts +16 -0
- package/lib/families/bitcoin/wallet-btc/crypto/decred.d.ts.map +1 -0
- package/lib/families/bitcoin/wallet-btc/crypto/decred.js +248 -0
- package/lib/families/bitcoin/wallet-btc/crypto/decred.js.map +1 -0
- package/lib/families/bitcoin/wallet-btc/crypto/factory.d.ts.map +1 -1
- package/lib/families/bitcoin/wallet-btc/crypto/factory.js +5 -0
- package/lib/families/bitcoin/wallet-btc/crypto/factory.js.map +1 -1
- package/lib/families/bitcoin/wallet-btc/crypto/index.d.ts +1 -0
- package/lib/families/bitcoin/wallet-btc/crypto/index.d.ts.map +1 -1
- package/lib/families/bitcoin/wallet-btc/crypto/index.js +3 -1
- package/lib/families/bitcoin/wallet-btc/crypto/index.js.map +1 -1
- package/lib/families/bitcoin/wallet-btc/crypto/litecoin.d.ts.map +1 -1
- package/lib/families/bitcoin/wallet-btc/crypto/litecoin.js +13 -3
- package/lib/families/bitcoin/wallet-btc/crypto/litecoin.js.map +1 -1
- package/lib/families/bitcoin/wallet-btc/crypto/types.d.ts +1 -1
- package/lib/families/bitcoin/wallet-btc/crypto/types.d.ts.map +1 -1
- package/lib/families/bitcoin/wallet-btc/crypto/zec.d.ts.map +1 -1
- package/lib/families/bitcoin/wallet-btc/crypto/zec.js +8 -1
- package/lib/families/bitcoin/wallet-btc/crypto/zec.js.map +1 -1
- package/lib/families/bitcoin/wallet-btc/crypto/zen.d.ts.map +1 -1
- package/lib/families/bitcoin/wallet-btc/crypto/zen.js +8 -1
- package/lib/families/bitcoin/wallet-btc/crypto/zen.js.map +1 -1
- package/lib/families/bitcoin/wallet-btc/utils.d.ts.map +1 -1
- package/lib/families/bitcoin/wallet-btc/utils.js +6 -1
- package/lib/families/bitcoin/wallet-btc/utils.js.map +1 -1
- package/lib/families/bitcoin/wallet-btc/wallet.d.ts +2 -0
- package/lib/families/bitcoin/wallet-btc/wallet.d.ts.map +1 -1
- package/lib/families/bitcoin/wallet-btc/wallet.js +15 -7
- package/lib/families/bitcoin/wallet-btc/wallet.js.map +1 -1
- package/lib/families/crypto_org/js-synchronisation.d.ts +2 -2
- package/lib/families/elrond/js-synchronisation.d.ts +2 -2
- package/lib/families/ethereum/synchronisation.d.ts.map +1 -1
- package/lib/families/ethereum/synchronisation.js +2 -2
- package/lib/families/ethereum/synchronisation.js.map +1 -1
- package/lib/families/polkadot/api/sidecar.js +4 -2
- package/lib/families/polkadot/api/sidecar.js.map +1 -1
- package/lib/families/polkadot/js-synchronisation.d.ts +2 -2
- package/lib/families/solana/api/cached.d.ts +5 -0
- package/lib/families/solana/api/cached.d.ts.map +1 -0
- package/lib/families/solana/api/cached.js +80 -0
- package/lib/families/solana/api/cached.js.map +1 -0
- package/lib/families/solana/api/chain/account/index.d.ts +2 -0
- package/lib/families/solana/api/chain/account/index.d.ts.map +1 -0
- package/lib/families/solana/api/chain/account/index.js +14 -0
- package/lib/families/solana/api/chain/account/index.js.map +1 -0
- package/lib/families/solana/api/chain/account/parser.d.ts +5 -0
- package/lib/families/solana/api/chain/account/parser.d.ts.map +1 -0
- package/lib/families/solana/api/chain/account/parser.js +33 -0
- package/lib/families/solana/api/chain/account/parser.js.map +1 -0
- package/lib/families/solana/api/chain/account/stake.d.ts +237 -0
- package/lib/families/solana/api/chain/account/stake.d.ts.map +1 -0
- package/lib/families/solana/api/chain/account/stake.js +43 -0
- package/lib/families/solana/api/chain/account/stake.js.map +1 -0
- package/lib/families/solana/api/chain/account/token.d.ts +116 -0
- package/lib/families/solana/api/chain/account/token.d.ts.map +1 -0
- package/lib/families/solana/api/chain/account/token.js +42 -0
- package/lib/families/solana/api/chain/account/token.js.map +1 -0
- package/lib/families/solana/api/chain/index.d.ts +22 -0
- package/lib/families/solana/api/chain/index.d.ts.map +1 -0
- package/lib/families/solana/api/chain/index.js +54 -0
- package/lib/families/solana/api/chain/index.js.map +1 -0
- package/lib/families/solana/api/chain/instruction/associated-token-account/index.d.ts +15 -0
- package/lib/families/solana/api/chain/instruction/associated-token-account/index.d.ts.map +1 -0
- package/lib/families/solana/api/chain/instruction/associated-token-account/index.js +21 -0
- package/lib/families/solana/api/chain/instruction/associated-token-account/index.js.map +1 -0
- package/lib/families/solana/api/chain/instruction/associated-token-account/types.d.ts +30 -0
- package/lib/families/solana/api/chain/instruction/associated-token-account/types.d.ts.map +1 -0
- package/lib/families/solana/api/chain/instruction/associated-token-account/types.js +19 -0
- package/lib/families/solana/api/chain/instruction/associated-token-account/types.js.map +1 -0
- package/lib/families/solana/api/chain/instruction/memo/index.d.ts +15 -0
- package/lib/families/solana/api/chain/instruction/memo/index.d.ts.map +1 -0
- package/lib/families/solana/api/chain/instruction/memo/index.js +14 -0
- package/lib/families/solana/api/chain/instruction/memo/index.js.map +1 -0
- package/lib/families/solana/api/chain/instruction/memo/types.d.ts +21 -0
- package/lib/families/solana/api/chain/instruction/memo/types.d.ts.map +1 -0
- package/lib/families/solana/api/chain/instruction/memo/types.js +16 -0
- package/lib/families/solana/api/chain/instruction/memo/types.js.map +1 -0
- package/lib/families/solana/api/chain/instruction/stake/index.d.ts +15 -0
- package/lib/families/solana/api/chain/instruction/stake/index.d.ts.map +1 -0
- package/lib/families/solana/api/chain/instruction/stake/index.js +20 -0
- package/lib/families/solana/api/chain/instruction/stake/index.js.map +1 -0
- package/lib/families/solana/api/chain/instruction/stake/types.d.ts +215 -0
- package/lib/families/solana/api/chain/instruction/stake/types.d.ts.map +1 -0
- package/lib/families/solana/api/chain/instruction/stake/types.js +80 -0
- package/lib/families/solana/api/chain/instruction/stake/types.js.map +1 -0
- package/lib/families/solana/api/chain/instruction/token/index.d.ts +15 -0
- package/lib/families/solana/api/chain/instruction/token/index.d.ts.map +1 -0
- package/lib/families/solana/api/chain/instruction/token/index.js +20 -0
- package/lib/families/solana/api/chain/instruction/token/index.js.map +1 -0
- package/lib/families/solana/api/chain/instruction/token/types.d.ts +497 -0
- package/lib/families/solana/api/chain/instruction/token/types.d.ts.map +1 -0
- package/lib/families/solana/api/chain/instruction/token/types.js +205 -0
- package/lib/families/solana/api/chain/instruction/token/types.js.map +1 -0
- package/lib/families/solana/api/chain/program/constants.d.ts +11 -0
- package/lib/families/solana/api/chain/program/constants.d.ts.map +1 -0
- package/lib/families/solana/api/chain/program/constants.js +14 -0
- package/lib/families/solana/api/chain/program/constants.js.map +1 -0
- package/lib/families/solana/api/chain/program/index.d.ts +2 -0
- package/lib/families/solana/api/chain/program/index.d.ts.map +1 -0
- package/lib/families/solana/api/chain/program/index.js +14 -0
- package/lib/families/solana/api/chain/program/index.js.map +1 -0
- package/lib/families/solana/api/chain/program/parser.d.ts +30 -0
- package/lib/families/solana/api/chain/program/parser.d.ts.map +1 -0
- package/lib/families/solana/api/chain/program/parser.js +70 -0
- package/lib/families/solana/api/chain/program/parser.js.map +1 -0
- package/lib/families/solana/api/chain/validators/bignum.d.ts +3 -0
- package/lib/families/solana/api/chain/validators/bignum.d.ts.map +1 -0
- package/lib/families/solana/api/chain/validators/bignum.js +11 -0
- package/lib/families/solana/api/chain/validators/bignum.js.map +1 -0
- package/lib/families/solana/api/chain/validators/index.d.ts +10 -0
- package/lib/families/solana/api/chain/validators/index.d.ts.map +1 -0
- package/lib/families/solana/api/chain/validators/index.js +10 -0
- package/lib/families/solana/api/chain/validators/index.js.map +1 -0
- package/lib/families/solana/api/chain/validators/pubkey.d.ts +3 -0
- package/lib/families/solana/api/chain/validators/pubkey.d.ts.map +1 -0
- package/lib/families/solana/api/chain/validators/pubkey.js +7 -0
- package/lib/families/solana/api/chain/validators/pubkey.js.map +1 -0
- package/lib/families/solana/api/chain/web3.d.ts +29 -0
- package/lib/families/solana/api/chain/web3.d.ts.map +1 -0
- package/lib/families/solana/api/chain/web3.js +287 -0
- package/lib/families/solana/api/chain/web3.js.map +1 -0
- package/lib/families/solana/api/index.d.ts +5 -0
- package/lib/families/solana/api/index.d.ts.map +1 -0
- package/lib/families/solana/api/index.js +21 -0
- package/lib/families/solana/api/index.js.map +1 -0
- package/lib/families/solana/api/logged.d.ts +3 -0
- package/lib/families/solana/api/logged.d.ts.map +1 -0
- package/lib/families/solana/api/logged.js +53 -0
- package/lib/families/solana/api/logged.js.map +1 -0
- package/lib/families/solana/api/queued.d.ts +3 -0
- package/lib/families/solana/api/queued.d.ts.map +1 -0
- package/lib/families/solana/api/queued.js +31 -0
- package/lib/families/solana/api/queued.js.map +1 -0
- package/lib/families/solana/bridge/bridge.d.ts +12 -0
- package/lib/families/solana/bridge/bridge.d.ts.map +1 -0
- package/lib/families/solana/bridge/bridge.js +218 -0
- package/lib/families/solana/bridge/bridge.js.map +1 -0
- package/lib/families/solana/bridge/js.d.ts +6 -0
- package/lib/families/solana/bridge/js.d.ts.map +1 -0
- package/lib/families/solana/bridge/js.js +15 -0
- package/lib/families/solana/bridge/js.js.map +1 -0
- package/lib/families/solana/bridge/mock-data.d.ts +186 -0
- package/lib/families/solana/bridge/mock-data.d.ts.map +1 -0
- package/lib/families/solana/bridge/mock-data.js +23 -0
- package/lib/families/solana/bridge/mock-data.js.map +1 -0
- package/lib/families/solana/bridge/mock.d.ts +6 -0
- package/lib/families/solana/bridge/mock.d.ts.map +1 -0
- package/lib/families/solana/bridge/mock.js +75 -0
- package/lib/families/solana/bridge/mock.js.map +1 -0
- package/lib/families/solana/cli-transaction.d.ts +14 -0
- package/lib/families/solana/cli-transaction.d.ts.map +1 -0
- package/lib/families/solana/cli-transaction.js +137 -0
- package/lib/families/solana/cli-transaction.js.map +1 -0
- package/lib/families/solana/datasets/solana.scanAccounts.1.d.ts +6 -0
- package/lib/families/solana/datasets/solana.scanAccounts.1.d.ts.map +1 -0
- package/lib/families/solana/datasets/solana.scanAccounts.1.js +7 -0
- package/lib/families/solana/datasets/solana.scanAccounts.1.js.map +1 -0
- package/lib/families/solana/deviceTransactionConfig.d.ts +10 -0
- package/lib/families/solana/deviceTransactionConfig.d.ts.map +1 -0
- package/lib/families/solana/deviceTransactionConfig.js +121 -0
- package/lib/families/solana/deviceTransactionConfig.js.map +1 -0
- package/lib/families/solana/errors.d.ts +25 -0
- package/lib/families/solana/errors.d.ts.map +1 -0
- package/lib/families/solana/errors.js +13 -0
- package/lib/families/solana/errors.js.map +1 -0
- package/lib/families/solana/hw-getAddress.d.ts +4 -0
- package/lib/families/solana/hw-getAddress.d.ts.map +1 -0
- package/lib/families/solana/hw-getAddress.js +66 -0
- package/lib/families/solana/hw-getAddress.js.map +1 -0
- package/lib/families/solana/js-broadcast.d.ts +7 -0
- package/lib/families/solana/js-broadcast.d.ts.map +1 -0
- package/lib/families/solana/js-broadcast.js +59 -0
- package/lib/families/solana/js-broadcast.js.map +1 -0
- package/lib/families/solana/js-buildTransaction.d.ts +6 -0
- package/lib/families/solana/js-buildTransaction.d.ts.map +1 -0
- package/lib/families/solana/js-buildTransaction.js +123 -0
- package/lib/families/solana/js-buildTransaction.js.map +1 -0
- package/lib/families/solana/js-createTransaction.d.ts +6 -0
- package/lib/families/solana/js-createTransaction.d.ts.map +1 -0
- package/lib/families/solana/js-createTransaction.js +35 -0
- package/lib/families/solana/js-createTransaction.js.map +1 -0
- package/lib/families/solana/js-estimateMaxSpendable.d.ts +7 -0
- package/lib/families/solana/js-estimateMaxSpendable.d.ts.map +1 -0
- package/lib/families/solana/js-estimateMaxSpendable.js +72 -0
- package/lib/families/solana/js-estimateMaxSpendable.js.map +1 -0
- package/lib/families/solana/js-getTransactionStatus.d.ts +5 -0
- package/lib/families/solana/js-getTransactionStatus.d.ts.map +1 -0
- package/lib/families/solana/js-getTransactionStatus.js +106 -0
- package/lib/families/solana/js-getTransactionStatus.js.map +1 -0
- package/lib/families/solana/js-prepareTransaction.d.ts +6 -0
- package/lib/families/solana/js-prepareTransaction.d.ts.map +1 -0
- package/lib/families/solana/js-prepareTransaction.js +380 -0
- package/lib/families/solana/js-prepareTransaction.js.map +1 -0
- package/lib/families/solana/js-signOperation.d.ts +10 -0
- package/lib/families/solana/js-signOperation.d.ts.map +1 -0
- package/lib/families/solana/js-signOperation.js +193 -0
- package/lib/families/solana/js-signOperation.js.map +1 -0
- package/lib/families/solana/js-synchronization.d.ts +5 -0
- package/lib/families/solana/js-synchronization.d.ts.map +1 -0
- package/lib/families/solana/js-synchronization.js +464 -0
- package/lib/families/solana/js-synchronization.js.map +1 -0
- package/lib/families/solana/logic.d.ts +15 -0
- package/lib/families/solana/logic.d.ts.map +1 -0
- package/lib/families/solana/logic.js +49 -0
- package/lib/families/solana/logic.js.map +1 -0
- package/lib/families/solana/specs.d.ts +7 -0
- package/lib/families/solana/specs.d.ts.map +1 -0
- package/lib/families/solana/specs.js +100 -0
- package/lib/families/solana/specs.js.map +1 -0
- package/lib/families/solana/speculos-deviceActions.d.ts +8 -0
- package/lib/families/solana/speculos-deviceActions.d.ts.map +1 -0
- package/lib/families/solana/speculos-deviceActions.js +60 -0
- package/lib/families/solana/speculos-deviceActions.js.map +1 -0
- package/lib/families/solana/test-dataset.d.ts +5 -0
- package/lib/families/solana/test-dataset.d.ts.map +1 -0
- package/lib/families/solana/test-dataset.js +396 -0
- package/lib/families/solana/test-dataset.js.map +1 -0
- package/lib/families/solana/transaction.d.ts +12 -0
- package/lib/families/solana/transaction.d.ts.map +1 -0
- package/lib/families/solana/transaction.js +109 -0
- package/lib/families/solana/transaction.js.map +1 -0
- package/lib/families/solana/types.d.ts +84 -0
- package/lib/families/solana/types.d.ts.map +1 -0
- package/lib/families/solana/types.js +6 -0
- package/lib/families/solana/types.js.map +1 -0
- package/lib/families/solana/utils.d.ts +10 -0
- package/lib/families/solana/utils.d.ts.map +1 -0
- package/lib/families/solana/utils.js +194 -0
- package/lib/families/solana/utils.js.map +1 -0
- package/lib/families/stellar/js-synchronization.d.ts +2 -2
- package/lib/generated/bridge/js.d.ts +4 -0
- package/lib/generated/bridge/js.d.ts.map +1 -1
- package/lib/generated/bridge/js.js +8 -6
- package/lib/generated/bridge/js.js.map +1 -1
- package/lib/generated/bridge/mock.d.ts +4 -0
- package/lib/generated/bridge/mock.d.ts.map +1 -1
- package/lib/generated/bridge/mock.js +6 -4
- package/lib/generated/bridge/mock.js.map +1 -1
- package/lib/generated/cli-transaction.d.ts +9 -0
- package/lib/generated/cli-transaction.d.ts.map +1 -1
- package/lib/generated/cli-transaction.js +8 -6
- package/lib/generated/cli-transaction.js.map +1 -1
- package/lib/generated/deviceTransactionConfig.d.ts +2 -0
- package/lib/generated/deviceTransactionConfig.d.ts.map +1 -1
- package/lib/generated/deviceTransactionConfig.js +8 -6
- package/lib/generated/deviceTransactionConfig.js.map +1 -1
- package/lib/generated/exchange.d.ts +1 -1
- package/lib/generated/hw-getAddress.d.ts +1 -0
- package/lib/generated/hw-getAddress.d.ts.map +1 -1
- package/lib/generated/hw-getAddress.js +8 -6
- package/lib/generated/hw-getAddress.js.map +1 -1
- package/lib/generated/specs.d.ts +4 -0
- package/lib/generated/specs.d.ts.map +1 -1
- package/lib/generated/specs.js +8 -6
- package/lib/generated/specs.js.map +1 -1
- package/lib/generated/speculos-deviceActions.d.ts +3 -0
- package/lib/generated/speculos-deviceActions.d.ts.map +1 -1
- package/lib/generated/speculos-deviceActions.js +8 -6
- package/lib/generated/speculos-deviceActions.js.map +1 -1
- package/lib/generated/test-dataset.d.ts +1 -0
- package/lib/generated/test-dataset.d.ts.map +1 -1
- package/lib/generated/test-dataset.js +8 -6
- package/lib/generated/test-dataset.js.map +1 -1
- package/lib/generated/transaction.d.ts +5 -0
- package/lib/generated/transaction.d.ts.map +1 -1
- package/lib/generated/transaction.js +8 -6
- package/lib/generated/transaction.js.map +1 -1
- package/lib/generated/types.d.ts +12 -6
- package/lib/generated/types.d.ts.map +1 -1
- package/lib/generated/types.js +5 -3
- package/lib/generated/types.js.map +1 -1
- package/lib/nft/helpers.js +1 -1
- package/lib/nft/helpers.js.map +1 -1
- package/package.json +8 -4
- package/src/__tests__/__snapshots__/all.libcore.ts.snap +113 -0
- package/src/__tests__/families/bitcoin/wallet-btc/utils.test.ts +4 -0
- package/src/__tests__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.ts +12 -0
- package/src/__tests__/test-helpers/setup.ts +1 -0
- package/src/api/Ledger.ts +11 -1
- package/src/api/explorerConfig/index.ts +1 -3
- package/src/data/icons/react/cro.tsx +12 -0
- package/src/data/icons/react/index.tsx +2 -0
- package/src/data/icons/react/sol.tsx +12 -0
- package/src/data/icons/reactNative/cro.tsx +13 -0
- package/src/data/icons/reactNative/index.tsx +2 -0
- package/src/data/icons/reactNative/sol.tsx +13 -0
- package/src/data/icons/svg/CRO.svg +6 -0
- package/src/data/icons/svg/SOL.svg +3 -0
- package/src/derivation.ts +13 -0
- package/src/errors.ts +1 -0
- package/src/families/bitcoin/getAccountNetworkInfo.ts +5 -2
- package/src/families/bitcoin/js-signOperation.ts +4 -7
- package/src/families/bitcoin/specs.ts +16 -0
- package/src/families/bitcoin/wallet-btc/crypto/base.ts +1 -1
- package/src/families/bitcoin/wallet-btc/crypto/bitcoincash.ts +8 -1
- package/src/families/bitcoin/wallet-btc/crypto/decred.ts +251 -0
- package/src/families/bitcoin/wallet-btc/crypto/factory.ts +5 -0
- package/src/families/bitcoin/wallet-btc/crypto/index.ts +1 -0
- package/src/families/bitcoin/wallet-btc/crypto/litecoin.ts +13 -3
- package/src/families/bitcoin/wallet-btc/crypto/types.ts +1 -0
- package/src/families/bitcoin/wallet-btc/crypto/zec.ts +8 -1
- package/src/families/bitcoin/wallet-btc/crypto/zen.ts +8 -1
- package/src/families/bitcoin/wallet-btc/utils.ts +6 -1
- package/src/families/bitcoin/wallet-btc/wallet.ts +18 -5
- package/src/families/ethereum/synchronisation.ts +5 -2
- package/src/families/polkadot/api/sidecar.ts +2 -2
- package/src/families/solana/api/cached.ts +89 -0
- package/src/families/solana/api/chain/account/index.ts +1 -0
- package/src/families/solana/api/chain/account/parser.ts +35 -0
- package/src/families/solana/api/chain/account/stake.ts +50 -0
- package/src/families/solana/api/chain/account/token.ts +63 -0
- package/src/families/solana/api/chain/index.ts +115 -0
- package/src/families/solana/api/chain/instruction/associated-token-account/index.ts +37 -0
- package/src/families/solana/api/chain/instruction/associated-token-account/types.ts +23 -0
- package/src/families/solana/api/chain/instruction/memo/index.ts +24 -0
- package/src/families/solana/api/chain/instruction/memo/types.ts +18 -0
- package/src/families/solana/api/chain/instruction/stake/index.ts +29 -0
- package/src/families/solana/api/chain/instruction/stake/types.ts +95 -0
- package/src/families/solana/api/chain/instruction/token/index.ts +30 -0
- package/src/families/solana/api/chain/instruction/token/types.ts +237 -0
- package/src/families/solana/api/chain/program/constants.ts +10 -0
- package/src/families/solana/api/chain/program/index.ts +1 -0
- package/src/families/solana/api/chain/program/parser.ts +122 -0
- package/src/families/solana/api/chain/validators/bignum.ts +11 -0
- package/src/families/solana/api/chain/validators/index.ts +9 -0
- package/src/families/solana/api/chain/validators/pubkey.ts +8 -0
- package/src/families/solana/api/chain/web3.ts +258 -0
- package/src/families/solana/api/index.ts +4 -0
- package/src/families/solana/api/logged.ts +50 -0
- package/src/families/solana/api/queued.ts +23 -0
- package/src/families/solana/bridge/bridge.ts +169 -0
- package/src/families/solana/bridge/js.ts +28 -0
- package/src/families/solana/bridge/mock-data.ts +22 -0
- package/src/families/solana/bridge/mock.ts +80 -0
- package/src/families/solana/cli-transaction.ts +175 -0
- package/src/families/solana/datasets/solana.scanAccounts.1.ts +9 -0
- package/src/families/solana/deviceTransactionConfig.ts +160 -0
- package/src/families/solana/errors.ts +32 -0
- package/src/families/solana/hw-getAddress.ts +20 -0
- package/src/families/solana/js-broadcast.ts +20 -0
- package/src/families/solana/js-buildTransaction.ts +75 -0
- package/src/families/solana/js-createTransaction.ts +27 -0
- package/src/families/solana/js-estimateMaxSpendable.ts +29 -0
- package/src/families/solana/js-getTransactionStatus.ts +78 -0
- package/src/families/solana/js-prepareTransaction.ts +423 -0
- package/src/families/solana/js-signOperation.ts +230 -0
- package/src/families/solana/js-synchronization.ts +544 -0
- package/src/families/solana/logic.ts +52 -0
- package/src/families/solana/specs.ts +100 -0
- package/src/families/solana/speculos-deviceActions.ts +59 -0
- package/src/families/solana/test-dataset.ts +572 -0
- package/src/families/solana/transaction.ts +146 -0
- package/src/families/solana/types.ts +110 -0
- package/src/families/solana/utils.ts +80 -0
- package/src/generated/bridge/js.ts +3 -0
- package/src/generated/bridge/mock.ts +3 -0
- package/src/generated/cli-transaction.ts +3 -0
- package/src/generated/deviceTransactionConfig.ts +3 -0
- package/src/generated/hw-getAddress.ts +3 -0
- package/src/generated/specs.ts +3 -0
- package/src/generated/speculos-deviceActions.ts +3 -0
- package/src/generated/test-dataset.ts +3 -0
- package/src/generated/transaction.ts +3 -0
- package/src/generated/types.ts +14 -0
- package/src/nft/helpers.ts +1 -1
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/// <reference types="@solana/web3.js" />
|
|
2
|
+
import { Infer } from "superstruct";
|
|
3
|
+
export declare type InitializeInfo = Infer<typeof InitializeInfo>;
|
|
4
|
+
export declare const InitializeInfo: import("superstruct").Struct<{
|
|
5
|
+
stakeAccount: import("@solana/web3.js").PublicKey;
|
|
6
|
+
authorized: {
|
|
7
|
+
staker: import("@solana/web3.js").PublicKey;
|
|
8
|
+
withdrawer: import("@solana/web3.js").PublicKey;
|
|
9
|
+
};
|
|
10
|
+
lockup: {
|
|
11
|
+
unixTimestamp: number;
|
|
12
|
+
epoch: number;
|
|
13
|
+
custodian: import("@solana/web3.js").PublicKey;
|
|
14
|
+
};
|
|
15
|
+
}, {
|
|
16
|
+
stakeAccount: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
17
|
+
authorized: import("superstruct").Struct<{
|
|
18
|
+
staker: import("@solana/web3.js").PublicKey;
|
|
19
|
+
withdrawer: import("@solana/web3.js").PublicKey;
|
|
20
|
+
}, {
|
|
21
|
+
staker: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
22
|
+
withdrawer: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
23
|
+
}>;
|
|
24
|
+
lockup: import("superstruct").Struct<{
|
|
25
|
+
unixTimestamp: number;
|
|
26
|
+
epoch: number;
|
|
27
|
+
custodian: import("@solana/web3.js").PublicKey;
|
|
28
|
+
}, {
|
|
29
|
+
unixTimestamp: import("superstruct").Struct<number, null>;
|
|
30
|
+
epoch: import("superstruct").Struct<number, null>;
|
|
31
|
+
custodian: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
32
|
+
}>;
|
|
33
|
+
}>;
|
|
34
|
+
export declare type DelegateInfo = Infer<typeof DelegateInfo>;
|
|
35
|
+
export declare const DelegateInfo: import("superstruct").Struct<{
|
|
36
|
+
stakeAccount: import("@solana/web3.js").PublicKey;
|
|
37
|
+
voteAccount: import("@solana/web3.js").PublicKey;
|
|
38
|
+
stakeAuthority: import("@solana/web3.js").PublicKey;
|
|
39
|
+
}, {
|
|
40
|
+
stakeAccount: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
41
|
+
voteAccount: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
42
|
+
stakeAuthority: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
43
|
+
}>;
|
|
44
|
+
export declare type AuthorizeInfo = Infer<typeof AuthorizeInfo>;
|
|
45
|
+
export declare const AuthorizeInfo: import("superstruct").Struct<{
|
|
46
|
+
authority: import("@solana/web3.js").PublicKey;
|
|
47
|
+
authorityType: string;
|
|
48
|
+
newAuthority: import("@solana/web3.js").PublicKey;
|
|
49
|
+
stakeAccount: import("@solana/web3.js").PublicKey;
|
|
50
|
+
}, {
|
|
51
|
+
authorityType: import("superstruct").Struct<string, null>;
|
|
52
|
+
stakeAccount: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
53
|
+
authority: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
54
|
+
newAuthority: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
55
|
+
}>;
|
|
56
|
+
export declare type SplitInfo = Infer<typeof SplitInfo>;
|
|
57
|
+
export declare const SplitInfo: import("superstruct").Struct<{
|
|
58
|
+
stakeAccount: import("@solana/web3.js").PublicKey;
|
|
59
|
+
stakeAuthority: import("@solana/web3.js").PublicKey;
|
|
60
|
+
newSplitAccount: import("@solana/web3.js").PublicKey;
|
|
61
|
+
lamports: number;
|
|
62
|
+
}, {
|
|
63
|
+
stakeAccount: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
64
|
+
stakeAuthority: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
65
|
+
newSplitAccount: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
66
|
+
lamports: import("superstruct").Struct<number, null>;
|
|
67
|
+
}>;
|
|
68
|
+
export declare type WithdrawInfo = Infer<typeof WithdrawInfo>;
|
|
69
|
+
export declare const WithdrawInfo: import("superstruct").Struct<{
|
|
70
|
+
destination: import("@solana/web3.js").PublicKey;
|
|
71
|
+
stakeAccount: import("@solana/web3.js").PublicKey;
|
|
72
|
+
lamports: number;
|
|
73
|
+
withdrawAuthority: import("@solana/web3.js").PublicKey;
|
|
74
|
+
}, {
|
|
75
|
+
stakeAccount: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
76
|
+
withdrawAuthority: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
77
|
+
destination: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
78
|
+
lamports: import("superstruct").Struct<number, null>;
|
|
79
|
+
}>;
|
|
80
|
+
export declare type DeactivateInfo = Infer<typeof DeactivateInfo>;
|
|
81
|
+
export declare const DeactivateInfo: import("superstruct").Struct<{
|
|
82
|
+
stakeAccount: import("@solana/web3.js").PublicKey;
|
|
83
|
+
stakeAuthority: import("@solana/web3.js").PublicKey;
|
|
84
|
+
}, {
|
|
85
|
+
stakeAccount: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
86
|
+
stakeAuthority: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
87
|
+
}>;
|
|
88
|
+
export declare type MergeInfo = Infer<typeof MergeInfo>;
|
|
89
|
+
export declare const MergeInfo: import("superstruct").Struct<{
|
|
90
|
+
source: import("@solana/web3.js").PublicKey;
|
|
91
|
+
destination: import("@solana/web3.js").PublicKey;
|
|
92
|
+
stakeAuthority: import("@solana/web3.js").PublicKey;
|
|
93
|
+
stakeHistorySysvar: import("@solana/web3.js").PublicKey;
|
|
94
|
+
clockSysvar: import("@solana/web3.js").PublicKey;
|
|
95
|
+
}, {
|
|
96
|
+
source: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
97
|
+
destination: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
98
|
+
stakeAuthority: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
99
|
+
stakeHistorySysvar: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
100
|
+
clockSysvar: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
101
|
+
}>;
|
|
102
|
+
export declare type StakeInstructionType = Infer<typeof StakeInstructionType>;
|
|
103
|
+
export declare const StakeInstructionType: import("superstruct").Struct<"split" | "delegate" | "initialize" | "authorize" | "withdraw" | "deactivate" | "merge", {
|
|
104
|
+
split: "split";
|
|
105
|
+
delegate: "delegate";
|
|
106
|
+
initialize: "initialize";
|
|
107
|
+
authorize: "authorize";
|
|
108
|
+
withdraw: "withdraw";
|
|
109
|
+
deactivate: "deactivate";
|
|
110
|
+
merge: "merge";
|
|
111
|
+
}>;
|
|
112
|
+
export declare const IX_STRUCTS: {
|
|
113
|
+
readonly initialize: import("superstruct").Struct<{
|
|
114
|
+
stakeAccount: import("@solana/web3.js").PublicKey;
|
|
115
|
+
authorized: {
|
|
116
|
+
staker: import("@solana/web3.js").PublicKey;
|
|
117
|
+
withdrawer: import("@solana/web3.js").PublicKey;
|
|
118
|
+
};
|
|
119
|
+
lockup: {
|
|
120
|
+
unixTimestamp: number;
|
|
121
|
+
epoch: number;
|
|
122
|
+
custodian: import("@solana/web3.js").PublicKey;
|
|
123
|
+
};
|
|
124
|
+
}, {
|
|
125
|
+
stakeAccount: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
126
|
+
authorized: import("superstruct").Struct<{
|
|
127
|
+
staker: import("@solana/web3.js").PublicKey;
|
|
128
|
+
withdrawer: import("@solana/web3.js").PublicKey;
|
|
129
|
+
}, {
|
|
130
|
+
staker: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
131
|
+
withdrawer: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
132
|
+
}>;
|
|
133
|
+
lockup: import("superstruct").Struct<{
|
|
134
|
+
unixTimestamp: number;
|
|
135
|
+
epoch: number;
|
|
136
|
+
custodian: import("@solana/web3.js").PublicKey;
|
|
137
|
+
}, {
|
|
138
|
+
unixTimestamp: import("superstruct").Struct<number, null>;
|
|
139
|
+
epoch: import("superstruct").Struct<number, null>;
|
|
140
|
+
custodian: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
141
|
+
}>;
|
|
142
|
+
}>;
|
|
143
|
+
readonly delegate: import("superstruct").Struct<{
|
|
144
|
+
stakeAccount: import("@solana/web3.js").PublicKey;
|
|
145
|
+
voteAccount: import("@solana/web3.js").PublicKey;
|
|
146
|
+
stakeAuthority: import("@solana/web3.js").PublicKey;
|
|
147
|
+
}, {
|
|
148
|
+
stakeAccount: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
149
|
+
voteAccount: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
150
|
+
stakeAuthority: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
151
|
+
}>;
|
|
152
|
+
readonly authorize: import("superstruct").Struct<{
|
|
153
|
+
authority: import("@solana/web3.js").PublicKey;
|
|
154
|
+
authorityType: string;
|
|
155
|
+
newAuthority: import("@solana/web3.js").PublicKey;
|
|
156
|
+
stakeAccount: import("@solana/web3.js").PublicKey;
|
|
157
|
+
}, {
|
|
158
|
+
authorityType: import("superstruct").Struct<string, null>;
|
|
159
|
+
stakeAccount: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
160
|
+
authority: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
161
|
+
newAuthority: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
162
|
+
}>;
|
|
163
|
+
readonly split: import("superstruct").Struct<{
|
|
164
|
+
stakeAccount: import("@solana/web3.js").PublicKey;
|
|
165
|
+
stakeAuthority: import("@solana/web3.js").PublicKey;
|
|
166
|
+
newSplitAccount: import("@solana/web3.js").PublicKey;
|
|
167
|
+
lamports: number;
|
|
168
|
+
}, {
|
|
169
|
+
stakeAccount: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
170
|
+
stakeAuthority: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
171
|
+
newSplitAccount: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
172
|
+
lamports: import("superstruct").Struct<number, null>;
|
|
173
|
+
}>;
|
|
174
|
+
readonly withdraw: import("superstruct").Struct<{
|
|
175
|
+
destination: import("@solana/web3.js").PublicKey;
|
|
176
|
+
stakeAccount: import("@solana/web3.js").PublicKey;
|
|
177
|
+
lamports: number;
|
|
178
|
+
withdrawAuthority: import("@solana/web3.js").PublicKey;
|
|
179
|
+
}, {
|
|
180
|
+
stakeAccount: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
181
|
+
withdrawAuthority: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
182
|
+
destination: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
183
|
+
lamports: import("superstruct").Struct<number, null>;
|
|
184
|
+
}>;
|
|
185
|
+
readonly deactivate: import("superstruct").Struct<{
|
|
186
|
+
stakeAccount: import("@solana/web3.js").PublicKey;
|
|
187
|
+
stakeAuthority: import("@solana/web3.js").PublicKey;
|
|
188
|
+
}, {
|
|
189
|
+
stakeAccount: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
190
|
+
stakeAuthority: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
191
|
+
}>;
|
|
192
|
+
readonly merge: import("superstruct").Struct<{
|
|
193
|
+
source: import("@solana/web3.js").PublicKey;
|
|
194
|
+
destination: import("@solana/web3.js").PublicKey;
|
|
195
|
+
stakeAuthority: import("@solana/web3.js").PublicKey;
|
|
196
|
+
stakeHistorySysvar: import("@solana/web3.js").PublicKey;
|
|
197
|
+
clockSysvar: import("@solana/web3.js").PublicKey;
|
|
198
|
+
}, {
|
|
199
|
+
source: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
200
|
+
destination: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
201
|
+
stakeAuthority: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
202
|
+
stakeHistorySysvar: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
203
|
+
clockSysvar: import("superstruct").Struct<import("@solana/web3.js").PublicKey, null>;
|
|
204
|
+
}>;
|
|
205
|
+
};
|
|
206
|
+
export declare const IX_TITLES: {
|
|
207
|
+
readonly initialize: "Initialize";
|
|
208
|
+
readonly delegate: "Delegate";
|
|
209
|
+
readonly authorize: "Authorize";
|
|
210
|
+
readonly split: "Split";
|
|
211
|
+
readonly withdraw: "Withdraw";
|
|
212
|
+
readonly deactivate: "Deactive";
|
|
213
|
+
readonly merge: "Merge";
|
|
214
|
+
};
|
|
215
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/families/solana/api/chain/instruction/stake/types.ts"],"names":[],"mappings":";AAEA,OAAO,EAA+B,KAAK,EAAE,MAAM,aAAa,CAAC;AAGjE,oBAAY,cAAc,GAAG,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC1D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWzB,CAAC;AAEH,oBAAY,YAAY,GAAG,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACtD,eAAO,MAAM,YAAY;;;;;;;;EAIvB,CAAC;AAEH,oBAAY,aAAa,GAAG,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACxD,eAAO,MAAM,aAAa;;;;;;;;;;EAKxB,CAAC;AAEH,oBAAY,SAAS,GAAG,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAChD,eAAO,MAAM,SAAS;;;;;;;;;;EAKpB,CAAC;AAEH,oBAAY,YAAY,GAAG,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACtD,eAAO,MAAM,YAAY;;;;;;;;;;EAKvB,CAAC;AAEH,oBAAY,cAAc,GAAG,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC1D,eAAO,MAAM,cAAc;;;;;;EAGzB,CAAC;AAEH,oBAAY,SAAS,GAAG,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAChD,eAAO,MAAM,SAAS;;;;;;;;;;;;EAMpB,CAAC;AAEH,oBAAY,oBAAoB,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACtE,eAAO,MAAM,oBAAoB;;;;;;;;EAQ/B,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQb,CAAC;AAEX,eAAO,MAAM,SAAS;;;;;;;;CAQZ,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-redeclare */
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.IX_TITLES = exports.IX_STRUCTS = exports.StakeInstructionType = exports.MergeInfo = exports.DeactivateInfo = exports.WithdrawInfo = exports.SplitInfo = exports.AuthorizeInfo = exports.DelegateInfo = exports.InitializeInfo = void 0;
|
|
5
|
+
var superstruct_1 = require("superstruct");
|
|
6
|
+
var pubkey_1 = require("../../validators/pubkey");
|
|
7
|
+
exports.InitializeInfo = (0, superstruct_1.type)({
|
|
8
|
+
stakeAccount: pubkey_1.PublicKeyFromString,
|
|
9
|
+
authorized: (0, superstruct_1.type)({
|
|
10
|
+
staker: pubkey_1.PublicKeyFromString,
|
|
11
|
+
withdrawer: pubkey_1.PublicKeyFromString
|
|
12
|
+
}),
|
|
13
|
+
lockup: (0, superstruct_1.type)({
|
|
14
|
+
unixTimestamp: (0, superstruct_1.number)(),
|
|
15
|
+
epoch: (0, superstruct_1.number)(),
|
|
16
|
+
custodian: pubkey_1.PublicKeyFromString
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
exports.DelegateInfo = (0, superstruct_1.type)({
|
|
20
|
+
stakeAccount: pubkey_1.PublicKeyFromString,
|
|
21
|
+
voteAccount: pubkey_1.PublicKeyFromString,
|
|
22
|
+
stakeAuthority: pubkey_1.PublicKeyFromString
|
|
23
|
+
});
|
|
24
|
+
exports.AuthorizeInfo = (0, superstruct_1.type)({
|
|
25
|
+
authorityType: (0, superstruct_1.string)(),
|
|
26
|
+
stakeAccount: pubkey_1.PublicKeyFromString,
|
|
27
|
+
authority: pubkey_1.PublicKeyFromString,
|
|
28
|
+
newAuthority: pubkey_1.PublicKeyFromString
|
|
29
|
+
});
|
|
30
|
+
exports.SplitInfo = (0, superstruct_1.type)({
|
|
31
|
+
stakeAccount: pubkey_1.PublicKeyFromString,
|
|
32
|
+
stakeAuthority: pubkey_1.PublicKeyFromString,
|
|
33
|
+
newSplitAccount: pubkey_1.PublicKeyFromString,
|
|
34
|
+
lamports: (0, superstruct_1.number)()
|
|
35
|
+
});
|
|
36
|
+
exports.WithdrawInfo = (0, superstruct_1.type)({
|
|
37
|
+
stakeAccount: pubkey_1.PublicKeyFromString,
|
|
38
|
+
withdrawAuthority: pubkey_1.PublicKeyFromString,
|
|
39
|
+
destination: pubkey_1.PublicKeyFromString,
|
|
40
|
+
lamports: (0, superstruct_1.number)()
|
|
41
|
+
});
|
|
42
|
+
exports.DeactivateInfo = (0, superstruct_1.type)({
|
|
43
|
+
stakeAccount: pubkey_1.PublicKeyFromString,
|
|
44
|
+
stakeAuthority: pubkey_1.PublicKeyFromString
|
|
45
|
+
});
|
|
46
|
+
exports.MergeInfo = (0, superstruct_1.type)({
|
|
47
|
+
source: pubkey_1.PublicKeyFromString,
|
|
48
|
+
destination: pubkey_1.PublicKeyFromString,
|
|
49
|
+
stakeAuthority: pubkey_1.PublicKeyFromString,
|
|
50
|
+
stakeHistorySysvar: pubkey_1.PublicKeyFromString,
|
|
51
|
+
clockSysvar: pubkey_1.PublicKeyFromString
|
|
52
|
+
});
|
|
53
|
+
exports.StakeInstructionType = (0, superstruct_1.enums)([
|
|
54
|
+
"initialize",
|
|
55
|
+
"delegate",
|
|
56
|
+
"authorize",
|
|
57
|
+
"split",
|
|
58
|
+
"withdraw",
|
|
59
|
+
"deactivate",
|
|
60
|
+
"merge",
|
|
61
|
+
]);
|
|
62
|
+
exports.IX_STRUCTS = {
|
|
63
|
+
initialize: exports.InitializeInfo,
|
|
64
|
+
delegate: exports.DelegateInfo,
|
|
65
|
+
authorize: exports.AuthorizeInfo,
|
|
66
|
+
split: exports.SplitInfo,
|
|
67
|
+
withdraw: exports.WithdrawInfo,
|
|
68
|
+
deactivate: exports.DeactivateInfo,
|
|
69
|
+
merge: exports.MergeInfo
|
|
70
|
+
};
|
|
71
|
+
exports.IX_TITLES = {
|
|
72
|
+
initialize: "Initialize",
|
|
73
|
+
delegate: "Delegate",
|
|
74
|
+
authorize: "Authorize",
|
|
75
|
+
split: "Split",
|
|
76
|
+
withdraw: "Withdraw",
|
|
77
|
+
deactivate: "Deactive",
|
|
78
|
+
merge: "Merge"
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../src/families/solana/api/chain/instruction/stake/types.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;AAEpD,2CAAiE;AACjE,kDAA8D;AAGjD,QAAA,cAAc,GAAG,IAAA,kBAAI,EAAC;IACjC,YAAY,EAAE,4BAAmB;IACjC,UAAU,EAAE,IAAA,kBAAI,EAAC;QACf,MAAM,EAAE,4BAAmB;QAC3B,UAAU,EAAE,4BAAmB;KAChC,CAAC;IACF,MAAM,EAAE,IAAA,kBAAI,EAAC;QACX,aAAa,EAAE,IAAA,oBAAM,GAAE;QACvB,KAAK,EAAE,IAAA,oBAAM,GAAE;QACf,SAAS,EAAE,4BAAmB;KAC/B,CAAC;CACH,CAAC,CAAC;AAGU,QAAA,YAAY,GAAG,IAAA,kBAAI,EAAC;IAC/B,YAAY,EAAE,4BAAmB;IACjC,WAAW,EAAE,4BAAmB;IAChC,cAAc,EAAE,4BAAmB;CACpC,CAAC,CAAC;AAGU,QAAA,aAAa,GAAG,IAAA,kBAAI,EAAC;IAChC,aAAa,EAAE,IAAA,oBAAM,GAAE;IACvB,YAAY,EAAE,4BAAmB;IACjC,SAAS,EAAE,4BAAmB;IAC9B,YAAY,EAAE,4BAAmB;CAClC,CAAC,CAAC;AAGU,QAAA,SAAS,GAAG,IAAA,kBAAI,EAAC;IAC5B,YAAY,EAAE,4BAAmB;IACjC,cAAc,EAAE,4BAAmB;IACnC,eAAe,EAAE,4BAAmB;IACpC,QAAQ,EAAE,IAAA,oBAAM,GAAE;CACnB,CAAC,CAAC;AAGU,QAAA,YAAY,GAAG,IAAA,kBAAI,EAAC;IAC/B,YAAY,EAAE,4BAAmB;IACjC,iBAAiB,EAAE,4BAAmB;IACtC,WAAW,EAAE,4BAAmB;IAChC,QAAQ,EAAE,IAAA,oBAAM,GAAE;CACnB,CAAC,CAAC;AAGU,QAAA,cAAc,GAAG,IAAA,kBAAI,EAAC;IACjC,YAAY,EAAE,4BAAmB;IACjC,cAAc,EAAE,4BAAmB;CACpC,CAAC,CAAC;AAGU,QAAA,SAAS,GAAG,IAAA,kBAAI,EAAC;IAC5B,MAAM,EAAE,4BAAmB;IAC3B,WAAW,EAAE,4BAAmB;IAChC,cAAc,EAAE,4BAAmB;IACnC,kBAAkB,EAAE,4BAAmB;IACvC,WAAW,EAAE,4BAAmB;CACjC,CAAC,CAAC;AAGU,QAAA,oBAAoB,GAAG,IAAA,mBAAK,EAAC;IACxC,YAAY;IACZ,UAAU;IACV,WAAW;IACX,OAAO;IACP,UAAU;IACV,YAAY;IACZ,OAAO;CACR,CAAC,CAAC;AAEU,QAAA,UAAU,GAAG;IACxB,UAAU,EAAE,sBAAc;IAC1B,QAAQ,EAAE,oBAAY;IACtB,SAAS,EAAE,qBAAa;IACxB,KAAK,EAAE,iBAAS;IAChB,QAAQ,EAAE,oBAAY;IACtB,UAAU,EAAE,sBAAc;IAC1B,KAAK,EAAE,iBAAS;CACR,CAAC;AAEE,QAAA,SAAS,GAAG;IACvB,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,UAAU;IACtB,KAAK,EAAE,OAAO;CACN,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ParsedInstruction } from "@solana/web3.js";
|
|
2
|
+
import { IX_STRUCTS, IX_TITLES, TokenInstructionType } from "./types";
|
|
3
|
+
import { Infer } from "superstruct";
|
|
4
|
+
import { PARSED_PROGRAMS } from "../../program/constants";
|
|
5
|
+
export declare function parseSplTokenInstruction(ix: ParsedInstruction & {
|
|
6
|
+
program: typeof PARSED_PROGRAMS.SPL_TOKEN;
|
|
7
|
+
}): TokenInstructionDescriptor;
|
|
8
|
+
export declare type TokenInstructionDescriptor = {
|
|
9
|
+
[K in TokenInstructionType]: {
|
|
10
|
+
title: typeof IX_TITLES[K];
|
|
11
|
+
type: K;
|
|
12
|
+
info: Infer<typeof IX_STRUCTS[K]>;
|
|
13
|
+
};
|
|
14
|
+
}[TokenInstructionType];
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/families/solana/api/chain/instruction/token/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAGtE,OAAO,EAAU,KAAK,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,wBAAgB,wBAAwB,CACtC,EAAE,EAAE,iBAAiB,GAAG;IAAE,OAAO,EAAE,OAAO,eAAe,CAAC,SAAS,CAAA;CAAE,GACpE,0BAA0B,CAY5B;AAED,oBAAY,0BAA0B,GAAG;KACtC,CAAC,IAAI,oBAAoB,GAAG;QAC3B,KAAK,EAAE,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC;QAC3B,IAAI,EAAE,CAAC,CAAC;QACR,IAAI,EAAE,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;KACnC;CACF,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
exports.parseSplTokenInstruction = void 0;
|
|
4
|
+
var types_1 = require("./types");
|
|
5
|
+
var validators_1 = require("../../validators");
|
|
6
|
+
var superstruct_1 = require("superstruct");
|
|
7
|
+
function parseSplTokenInstruction(ix) {
|
|
8
|
+
var parsed = (0, superstruct_1.create)(ix.parsed, validators_1.ParsedInfo);
|
|
9
|
+
var rawType = parsed.type, info = parsed.info;
|
|
10
|
+
var type = (0, superstruct_1.create)(rawType, types_1.TokenInstructionType);
|
|
11
|
+
var title = types_1.IX_TITLES[type];
|
|
12
|
+
var struct = types_1.IX_STRUCTS[type];
|
|
13
|
+
return {
|
|
14
|
+
type: type,
|
|
15
|
+
title: title,
|
|
16
|
+
info: (0, superstruct_1.create)(info, struct)
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
exports.parseSplTokenInstruction = parseSplTokenInstruction;
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/families/solana/api/chain/instruction/token/index.ts"],"names":[],"mappings":";;;AACA,iCAAsE;AAEtE,+CAA8C;AAC9C,2CAA4C;AAG5C,SAAgB,wBAAwB,CACtC,EAAqE;IAErE,IAAM,MAAM,GAAG,IAAA,oBAAM,EAAC,EAAE,CAAC,MAAM,EAAE,uBAAU,CAAC,CAAC;IACrC,IAAM,OAAO,GAAW,MAAM,KAAjB,EAAE,IAAI,GAAK,MAAM,KAAX,CAAY;IACvC,IAAM,IAAI,GAAG,IAAA,oBAAM,EAAC,OAAO,EAAE,4BAAoB,CAAC,CAAC;IACnD,IAAM,KAAK,GAAG,iBAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,IAAM,MAAM,GAAG,kBAAU,CAAC,IAAI,CAAC,CAAC;IAEhC,OAAO;QACL,IAAI,MAAA;QACJ,KAAK,EAAE,KAAY;QACnB,IAAI,EAAE,IAAA,oBAAM,EAAC,IAAI,EAAE,MAAa,CAAQ;KACzC,CAAC;AACJ,CAAC;AAdD,4DAcC"}
|