@airgap/tezos 0.13.7-beta.11
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/LICENSE.md +7 -0
- package/actions/GetKtAccountsAction.d.ts +8 -0
- package/actions/GetKtAccountsAction.js +85 -0
- package/actions/GetKtAccountsAction.js.map +1 -0
- package/airgap-coinlib-tezos.min.js +103587 -0
- package/constants.d.ts +18 -0
- package/constants.js +28 -0
- package/constants.js.map +1 -0
- package/index.d.ts +46 -0
- package/index.js +103 -0
- package/index.js.map +1 -0
- package/package.json +70 -0
- package/protocol/TezosAddress.d.ts +11 -0
- package/protocol/TezosAddress.js +102 -0
- package/protocol/TezosAddress.js.map +1 -0
- package/protocol/TezosCryptoClient.d.ts +15 -0
- package/protocol/TezosCryptoClient.js +152 -0
- package/protocol/TezosCryptoClient.js.map +1 -0
- package/protocol/TezosProtocol.d.ts +349 -0
- package/protocol/TezosProtocol.js +1853 -0
- package/protocol/TezosProtocol.js.map +1 -0
- package/protocol/TezosProtocolOptions.d.ts +29 -0
- package/protocol/TezosProtocolOptions.js +114 -0
- package/protocol/TezosProtocolOptions.js.map +1 -0
- package/protocol/TezosUtils.d.ts +40 -0
- package/protocol/TezosUtils.js +296 -0
- package/protocol/TezosUtils.js.map +1 -0
- package/protocol/contract/TezosContract.d.ts +52 -0
- package/protocol/contract/TezosContract.js +509 -0
- package/protocol/contract/TezosContract.js.map +1 -0
- package/protocol/contract/TezosContractCall.d.ts +10 -0
- package/protocol/contract/TezosContractCall.js +23 -0
- package/protocol/contract/TezosContractCall.js.map +1 -0
- package/protocol/contract/TezosContractEntrypoint.d.ts +8 -0
- package/protocol/contract/TezosContractEntrypoint.js +27 -0
- package/protocol/contract/TezosContractEntrypoint.js.map +1 -0
- package/protocol/contract/TezosContractStorage.d.ts +7 -0
- package/protocol/contract/TezosContractStorage.js +16 -0
- package/protocol/contract/TezosContractStorage.js.map +1 -0
- package/protocol/contract/remote-data/TezosContractRemoteDataFactory.d.ts +11 -0
- package/protocol/contract/remote-data/TezosContractRemoteDataFactory.js +34 -0
- package/protocol/contract/remote-data/TezosContractRemoteDataFactory.js.map +1 -0
- package/protocol/contract/remote-data/TezosStorageRemoteData.d.ts +12 -0
- package/protocol/contract/remote-data/TezosStorageRemoteData.js +151 -0
- package/protocol/contract/remote-data/TezosStorageRemoteData.js.map +1 -0
- package/protocol/domains/TezosDomains.d.ts +20 -0
- package/protocol/domains/TezosDomains.js +306 -0
- package/protocol/domains/TezosDomains.js.map +1 -0
- package/protocol/fa/TezosBTC.d.ts +12 -0
- package/protocol/fa/TezosBTC.js +107 -0
- package/protocol/fa/TezosBTC.js.map +1 -0
- package/protocol/fa/TezosBTCtez.d.ts +10 -0
- package/protocol/fa/TezosBTCtez.js +54 -0
- package/protocol/fa/TezosBTCtez.js.map +1 -0
- package/protocol/fa/TezosCTez.d.ts +10 -0
- package/protocol/fa/TezosCTez.js +51 -0
- package/protocol/fa/TezosCTez.js.map +1 -0
- package/protocol/fa/TezosDOGA.d.ts +10 -0
- package/protocol/fa/TezosDOGA.js +51 -0
- package/protocol/fa/TezosDOGA.js.map +1 -0
- package/protocol/fa/TezosETHtz.d.ts +9 -0
- package/protocol/fa/TezosETHtz.js +72 -0
- package/protocol/fa/TezosETHtz.js.map +1 -0
- package/protocol/fa/TezosFA1Protocol.d.ts +27 -0
- package/protocol/fa/TezosFA1Protocol.js +310 -0
- package/protocol/fa/TezosFA1Protocol.js.map +1 -0
- package/protocol/fa/TezosFA1p2Protocol.d.ts +8 -0
- package/protocol/fa/TezosFA1p2Protocol.js +117 -0
- package/protocol/fa/TezosFA1p2Protocol.js.map +1 -0
- package/protocol/fa/TezosFA2Protocol.d.ts +58 -0
- package/protocol/fa/TezosFA2Protocol.js +449 -0
- package/protocol/fa/TezosFA2Protocol.js.map +1 -0
- package/protocol/fa/TezosFAProtocol.d.ts +65 -0
- package/protocol/fa/TezosFAProtocol.js +510 -0
- package/protocol/fa/TezosFAProtocol.js.map +1 -0
- package/protocol/fa/TezosFAProtocolOptions.d.ts +54 -0
- package/protocol/fa/TezosFAProtocolOptions.js +228 -0
- package/protocol/fa/TezosFAProtocolOptions.js.map +1 -0
- package/protocol/fa/TezosKolibriUSD.d.ts +10 -0
- package/protocol/fa/TezosKolibriUSD.js +74 -0
- package/protocol/fa/TezosKolibriUSD.js.map +1 -0
- package/protocol/fa/TezosPlanty.d.ts +10 -0
- package/protocol/fa/TezosPlanty.js +51 -0
- package/protocol/fa/TezosPlanty.js.map +1 -0
- package/protocol/fa/TezosQUIPU.d.ts +10 -0
- package/protocol/fa/TezosQUIPU.js +54 -0
- package/protocol/fa/TezosQUIPU.js.map +1 -0
- package/protocol/fa/TezosSIRS.d.ts +10 -0
- package/protocol/fa/TezosSIRS.js +51 -0
- package/protocol/fa/TezosSIRS.js.map +1 -0
- package/protocol/fa/TezosStaker.d.ts +10 -0
- package/protocol/fa/TezosStaker.js +74 -0
- package/protocol/fa/TezosStaker.js.map +1 -0
- package/protocol/fa/TezosUBTC.d.ts +10 -0
- package/protocol/fa/TezosUBTC.js +54 -0
- package/protocol/fa/TezosUBTC.js.map +1 -0
- package/protocol/fa/TezosUDEFI.d.ts +10 -0
- package/protocol/fa/TezosUDEFI.js +54 -0
- package/protocol/fa/TezosUDEFI.js.map +1 -0
- package/protocol/fa/TezosUSD.d.ts +10 -0
- package/protocol/fa/TezosUSD.js +74 -0
- package/protocol/fa/TezosUSD.js.map +1 -0
- package/protocol/fa/TezosUSDT.d.ts +10 -0
- package/protocol/fa/TezosUSDT.js +54 -0
- package/protocol/fa/TezosUSDT.js.map +1 -0
- package/protocol/fa/TezosUUSD.d.ts +6 -0
- package/protocol/fa/TezosUUSD.js +31 -0
- package/protocol/fa/TezosUUSD.js.map +1 -0
- package/protocol/fa/TezosWRAP.d.ts +10 -0
- package/protocol/fa/TezosWRAP.js +54 -0
- package/protocol/fa/TezosWRAP.js.map +1 -0
- package/protocol/fa/TezosWrapped.d.ts +10 -0
- package/protocol/fa/TezosWrapped.js +74 -0
- package/protocol/fa/TezosWrapped.js.map +1 -0
- package/protocol/fa/TezosYOU.d.ts +6 -0
- package/protocol/fa/TezosYOU.js +31 -0
- package/protocol/fa/TezosYOU.js.map +1 -0
- package/protocol/indexerClient/TezosIndexerClient.d.ts +25 -0
- package/protocol/indexerClient/TezosIndexerClient.js +251 -0
- package/protocol/indexerClient/TezosIndexerClient.js.map +1 -0
- package/protocol/indexerClient/TezosProtocolIndexerClient.d.ts +26 -0
- package/protocol/indexerClient/TezosProtocolIndexerClient.js +3 -0
- package/protocol/indexerClient/TezosProtocolIndexerClient.js.map +1 -0
- package/protocol/kt/TezosKtAddress.d.ts +5 -0
- package/protocol/kt/TezosKtAddress.js +72 -0
- package/protocol/kt/TezosKtAddress.js.map +1 -0
- package/protocol/kt/TezosKtProtocol.d.ts +30 -0
- package/protocol/kt/TezosKtProtocol.js +317 -0
- package/protocol/kt/TezosKtProtocol.js.map +1 -0
- package/protocol/sapling/TezosSaplingAddress.d.ts +12 -0
- package/protocol/sapling/TezosSaplingAddress.js +134 -0
- package/protocol/sapling/TezosSaplingAddress.js.map +1 -0
- package/protocol/sapling/TezosSaplingCryptoClient.d.ts +34 -0
- package/protocol/sapling/TezosSaplingCryptoClient.js +241 -0
- package/protocol/sapling/TezosSaplingCryptoClient.js.map +1 -0
- package/protocol/sapling/TezosSaplingProtocol.d.ts +130 -0
- package/protocol/sapling/TezosSaplingProtocol.js +1101 -0
- package/protocol/sapling/TezosSaplingProtocol.js.map +1 -0
- package/protocol/sapling/TezosSaplingProtocolOptions.d.ts +43 -0
- package/protocol/sapling/TezosSaplingProtocolOptions.js +78 -0
- package/protocol/sapling/TezosSaplingProtocolOptions.js.map +1 -0
- package/protocol/sapling/TezosShieldedTezProtocol.d.ts +9 -0
- package/protocol/sapling/TezosShieldedTezProtocol.js +109 -0
- package/protocol/sapling/TezosShieldedTezProtocol.js.map +1 -0
- package/protocol/sapling/node/TezosSaplingNodeClient.d.ts +8 -0
- package/protocol/sapling/node/TezosSaplingNodeClient.js +78 -0
- package/protocol/sapling/node/TezosSaplingNodeClient.js.map +1 -0
- package/protocol/sapling/utils/TezosSaplingBookkeeper.d.ts +34 -0
- package/protocol/sapling/utils/TezosSaplingBookkeeper.js +586 -0
- package/protocol/sapling/utils/TezosSaplingBookkeeper.js.map +1 -0
- package/protocol/sapling/utils/TezosSaplingEncoder.d.ts +22 -0
- package/protocol/sapling/utils/TezosSaplingEncoder.js +158 -0
- package/protocol/sapling/utils/TezosSaplingEncoder.js.map +1 -0
- package/protocol/sapling/utils/TezosSaplingForger.d.ts +26 -0
- package/protocol/sapling/utils/TezosSaplingForger.js +278 -0
- package/protocol/sapling/utils/TezosSaplingForger.js.map +1 -0
- package/protocol/sapling/utils/TezosSaplingState.d.ts +17 -0
- package/protocol/sapling/utils/TezosSaplingState.js +260 -0
- package/protocol/sapling/utils/TezosSaplingState.js.map +1 -0
- package/protocol/types/TezosAddressCursor.d.ts +3 -0
- package/protocol/types/TezosAddressCursor.js +3 -0
- package/protocol/types/TezosAddressCursor.js.map +1 -0
- package/protocol/types/TezosAddressResult.d.ts +4 -0
- package/protocol/types/TezosAddressResult.js +3 -0
- package/protocol/types/TezosAddressResult.js.map +1 -0
- package/protocol/types/TezosBlockHeader.d.ts +13 -0
- package/protocol/types/TezosBlockHeader.js +3 -0
- package/protocol/types/TezosBlockHeader.js.map +1 -0
- package/protocol/types/TezosBlockMetadata.d.ts +7 -0
- package/protocol/types/TezosBlockMetadata.js +3 -0
- package/protocol/types/TezosBlockMetadata.js.map +1 -0
- package/protocol/types/TezosContractCode.d.ts +5 -0
- package/protocol/types/TezosContractCode.js +3 -0
- package/protocol/types/TezosContractCode.js.map +1 -0
- package/protocol/types/TezosOperationType.d.ts +13 -0
- package/protocol/types/TezosOperationType.js +18 -0
- package/protocol/types/TezosOperationType.js.map +1 -0
- package/protocol/types/TezosTransactionCursor.d.ts +3 -0
- package/protocol/types/TezosTransactionCursor.js +3 -0
- package/protocol/types/TezosTransactionCursor.js.map +1 -0
- package/protocol/types/TezosTransactionResult.d.ts +6 -0
- package/protocol/types/TezosTransactionResult.js +3 -0
- package/protocol/types/TezosTransactionResult.js.map +1 -0
- package/protocol/types/TezosWrappedOperation.d.ts +5 -0
- package/protocol/types/TezosWrappedOperation.js +3 -0
- package/protocol/types/TezosWrappedOperation.js.map +1 -0
- package/protocol/types/contract/BigMap.d.ts +7 -0
- package/protocol/types/contract/BigMap.js +3 -0
- package/protocol/types/contract/BigMap.js.map +1 -0
- package/protocol/types/contract/BigMapEnrtyFilter.d.ts +5 -0
- package/protocol/types/contract/BigMapEnrtyFilter.js +3 -0
- package/protocol/types/contract/BigMapEnrtyFilter.js.map +1 -0
- package/protocol/types/contract/BigMapEntry.d.ts +7 -0
- package/protocol/types/contract/BigMapEntry.js +3 -0
- package/protocol/types/contract/BigMapEntry.js.map +1 -0
- package/protocol/types/contract/BigMapRequest.d.ts +8 -0
- package/protocol/types/contract/BigMapRequest.js +3 -0
- package/protocol/types/contract/BigMapRequest.js.map +1 -0
- package/protocol/types/contract/TezosContractMetadata.d.ts +61 -0
- package/protocol/types/contract/TezosContractMetadata.js +3 -0
- package/protocol/types/contract/TezosContractMetadata.js.map +1 -0
- package/protocol/types/domains/TezosDomainsRecord.d.ts +8 -0
- package/protocol/types/domains/TezosDomainsRecord.js +3 -0
- package/protocol/types/domains/TezosDomainsRecord.js.map +1 -0
- package/protocol/types/domains/TezosDomainsReverseRecord.d.ts +5 -0
- package/protocol/types/domains/TezosDomainsReverseRecord.js +3 -0
- package/protocol/types/domains/TezosDomainsReverseRecord.js.map +1 -0
- package/protocol/types/fa/TezosFA2BalanceOfRequest.d.ts +4 -0
- package/protocol/types/fa/TezosFA2BalanceOfRequest.js +3 -0
- package/protocol/types/fa/TezosFA2BalanceOfRequest.js.map +1 -0
- package/protocol/types/fa/TezosFA2BalanceOfResponse.d.ts +5 -0
- package/protocol/types/fa/TezosFA2BalanceOfResponse.js +3 -0
- package/protocol/types/fa/TezosFA2BalanceOfResponse.js.map +1 -0
- package/protocol/types/fa/TezosFA2TransferRequest.d.ts +8 -0
- package/protocol/types/fa/TezosFA2TransferRequest.js +3 -0
- package/protocol/types/fa/TezosFA2TransferRequest.js.map +1 -0
- package/protocol/types/fa/TezosFA2UpdateOperatorRequest.d.ts +6 -0
- package/protocol/types/fa/TezosFA2UpdateOperatorRequest.js +3 -0
- package/protocol/types/fa/TezosFA2UpdateOperatorRequest.js.map +1 -0
- package/protocol/types/fa/TezosFATokenMetadata.d.ts +6 -0
- package/protocol/types/fa/TezosFATokenMetadata.js +3 -0
- package/protocol/types/fa/TezosFATokenMetadata.js.map +1 -0
- package/protocol/types/kt/TezosKtAddressCursor.d.ts +4 -0
- package/protocol/types/kt/TezosKtAddressCursor.js +3 -0
- package/protocol/types/kt/TezosKtAddressCursor.js.map +1 -0
- package/protocol/types/kt/TezosKtAddressResult.d.ts +5 -0
- package/protocol/types/kt/TezosKtAddressResult.js +3 -0
- package/protocol/types/kt/TezosKtAddressResult.js.map +1 -0
- package/protocol/types/micheline/MichelineNode.d.ts +15 -0
- package/protocol/types/micheline/MichelineNode.js +5 -0
- package/protocol/types/micheline/MichelineNode.js.map +1 -0
- package/protocol/types/micheline/MichelineNodeUtils.d.ts +6 -0
- package/protocol/types/micheline/MichelineNodeUtils.js +40 -0
- package/protocol/types/micheline/MichelineNodeUtils.js.map +1 -0
- package/protocol/types/michelson/MichelsonType.d.ts +11 -0
- package/protocol/types/michelson/MichelsonType.js +22 -0
- package/protocol/types/michelson/MichelsonType.js.map +1 -0
- package/protocol/types/michelson/MichelsonTypeMeta.d.ts +33 -0
- package/protocol/types/michelson/MichelsonTypeMeta.js +132 -0
- package/protocol/types/michelson/MichelsonTypeMeta.js.map +1 -0
- package/protocol/types/michelson/MichelsonTypeUtils.d.ts +19 -0
- package/protocol/types/michelson/MichelsonTypeUtils.js +249 -0
- package/protocol/types/michelson/MichelsonTypeUtils.js.map +1 -0
- package/protocol/types/michelson/generics/MichelsonList.d.ts +11 -0
- package/protocol/types/michelson/generics/MichelsonList.js +68 -0
- package/protocol/types/michelson/generics/MichelsonList.js.map +1 -0
- package/protocol/types/michelson/generics/MichelsonMap.d.ts +14 -0
- package/protocol/types/michelson/generics/MichelsonMap.js +118 -0
- package/protocol/types/michelson/generics/MichelsonMap.js.map +1 -0
- package/protocol/types/michelson/generics/MichelsonOption.d.ts +25 -0
- package/protocol/types/michelson/generics/MichelsonOption.js +119 -0
- package/protocol/types/michelson/generics/MichelsonOption.js.map +1 -0
- package/protocol/types/michelson/generics/MichelsonOr.d.ts +25 -0
- package/protocol/types/michelson/generics/MichelsonOr.js +132 -0
- package/protocol/types/michelson/generics/MichelsonOr.js.map +1 -0
- package/protocol/types/michelson/generics/MichelsonPair.d.ts +17 -0
- package/protocol/types/michelson/generics/MichelsonPair.js +135 -0
- package/protocol/types/michelson/generics/MichelsonPair.js.map +1 -0
- package/protocol/types/michelson/grammar/MichelsonGrammarData.d.ts +2 -0
- package/protocol/types/michelson/grammar/MichelsonGrammarData.js +4 -0
- package/protocol/types/michelson/grammar/MichelsonGrammarData.js.map +1 -0
- package/protocol/types/michelson/grammar/MichelsonGrammarInstruction.d.ts +1 -0
- package/protocol/types/michelson/grammar/MichelsonGrammarInstruction.js +4 -0
- package/protocol/types/michelson/grammar/MichelsonGrammarInstruction.js.map +1 -0
- package/protocol/types/michelson/grammar/MichelsonGrammarType.d.ts +1 -0
- package/protocol/types/michelson/grammar/MichelsonGrammarType.js +4 -0
- package/protocol/types/michelson/grammar/MichelsonGrammarType.js.map +1 -0
- package/protocol/types/michelson/primitives/MichelsonAddress.d.ts +15 -0
- package/protocol/types/michelson/primitives/MichelsonAddress.js +72 -0
- package/protocol/types/michelson/primitives/MichelsonAddress.js.map +1 -0
- package/protocol/types/michelson/primitives/MichelsonBool.d.ts +12 -0
- package/protocol/types/michelson/primitives/MichelsonBool.js +57 -0
- package/protocol/types/michelson/primitives/MichelsonBool.js.map +1 -0
- package/protocol/types/michelson/primitives/MichelsonBytes.d.ts +14 -0
- package/protocol/types/michelson/primitives/MichelsonBytes.js +75 -0
- package/protocol/types/michelson/primitives/MichelsonBytes.js.map +1 -0
- package/protocol/types/michelson/primitives/MichelsonInt.d.ts +14 -0
- package/protocol/types/michelson/primitives/MichelsonInt.js +72 -0
- package/protocol/types/michelson/primitives/MichelsonInt.js.map +1 -0
- package/protocol/types/michelson/primitives/MichelsonString.d.ts +14 -0
- package/protocol/types/michelson/primitives/MichelsonString.js +74 -0
- package/protocol/types/michelson/primitives/MichelsonString.js.map +1 -0
- package/protocol/types/michelson/primitives/MichelsonUnit.d.ts +9 -0
- package/protocol/types/michelson/primitives/MichelsonUnit.js +53 -0
- package/protocol/types/michelson/primitives/MichelsonUnit.js.map +1 -0
- package/protocol/types/operations/ActivateAccount.d.ts +7 -0
- package/protocol/types/operations/ActivateAccount.js +3 -0
- package/protocol/types/operations/ActivateAccount.js.map +1 -0
- package/protocol/types/operations/Ballot.d.ts +9 -0
- package/protocol/types/operations/Ballot.js +3 -0
- package/protocol/types/operations/Ballot.js.map +1 -0
- package/protocol/types/operations/Delegation.d.ts +11 -0
- package/protocol/types/operations/Delegation.js +3 -0
- package/protocol/types/operations/Delegation.js.map +1 -0
- package/protocol/types/operations/DoubleBakingEvidence.d.ts +8 -0
- package/protocol/types/operations/DoubleBakingEvidence.js +3 -0
- package/protocol/types/operations/DoubleBakingEvidence.js.map +1 -0
- package/protocol/types/operations/DoubleEndorsementEvidence.d.ts +16 -0
- package/protocol/types/operations/DoubleEndorsementEvidence.js +3 -0
- package/protocol/types/operations/DoubleEndorsementEvidence.js.map +1 -0
- package/protocol/types/operations/Endorsement.d.ts +6 -0
- package/protocol/types/operations/Endorsement.js +3 -0
- package/protocol/types/operations/Endorsement.js.map +1 -0
- package/protocol/types/operations/Origination.d.ts +13 -0
- package/protocol/types/operations/Origination.js +3 -0
- package/protocol/types/operations/Origination.js.map +1 -0
- package/protocol/types/operations/Proposal.d.ts +7 -0
- package/protocol/types/operations/Proposal.js +3 -0
- package/protocol/types/operations/Proposal.js.map +1 -0
- package/protocol/types/operations/Reveal.d.ts +11 -0
- package/protocol/types/operations/Reveal.js +3 -0
- package/protocol/types/operations/Reveal.js.map +1 -0
- package/protocol/types/operations/SeedNonceRevelation.d.ts +7 -0
- package/protocol/types/operations/SeedNonceRevelation.js +3 -0
- package/protocol/types/operations/SeedNonceRevelation.js.map +1 -0
- package/protocol/types/operations/TezosOperation.d.ts +4 -0
- package/protocol/types/operations/TezosOperation.js +3 -0
- package/protocol/types/operations/TezosOperation.js.map +1 -0
- package/protocol/types/operations/Transaction.d.ts +23 -0
- package/protocol/types/operations/Transaction.js +3 -0
- package/protocol/types/operations/Transaction.js.map +1 -0
- package/protocol/types/sapling/TezosSaplingAddressCursor.d.ts +4 -0
- package/protocol/types/sapling/TezosSaplingAddressCursor.js +3 -0
- package/protocol/types/sapling/TezosSaplingAddressCursor.js.map +1 -0
- package/protocol/types/sapling/TezosSaplingAddressResult.d.ts +4 -0
- package/protocol/types/sapling/TezosSaplingAddressResult.js +3 -0
- package/protocol/types/sapling/TezosSaplingAddressResult.js.map +1 -0
- package/protocol/types/sapling/TezosSaplingCiphertext.d.ts +8 -0
- package/protocol/types/sapling/TezosSaplingCiphertext.js +3 -0
- package/protocol/types/sapling/TezosSaplingCiphertext.js.map +1 -0
- package/protocol/types/sapling/TezosSaplingInput.d.ts +6 -0
- package/protocol/types/sapling/TezosSaplingInput.js +3 -0
- package/protocol/types/sapling/TezosSaplingInput.js.map +1 -0
- package/protocol/types/sapling/TezosSaplingOutput.d.ts +6 -0
- package/protocol/types/sapling/TezosSaplingOutput.js +3 -0
- package/protocol/types/sapling/TezosSaplingOutput.js.map +1 -0
- package/protocol/types/sapling/TezosSaplingStateDiff.d.ts +6 -0
- package/protocol/types/sapling/TezosSaplingStateDiff.js +3 -0
- package/protocol/types/sapling/TezosSaplingStateDiff.js.map +1 -0
- package/protocol/types/sapling/TezosSaplingStateTree.d.ts +7 -0
- package/protocol/types/sapling/TezosSaplingStateTree.js +3 -0
- package/protocol/types/sapling/TezosSaplingStateTree.js.map +1 -0
- package/protocol/types/sapling/TezosSaplingTransaction.d.ts +23 -0
- package/protocol/types/sapling/TezosSaplingTransaction.js +3 -0
- package/protocol/types/sapling/TezosSaplingTransaction.js.map +1 -0
- package/protocol/types/sapling/TezosSaplingTransactionCursor.d.ts +3 -0
- package/protocol/types/sapling/TezosSaplingTransactionCursor.js +3 -0
- package/protocol/types/sapling/TezosSaplingTransactionCursor.js.map +1 -0
- package/protocol/types/sapling/TezosSaplingTransactionResult.d.ts +6 -0
- package/protocol/types/sapling/TezosSaplingTransactionResult.js +3 -0
- package/protocol/types/sapling/TezosSaplingTransactionResult.js.map +1 -0
- package/protocol/types/utils.d.ts +8 -0
- package/protocol/types/utils.js +41 -0
- package/protocol/types/utils.js.map +1 -0
- package/readme.md +121 -0
- package/types/signed-transaction-tezos-sapling.d.ts +3 -0
- package/types/signed-transaction-tezos-sapling.js +3 -0
- package/types/signed-transaction-tezos-sapling.js.map +1 -0
- package/types/signed-transaction-tezos.d.ts +5 -0
- package/types/signed-transaction-tezos.js +3 -0
- package/types/signed-transaction-tezos.js.map +1 -0
- package/types/transaction-tezos.d.ts +14 -0
- package/types/transaction-tezos.js +3 -0
- package/types/transaction-tezos.js.map +1 -0
- package/types/unsigned-transaction-tezos-sapling.d.ts +38 -0
- package/types/unsigned-transaction-tezos-sapling.js +3 -0
- package/types/unsigned-transaction-tezos-sapling.js.map +1 -0
- package/types/unsigned-transaction-tezos.d.ts +8 -0
- package/types/unsigned-transaction-tezos.js +3 -0
- package/types/unsigned-transaction-tezos.js.map +1 -0
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.TezosIndexerClient = void 0;
|
|
43
|
+
var axios_0_19_0_1 = __importDefault(require("@airgap/coinlib-core/dependencies/src/axios-0.19.0"));
|
|
44
|
+
var bignumber_1 = __importDefault(require("@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber"));
|
|
45
|
+
var TezosIndexerClient = /** @class */ (function () {
|
|
46
|
+
function TezosIndexerClient(baseUrl) {
|
|
47
|
+
this.baseUrl = baseUrl;
|
|
48
|
+
}
|
|
49
|
+
TezosIndexerClient.prototype.getTransactions = function (address, limit, offset) {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
51
|
+
var url, result;
|
|
52
|
+
return __generator(this, function (_a) {
|
|
53
|
+
switch (_a.label) {
|
|
54
|
+
case 0:
|
|
55
|
+
url = this.url("/accounts/" + address + "/operations", 'type=transaction', limit, offset);
|
|
56
|
+
return [4 /*yield*/, axios_0_19_0_1.default.get(url)];
|
|
57
|
+
case 1:
|
|
58
|
+
result = (_a.sent()).data;
|
|
59
|
+
return [2 /*return*/, result.map(function (transaction) { return ({
|
|
60
|
+
amount: new bignumber_1.default(transaction.amount).toFixed(),
|
|
61
|
+
fee: new bignumber_1.default(transaction.bakerFee).toFixed(),
|
|
62
|
+
from: [transaction.sender.address],
|
|
63
|
+
to: [transaction.target.address],
|
|
64
|
+
isInbound: transaction.target.address === address,
|
|
65
|
+
hash: transaction.hash,
|
|
66
|
+
timestamp: Math.floor(new Date(transaction.timestamp).getTime() / 1000),
|
|
67
|
+
blockHeight: transaction.level,
|
|
68
|
+
status: transaction.status
|
|
69
|
+
}); })];
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
TezosIndexerClient.prototype.getDelegationInfo = function (address) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
76
|
+
var url, result;
|
|
77
|
+
return __generator(this, function (_a) {
|
|
78
|
+
switch (_a.label) {
|
|
79
|
+
case 0:
|
|
80
|
+
url = this.url("/accounts/" + address);
|
|
81
|
+
return [4 /*yield*/, axios_0_19_0_1.default.get(url)];
|
|
82
|
+
case 1:
|
|
83
|
+
result = (_a.sent()).data;
|
|
84
|
+
return [2 /*return*/, result.delegate !== undefined && result.delegate.active
|
|
85
|
+
? {
|
|
86
|
+
date: new Date(result.delegationTime),
|
|
87
|
+
level: result.delegationLevel
|
|
88
|
+
}
|
|
89
|
+
: undefined];
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
TezosIndexerClient.prototype.getTokenTransactionsForAddress = function (token, address, limit, offset) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
96
|
+
var url, result;
|
|
97
|
+
return __generator(this, function (_a) {
|
|
98
|
+
switch (_a.label) {
|
|
99
|
+
case 0:
|
|
100
|
+
url = this.url("/tokens/transfers", "anyof.from.to.eq=" + address + "&token.contract=" + token.contractAddress + "&token.tokenId=" + token.id, limit, offset);
|
|
101
|
+
return [4 /*yield*/, axios_0_19_0_1.default.get(url)];
|
|
102
|
+
case 1:
|
|
103
|
+
result = (_a.sent()).data;
|
|
104
|
+
return [2 /*return*/, result.map(function (transaction) {
|
|
105
|
+
var _a, _b, _c, _d;
|
|
106
|
+
return ({
|
|
107
|
+
amount: transaction.amount,
|
|
108
|
+
fee: '0',
|
|
109
|
+
from: [(_b = (_a = transaction.from) === null || _a === void 0 ? void 0 : _a.address) !== null && _b !== void 0 ? _b : ''],
|
|
110
|
+
to: [(_d = (_c = transaction.to) === null || _c === void 0 ? void 0 : _c.address) !== null && _d !== void 0 ? _d : ''],
|
|
111
|
+
isInbound: transaction.to.address === address,
|
|
112
|
+
timestamp: Math.floor(new Date(transaction.timestamp).getTime() / 1000),
|
|
113
|
+
blockHeight: transaction.level
|
|
114
|
+
});
|
|
115
|
+
})];
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
TezosIndexerClient.prototype.getTokenTransactions = function (token, limit, offset) {
|
|
121
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
122
|
+
var url, result;
|
|
123
|
+
return __generator(this, function (_a) {
|
|
124
|
+
switch (_a.label) {
|
|
125
|
+
case 0:
|
|
126
|
+
url = this.url("/tokens/transfers", "token.contract=" + token.contractAddress + "&token.tokenId=" + token.id, limit, offset);
|
|
127
|
+
return [4 /*yield*/, axios_0_19_0_1.default.get(url)];
|
|
128
|
+
case 1:
|
|
129
|
+
result = (_a.sent()).data;
|
|
130
|
+
return [2 /*return*/, result.map(function (transaction) {
|
|
131
|
+
var _a, _b, _c, _d;
|
|
132
|
+
return ({
|
|
133
|
+
amount: transaction.amount,
|
|
134
|
+
fee: '0',
|
|
135
|
+
from: [(_b = (_a = transaction.from) === null || _a === void 0 ? void 0 : _a.address) !== null && _b !== void 0 ? _b : ''],
|
|
136
|
+
to: [(_d = (_c = transaction.to) === null || _c === void 0 ? void 0 : _c.address) !== null && _d !== void 0 ? _d : ''],
|
|
137
|
+
isInbound: false,
|
|
138
|
+
timestamp: Math.floor(new Date(transaction.timestamp).getTime() / 1000),
|
|
139
|
+
blockHeight: transaction.level
|
|
140
|
+
});
|
|
141
|
+
})];
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
};
|
|
146
|
+
TezosIndexerClient.prototype.getTokenBalances = function (token, limit, offset) {
|
|
147
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
148
|
+
var url, result;
|
|
149
|
+
return __generator(this, function (_a) {
|
|
150
|
+
switch (_a.label) {
|
|
151
|
+
case 0:
|
|
152
|
+
url = this.url("/tokens/balances", "token.contract=" + token.contractAddress + "&token.tokenId=" + token.id + "&balance.gt=0", limit, offset);
|
|
153
|
+
return [4 /*yield*/, axios_0_19_0_1.default.get(url)];
|
|
154
|
+
case 1:
|
|
155
|
+
result = (_a.sent()).data;
|
|
156
|
+
return [2 /*return*/, result.map(function (item) { return ({
|
|
157
|
+
address: item.account.address,
|
|
158
|
+
amount: item.balance
|
|
159
|
+
}); })];
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
};
|
|
164
|
+
TezosIndexerClient.prototype.getContractBigMaps = function (contractAddress, limit, offset) {
|
|
165
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
166
|
+
var url, result;
|
|
167
|
+
return __generator(this, function (_a) {
|
|
168
|
+
switch (_a.label) {
|
|
169
|
+
case 0:
|
|
170
|
+
url = this.url("/contracts/" + contractAddress + "/bigmaps", 'micheline=2', limit, offset);
|
|
171
|
+
return [4 /*yield*/, axios_0_19_0_1.default.get(url)];
|
|
172
|
+
case 1:
|
|
173
|
+
result = (_a.sent()).data;
|
|
174
|
+
return [2 /*return*/, result.map(function (bigMap) { return ({
|
|
175
|
+
id: bigMap.ptr,
|
|
176
|
+
path: bigMap.path,
|
|
177
|
+
keyType: bigMap.keyType,
|
|
178
|
+
valueType: bigMap.valueType
|
|
179
|
+
}); })];
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
TezosIndexerClient.prototype.getContractBigMapValues = function (contractAddress, bigMap, filters, limit, offset) {
|
|
185
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
186
|
+
var url, _i, filters_1, filter, result;
|
|
187
|
+
return __generator(this, function (_a) {
|
|
188
|
+
switch (_a.label) {
|
|
189
|
+
case 0:
|
|
190
|
+
url = this.url("/contracts/" + contractAddress + "/bigmaps/" + bigMap.path + "/keys", 'micheline=2', limit, offset);
|
|
191
|
+
if (filters !== undefined) {
|
|
192
|
+
for (_i = 0, filters_1 = filters; _i < filters_1.length; _i++) {
|
|
193
|
+
filter = filters_1[_i];
|
|
194
|
+
url = url + "&" + filter.field + "." + filter.operation + "=" + filter.value;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return [4 /*yield*/, axios_0_19_0_1.default.get(url)];
|
|
198
|
+
case 1:
|
|
199
|
+
result = (_a.sent()).data;
|
|
200
|
+
return [2 /*return*/, result.map(function (entry) { return ({
|
|
201
|
+
bigMapId: bigMap.id,
|
|
202
|
+
key: entry.key,
|
|
203
|
+
keyHash: entry.hash,
|
|
204
|
+
value: entry.value
|
|
205
|
+
}); })];
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
};
|
|
210
|
+
TezosIndexerClient.prototype.getContractBigMapValue = function (contractAddress, bigMap, key, limit, offset) {
|
|
211
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
212
|
+
var url, entry;
|
|
213
|
+
return __generator(this, function (_a) {
|
|
214
|
+
switch (_a.label) {
|
|
215
|
+
case 0:
|
|
216
|
+
url = this.url("/contracts/" + contractAddress + "/bigmaps/" + bigMap.path + "/keys/" + key, 'micheline=2', limit, offset);
|
|
217
|
+
return [4 /*yield*/, axios_0_19_0_1.default.get(url)];
|
|
218
|
+
case 1:
|
|
219
|
+
entry = (_a.sent()).data;
|
|
220
|
+
return [2 /*return*/, {
|
|
221
|
+
bigMapId: bigMap.id,
|
|
222
|
+
key: entry.key,
|
|
223
|
+
keyHash: entry.hash,
|
|
224
|
+
value: entry.value
|
|
225
|
+
}];
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
};
|
|
230
|
+
TezosIndexerClient.prototype.getDelegatorContracts = function (address, limit, offset) {
|
|
231
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
232
|
+
var url, result;
|
|
233
|
+
return __generator(this, function (_a) {
|
|
234
|
+
switch (_a.label) {
|
|
235
|
+
case 0:
|
|
236
|
+
url = this.url('/operations/originations', "contractManager=" + address + "&status=applied&select=originatedContract");
|
|
237
|
+
return [4 /*yield*/, axios_0_19_0_1.default.get(url)];
|
|
238
|
+
case 1:
|
|
239
|
+
result = (_a.sent()).data;
|
|
240
|
+
return [2 /*return*/, result.filter(function (contract) { return contract.kind === 'delegator_contract'; }).map(function (contract) { return contract.address; })];
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
};
|
|
245
|
+
TezosIndexerClient.prototype.url = function (path, query, limit, offset) {
|
|
246
|
+
return this.baseUrl + "/v1" + path + (query ? "?" + query : '') + (limit ? (query ? '&' : '?') + "limit=" + limit : '') + (offset ? (query || limit ? '&' : '?') + "offset=" + offset : '');
|
|
247
|
+
};
|
|
248
|
+
return TezosIndexerClient;
|
|
249
|
+
}());
|
|
250
|
+
exports.TezosIndexerClient = TezosIndexerClient;
|
|
251
|
+
//# sourceMappingURL=TezosIndexerClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TezosIndexerClient.js","sourceRoot":"","sources":["../../../src/protocol/indexerClient/TezosIndexerClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oGAAsE;AACtE,iHAA0F;AAS1F;IACE,4BAA4B,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;IAAG,CAAC;IAElC,4CAAe,GAA5B,UACE,OAAe,EACf,KAAc,EACd,MAAe;;;;;;wBAET,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,eAAa,OAAO,gBAAa,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;wBAC1E,qBAAM,sBAAK,CAAC,GAAG,CAAQ,GAAG,CAAC,EAA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,KAAO,CAAC,CAAC,CAAC,EAAE,KAC7G,MAAM,CAAC,CAAC,CAAC,CAAG,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,gBAAU,MAAQ,CAAC,CAAC,CAAC,EAAE,CAC7D,CAAA;IACJ,CAAC;IACH,yBAAC;AAAD,CAAC,AAvJD,IAuJC;AAvJY,gDAAkB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IAirGapTransaction } from '@airgap/coinlib-core/interfaces/IAirGapTransaction';
|
|
2
|
+
import { BigMap } from '../types/contract/BigMap';
|
|
3
|
+
import { BigMapEntryFilter } from '../types/contract/BigMapEnrtyFilter';
|
|
4
|
+
import { BigMapEntry } from '../types/contract/BigMapEntry';
|
|
5
|
+
export interface Token {
|
|
6
|
+
contractAddress: string;
|
|
7
|
+
id: number;
|
|
8
|
+
}
|
|
9
|
+
export interface TezosProtocolIndexerClient {
|
|
10
|
+
baseUrl: string;
|
|
11
|
+
getTransactions(address: string, limit?: number, offset?: number): Promise<Omit<IAirGapTransaction, 'protocolIdentifier' | 'network'>[]>;
|
|
12
|
+
getDelegationInfo(address: string): Promise<{
|
|
13
|
+
date: Date;
|
|
14
|
+
level: number;
|
|
15
|
+
} | undefined>;
|
|
16
|
+
getTokenTransactionsForAddress(token: Token, address: string, limit?: number, offset?: number): Promise<Omit<IAirGapTransaction, 'protocolIdentifier' | 'network'>[]>;
|
|
17
|
+
getTokenTransactions(token: Token, limit?: number, offset?: number): Promise<Omit<IAirGapTransaction, 'protocolIdentifier' | 'network'>[]>;
|
|
18
|
+
getTokenBalances(token: Token, limit?: number, offset?: number): Promise<{
|
|
19
|
+
address: string;
|
|
20
|
+
amount: string;
|
|
21
|
+
}[]>;
|
|
22
|
+
getContractBigMaps(contractAddress: string, limit?: number, offset?: number): Promise<BigMap[]>;
|
|
23
|
+
getContractBigMapValues(contractAddress: string, bigMap: Omit<BigMap, 'keyType' | 'valueType'>, filters?: BigMapEntryFilter[], limit?: number, offset?: number): Promise<BigMapEntry[]>;
|
|
24
|
+
getContractBigMapValue(contractAddress: string, bigMap: Omit<BigMap, 'keyType' | 'valueType'>, key: string, limit?: number, offset?: number): Promise<BigMapEntry>;
|
|
25
|
+
getDelegatorContracts(address: string, limit?: number, offset?: number): Promise<string[]>;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TezosProtocolIndexerClient.js","sourceRoot":"","sources":["../../../src/protocol/indexerClient/TezosProtocolIndexerClient.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
extendStatics(d, b);
|
|
11
|
+
function __() { this.constructor = d; }
|
|
12
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
25
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
26
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
27
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
28
|
+
function step(op) {
|
|
29
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
30
|
+
while (_) try {
|
|
31
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
32
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
33
|
+
switch (op[0]) {
|
|
34
|
+
case 0: case 1: t = op; break;
|
|
35
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
36
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
37
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
38
|
+
default:
|
|
39
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
40
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
41
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
42
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
43
|
+
if (t[2]) _.ops.pop();
|
|
44
|
+
_.trys.pop(); continue;
|
|
45
|
+
}
|
|
46
|
+
op = body.call(thisArg, _);
|
|
47
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
48
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
|
+
exports.TezosKtAddress = void 0;
|
|
53
|
+
var TezosAddress_1 = require("../TezosAddress");
|
|
54
|
+
var TezosKtAddress = /** @class */ (function (_super) {
|
|
55
|
+
__extends(TezosKtAddress, _super);
|
|
56
|
+
function TezosKtAddress() {
|
|
57
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
58
|
+
}
|
|
59
|
+
TezosKtAddress.from = function (value) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
61
|
+
return __generator(this, function (_a) {
|
|
62
|
+
return [2 /*return*/, new TezosKtAddress(value)];
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
TezosKtAddress.isKtAddress = function (address) {
|
|
67
|
+
return address.startsWith('KT1');
|
|
68
|
+
};
|
|
69
|
+
return TezosKtAddress;
|
|
70
|
+
}(TezosAddress_1.TezosAddress));
|
|
71
|
+
exports.TezosKtAddress = TezosKtAddress;
|
|
72
|
+
//# sourceMappingURL=TezosKtAddress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TezosKtAddress.js","sourceRoot":"","sources":["../../../src/protocol/kt/TezosKtAddress.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA8C;AAE9C;IAAoC,kCAAY;IAAhD;;IAQA,CAAC;IAPqB,mBAAI,GAAxB,UAAyB,KAAa;;;gBACpC,sBAAO,IAAI,cAAc,CAAC,KAAK,CAAC,EAAA;;;KACjC;IAEa,0BAAW,GAAzB,UAA0B,OAAe;QACvC,OAAO,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;IAClC,CAAC;IACH,qBAAC;AAAD,CAAC,AARD,CAAoC,2BAAY,GAQ/C;AARY,wCAAc"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FeeDefaults, ICoinSubProtocol, ProtocolSymbols, SubProtocolType } from '@airgap/coinlib-core';
|
|
2
|
+
import BigNumber from '@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber';
|
|
3
|
+
import { RawTezosTransaction } from '../../types/transaction-tezos';
|
|
4
|
+
import { TezosProtocol } from '../TezosProtocol';
|
|
5
|
+
import { TezosKtAddressCursor } from '../types/kt/TezosKtAddressCursor';
|
|
6
|
+
import { TezosKtAddressResult } from '../types/kt/TezosKtAddressResult';
|
|
7
|
+
export declare class TezosKtProtocol extends TezosProtocol implements ICoinSubProtocol {
|
|
8
|
+
identifier: ProtocolSymbols;
|
|
9
|
+
isSubProtocol: boolean;
|
|
10
|
+
subProtocolType: SubProtocolType;
|
|
11
|
+
addressValidationPattern: string;
|
|
12
|
+
migrationFee: BigNumber;
|
|
13
|
+
getIsSubProtocol(): Promise<boolean>;
|
|
14
|
+
getSubProtocolType(): Promise<SubProtocolType>;
|
|
15
|
+
getContractAddress(): Promise<string | undefined>;
|
|
16
|
+
getAddressFromPublicKey(publicKey: string, cursor?: TezosKtAddressCursor): Promise<TezosKtAddressResult>;
|
|
17
|
+
getAddressesFromPublicKey(publicKey: string, cursor?: TezosKtAddressCursor): Promise<TezosKtAddressResult[]>;
|
|
18
|
+
estimateMaxTransactionValueFromPublicKey(publicKey: string, recipients: string[], fee?: string, data?: {
|
|
19
|
+
addressIndex?: number;
|
|
20
|
+
}): Promise<string>;
|
|
21
|
+
estimateFeeDefaultsFromPublicKey(publicKey: string, recipients: string[], values: string[], data?: any): Promise<FeeDefaults>;
|
|
22
|
+
prepareTransactionFromPublicKey(_publicKey: string, _recipients: string[], _values: string[], _fee: string, _data?: {
|
|
23
|
+
addressIndex: number;
|
|
24
|
+
}): Promise<RawTezosTransaction>;
|
|
25
|
+
originate(publicKey: string, delegate?: string, amount?: BigNumber): Promise<RawTezosTransaction>;
|
|
26
|
+
delegate(publicKey: string, delegate?: string): Promise<RawTezosTransaction>;
|
|
27
|
+
migrateKtContract(publicKey: string, destinationContract: string): Promise<{
|
|
28
|
+
binaryTransaction: string;
|
|
29
|
+
}>;
|
|
30
|
+
}
|