@taquito/wallet-connect 24.3.0-beta.2 → 24.3.0-beta.3
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/dist/lib/{taquito-wallet-connect/src/taquito-wallet-connect.js → taquito-wallet-connect.js} +1 -4
- package/dist/lib/{taquito-http-utils/src/version.js → version.js} +2 -2
- package/package.json +5 -7
- package/dist/lib/taquito/src/batch/constants.js +0 -16
- package/dist/lib/taquito/src/batch/rpc-batch-provider.js +0 -327
- package/dist/lib/taquito/src/constants.js +0 -135
- package/dist/lib/taquito/src/context.js +0 -178
- package/dist/lib/taquito/src/contract/big-map.js +0 -57
- package/dist/lib/taquito/src/contract/compose.js +0 -6
- package/dist/lib/taquito/src/contract/constants.js +0 -4
- package/dist/lib/taquito/src/contract/contract-methods/contract-method-factory.js +0 -18
- package/dist/lib/taquito/src/contract/contract-methods/contract-method-interface.js +0 -2
- package/dist/lib/taquito/src/contract/contract-methods/contract-method-object-param.js +0 -72
- package/dist/lib/taquito/src/contract/contract-methods/contract-on-chain-view.js +0 -111
- package/dist/lib/taquito/src/contract/contract.js +0 -158
- package/dist/lib/taquito/src/contract/errors.js +0 -140
- package/dist/lib/taquito/src/contract/index.js +0 -30
- package/dist/lib/taquito/src/contract/interface.js +0 -2
- package/dist/lib/taquito/src/contract/manager-lambda.js +0 -71
- package/dist/lib/taquito/src/contract/prepare.js +0 -231
- package/dist/lib/taquito/src/contract/rpc-contract-provider.js +0 -675
- package/dist/lib/taquito/src/contract/sapling-state-abstraction.js +0 -24
- package/dist/lib/taquito/src/contract/semantic.js +0 -43
- package/dist/lib/taquito/src/contract/view_lambda.js +0 -27
- package/dist/lib/taquito/src/errors.js +0 -42
- package/dist/lib/taquito/src/estimate/errors.js +0 -16
- package/dist/lib/taquito/src/estimate/estimate-provider-interface.js +0 -2
- package/dist/lib/taquito/src/estimate/estimate.js +0 -176
- package/dist/lib/taquito/src/estimate/index.js +0 -20
- package/dist/lib/taquito/src/estimate/rpc-estimate-provider.js +0 -640
- package/dist/lib/taquito/src/extension/extension.js +0 -2
- package/dist/lib/taquito/src/forger/composite-forger.js +0 -32
- package/dist/lib/taquito/src/forger/errors.js +0 -30
- package/dist/lib/taquito/src/forger/rpc-forger.js +0 -12
- package/dist/lib/taquito/src/forger/taquito-local-forger.js +0 -21
- package/dist/lib/taquito/src/global-constants/default-global-constants-provider.js +0 -35
- package/dist/lib/taquito/src/global-constants/errors.js +0 -30
- package/dist/lib/taquito/src/global-constants/interface-global-constants-provider.js +0 -2
- package/dist/lib/taquito/src/global-constants/noop-global-constants-provider.js +0 -10
- package/dist/lib/taquito/src/import-key.js +0 -40
- package/dist/lib/taquito/src/injector/helper.js +0 -18
- package/dist/lib/taquito/src/injector/interface.js +0 -2
- package/dist/lib/taquito/src/injector/rpc-injector.js +0 -27
- package/dist/lib/taquito/src/operations/ballot-operation.js +0 -32
- package/dist/lib/taquito/src/operations/batch-operation.js +0 -69
- package/dist/lib/taquito/src/operations/delegate-operation.js +0 -54
- package/dist/lib/taquito/src/operations/drain-delegate-operation.js +0 -31
- package/dist/lib/taquito/src/operations/errors.js +0 -133
- package/dist/lib/taquito/src/operations/failing-noop-operation.js +0 -2
- package/dist/lib/taquito/src/operations/increase-paid-storage-operation.js +0 -49
- package/dist/lib/taquito/src/operations/index.js +0 -54
- package/dist/lib/taquito/src/operations/operations.js +0 -193
- package/dist/lib/taquito/src/operations/origination-operation.js +0 -78
- package/dist/lib/taquito/src/operations/proposals-operation.js +0 -29
- package/dist/lib/taquito/src/operations/register-global-constant-operation.js +0 -52
- package/dist/lib/taquito/src/operations/reveal-operation.js +0 -74
- package/dist/lib/taquito/src/operations/smart-rollup-add-messages-operation.js +0 -44
- package/dist/lib/taquito/src/operations/smart-rollup-execute-outbox-message-operation.js +0 -53
- package/dist/lib/taquito/src/operations/smart-rollup-originate-operation.js +0 -50
- package/dist/lib/taquito/src/operations/transaction-operation.js +0 -73
- package/dist/lib/taquito/src/operations/transfer-ticket-operation.js +0 -47
- package/dist/lib/taquito/src/operations/types.js +0 -88
- package/dist/lib/taquito/src/operations/update-companion-key-operation.js +0 -55
- package/dist/lib/taquito/src/operations/update-consensus-key-operation.js +0 -55
- package/dist/lib/taquito/src/packer/interface.js +0 -2
- package/dist/lib/taquito/src/packer/michel-codec-packer.js +0 -11
- package/dist/lib/taquito/src/packer/rpc-packer.js +0 -12
- package/dist/lib/taquito/src/parser/interface.js +0 -2
- package/dist/lib/taquito/src/parser/michel-codec-parser.js +0 -110
- package/dist/lib/taquito/src/parser/noop-parser.js +0 -9
- package/dist/lib/taquito/src/prepare/index.js +0 -18
- package/dist/lib/taquito/src/prepare/interface.js +0 -2
- package/dist/lib/taquito/src/prepare/prepare-provider.js +0 -1049
- package/dist/lib/taquito/src/provider.js +0 -363
- package/dist/lib/taquito/src/read-provider/interface.js +0 -2
- package/dist/lib/taquito/src/read-provider/rpc-read-adapter.js +0 -183
- package/dist/lib/taquito/src/signer/errors.js +0 -17
- package/dist/lib/taquito/src/signer/noop.js +0 -23
- package/dist/lib/taquito/src/subscribe/create-observable-from-subscription.js +0 -20
- package/dist/lib/taquito/src/subscribe/errors.js +0 -30
- package/dist/lib/taquito/src/subscribe/filters.js +0 -96
- package/dist/lib/taquito/src/subscribe/interface.js +0 -2
- package/dist/lib/taquito/src/subscribe/observable-subscription.js +0 -79
- package/dist/lib/taquito/src/subscribe/polling-subcribe-provider.js +0 -118
- package/dist/lib/taquito/src/taquito.js +0 -404
- package/dist/lib/taquito/src/tz/interface.js +0 -2
- package/dist/lib/taquito/src/tz/rpc-tz-provider.js +0 -46
- package/dist/lib/taquito/src/version.js +0 -8
- package/dist/lib/taquito/src/wallet/batch-operation.js +0 -71
- package/dist/lib/taquito/src/wallet/delegation-operation.js +0 -42
- package/dist/lib/taquito/src/wallet/errors.js +0 -40
- package/dist/lib/taquito/src/wallet/increase-paid-storage-operation.js +0 -42
- package/dist/lib/taquito/src/wallet/index.js +0 -25
- package/dist/lib/taquito/src/wallet/interface.js +0 -2
- package/dist/lib/taquito/src/wallet/legacy.js +0 -51
- package/dist/lib/taquito/src/wallet/operation-factory.js +0 -88
- package/dist/lib/taquito/src/wallet/operation.js +0 -221
- package/dist/lib/taquito/src/wallet/origination-operation.js +0 -53
- package/dist/lib/taquito/src/wallet/receipt.js +0 -46
- package/dist/lib/taquito/src/wallet/register-global-constant-operation.js +0 -45
- package/dist/lib/taquito/src/wallet/transaction-operation.js +0 -38
- package/dist/lib/taquito/src/wallet/transfer-ticket-operation.js +0 -38
- package/dist/lib/taquito/src/wallet/wallet.js +0 -445
- package/dist/lib/taquito-core/src/errors.js +0 -351
- package/dist/lib/taquito-core/src/signer-interfaces.js +0 -2
- package/dist/lib/taquito-core/src/taquito-core.js +0 -22
- package/dist/lib/taquito-http-utils/src/errors.js +0 -103
- package/dist/lib/taquito-http-utils/src/status_code.js +0 -322
- package/dist/lib/taquito-http-utils/src/taquito-http-utils.js +0 -308
- package/dist/lib/taquito-http-utils/src/transport-errors.js +0 -141
- package/dist/lib/taquito-local-forging/src/codec.js +0 -543
- package/dist/lib/taquito-local-forging/src/constants.js +0 -291
- package/dist/lib/taquito-local-forging/src/decoder.js +0 -64
- package/dist/lib/taquito-local-forging/src/encoder.js +0 -63
- package/dist/lib/taquito-local-forging/src/errors.js +0 -179
- package/dist/lib/taquito-local-forging/src/interface.js +0 -2
- package/dist/lib/taquito-local-forging/src/michelson/codec.js +0 -283
- package/dist/lib/taquito-local-forging/src/protocols.js +0 -60
- package/dist/lib/taquito-local-forging/src/schema/operation.js +0 -259
- package/dist/lib/taquito-local-forging/src/taquito-local-forging.js +0 -117
- package/dist/lib/taquito-local-forging/src/uint8array-consumer.js +0 -35
- package/dist/lib/taquito-local-forging/src/utils.js +0 -18
- package/dist/lib/taquito-local-forging/src/validator.js +0 -57
- package/dist/lib/taquito-local-forging/src/version.js +0 -8
- package/dist/lib/taquito-michel-codec/src/base58.js +0 -255
- package/dist/lib/taquito-michel-codec/src/binary.js +0 -1271
- package/dist/lib/taquito-michel-codec/src/errors.js +0 -90
- package/dist/lib/taquito-michel-codec/src/formatters.js +0 -58
- package/dist/lib/taquito-michel-codec/src/global-constants.js +0 -12
- package/dist/lib/taquito-michel-codec/src/macros.js +0 -551
- package/dist/lib/taquito-michel-codec/src/micheline-emitter.js +0 -128
- package/dist/lib/taquito-michel-codec/src/micheline-parser.js +0 -402
- package/dist/lib/taquito-michel-codec/src/micheline.js +0 -5
- package/dist/lib/taquito-michel-codec/src/michelson-contract.js +0 -93
- package/dist/lib/taquito-michel-codec/src/michelson-typecheck.js +0 -1756
- package/dist/lib/taquito-michel-codec/src/michelson-types.js +0 -83
- package/dist/lib/taquito-michel-codec/src/michelson-validator.js +0 -833
- package/dist/lib/taquito-michel-codec/src/scan.js +0 -128
- package/dist/lib/taquito-michel-codec/src/taquito-michel-codec.js +0 -38
- package/dist/lib/taquito-michel-codec/src/utils.js +0 -323
- package/dist/lib/taquito-michel-codec/src/version.js +0 -8
- package/dist/lib/taquito-michelson-encoder/src/constants.js +0 -11
- package/dist/lib/taquito-michelson-encoder/src/errors.js +0 -38
- package/dist/lib/taquito-michelson-encoder/src/michelson-map.js +0 -201
- package/dist/lib/taquito-michelson-encoder/src/schema/errors.js +0 -127
- package/dist/lib/taquito-michelson-encoder/src/schema/event-schema.js +0 -52
- package/dist/lib/taquito-michelson-encoder/src/schema/parameter.js +0 -113
- package/dist/lib/taquito-michelson-encoder/src/schema/storage.js +0 -260
- package/dist/lib/taquito-michelson-encoder/src/schema/types.js +0 -2
- package/dist/lib/taquito-michelson-encoder/src/schema/view-schema.js +0 -90
- package/dist/lib/taquito-michelson-encoder/src/taquito-michelson-encoder.js +0 -36
- package/dist/lib/taquito-michelson-encoder/src/tokens/bigmap.js +0 -130
- package/dist/lib/taquito-michelson-encoder/src/tokens/bls12-381-fr.js +0 -86
- package/dist/lib/taquito-michelson-encoder/src/tokens/bls12-381-g1.js +0 -76
- package/dist/lib/taquito-michelson-encoder/src/tokens/bls12-381-g2.js +0 -76
- package/dist/lib/taquito-michelson-encoder/src/tokens/chain-id.js +0 -78
- package/dist/lib/taquito-michelson-encoder/src/tokens/chest-key.js +0 -74
- package/dist/lib/taquito-michelson-encoder/src/tokens/chest.js +0 -74
- package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/address.js +0 -116
- package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/bool.js +0 -59
- package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/bytes.js +0 -90
- package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/int.js +0 -90
- package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/key_hash.js +0 -90
- package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/mutez.js +0 -90
- package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/nat.js +0 -93
- package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/string.js +0 -48
- package/dist/lib/taquito-michelson-encoder/src/tokens/comparable/timestamp.js +0 -66
- package/dist/lib/taquito-michelson-encoder/src/tokens/constant.js +0 -80
- package/dist/lib/taquito-michelson-encoder/src/tokens/contract.js +0 -86
- package/dist/lib/taquito-michelson-encoder/src/tokens/createToken.js +0 -35
- package/dist/lib/taquito-michelson-encoder/src/tokens/key.js +0 -97
- package/dist/lib/taquito-michelson-encoder/src/tokens/lambda.js +0 -55
- package/dist/lib/taquito-michelson-encoder/src/tokens/list.js +0 -85
- package/dist/lib/taquito-michelson-encoder/src/tokens/map.js +0 -112
- package/dist/lib/taquito-michelson-encoder/src/tokens/never.js +0 -61
- package/dist/lib/taquito-michelson-encoder/src/tokens/operation.js +0 -39
- package/dist/lib/taquito-michelson-encoder/src/tokens/option.js +0 -88
- package/dist/lib/taquito-michelson-encoder/src/tokens/or.js +0 -282
- package/dist/lib/taquito-michelson-encoder/src/tokens/pair.js +0 -233
- package/dist/lib/taquito-michelson-encoder/src/tokens/sapling-state.js +0 -84
- package/dist/lib/taquito-michelson-encoder/src/tokens/sapling-transaction-deprecated.js +0 -74
- package/dist/lib/taquito-michelson-encoder/src/tokens/sapling-transaction.js +0 -74
- package/dist/lib/taquito-michelson-encoder/src/tokens/set.js +0 -82
- package/dist/lib/taquito-michelson-encoder/src/tokens/signature.js +0 -82
- package/dist/lib/taquito-michelson-encoder/src/tokens/ticket-deprecated.js +0 -92
- package/dist/lib/taquito-michelson-encoder/src/tokens/ticket.js +0 -92
- package/dist/lib/taquito-michelson-encoder/src/tokens/token.js +0 -100
- package/dist/lib/taquito-michelson-encoder/src/tokens/tokens.js +0 -75
- package/dist/lib/taquito-michelson-encoder/src/tokens/unit.js +0 -52
- package/dist/lib/taquito-michelson-encoder/src/version.js +0 -8
- package/dist/lib/taquito-rpc/src/opkind.js +0 -49
- package/dist/lib/taquito-rpc/src/rpc-client-interface.js +0 -60
- package/dist/lib/taquito-rpc/src/rpc-client-modules/rpc-cache.js +0 -1118
- package/dist/lib/taquito-rpc/src/taquito-rpc.js +0 -990
- package/dist/lib/taquito-rpc/src/types.js +0 -114
- package/dist/lib/taquito-rpc/src/utils/utils.js +0 -65
- package/dist/lib/taquito-rpc/src/version.js +0 -8
- package/dist/lib/taquito-signer/src/bls-key.js +0 -104
- package/dist/lib/taquito-signer/src/derivation-tools/ecdsa.js +0 -156
- package/dist/lib/taquito-signer/src/derivation-tools/ed25519.js +0 -82
- package/dist/lib/taquito-signer/src/derivation-tools/index.js +0 -79
- package/dist/lib/taquito-signer/src/derivation-tools/types.js +0 -4
- package/dist/lib/taquito-signer/src/derivation-tools/utils.js +0 -16
- package/dist/lib/taquito-signer/src/ec-key.js +0 -196
- package/dist/lib/taquito-signer/src/ed-key.js +0 -130
- package/dist/lib/taquito-signer/src/errors.js +0 -77
- package/dist/lib/taquito-signer/src/helpers.js +0 -44
- package/dist/lib/taquito-signer/src/in-memory-signer.js +0 -240
- package/dist/lib/taquito-signer/src/key-interface.js +0 -6
- package/dist/lib/taquito-signer/src/taquito-signer.js +0 -28
- package/dist/lib/taquito-signer/src/version.js +0 -8
- package/dist/lib/taquito-utils/src/constants.js +0 -203
- package/dist/lib/taquito-utils/src/encoding.js +0 -606
- package/dist/lib/taquito-utils/src/errors.js +0 -45
- package/dist/lib/taquito-utils/src/format.js +0 -29
- package/dist/lib/taquito-utils/src/taquito-utils.js +0 -42
- package/dist/lib/taquito-utils/src/validators.js +0 -236
- package/dist/lib/taquito-utils/src/verify-signature.js +0 -136
- package/dist/lib/taquito-utils/src/version.js +0 -8
- package/dist/lib/taquito-wallet-connect/src/version.js +0 -8
- package/dist/types/taquito/src/batch/constants.d.ts +0 -3
- package/dist/types/taquito/src/batch/rpc-batch-provider.d.ts +0 -139
- package/dist/types/taquito/src/constants.d.ts +0 -81
- package/dist/types/taquito/src/context.d.ts +0 -100
- package/dist/types/taquito/src/contract/big-map.d.ts +0 -35
- package/dist/types/taquito/src/contract/compose.d.ts +0 -5
- package/dist/types/taquito/src/contract/constants.d.ts +0 -1
- package/dist/types/taquito/src/contract/contract-methods/contract-method-factory.d.ts +0 -14
- package/dist/types/taquito/src/contract/contract-methods/contract-method-interface.d.ts +0 -28
- package/dist/types/taquito/src/contract/contract-methods/contract-method-object-param.d.ts +0 -39
- package/dist/types/taquito/src/contract/contract-methods/contract-on-chain-view.d.ts +0 -43
- package/dist/types/taquito/src/contract/contract.d.ts +0 -75
- package/dist/types/taquito/src/contract/errors.d.ts +0 -83
- package/dist/types/taquito/src/contract/index.d.ts +0 -11
- package/dist/types/taquito/src/contract/interface.d.ts +0 -254
- package/dist/types/taquito/src/contract/manager-lambda.d.ts +0 -73
- package/dist/types/taquito/src/contract/prepare.d.ts +0 -18
- package/dist/types/taquito/src/contract/rpc-contract-provider.d.ts +0 -270
- package/dist/types/taquito/src/contract/sapling-state-abstraction.d.ts +0 -17
- package/dist/types/taquito/src/contract/semantic.d.ts +0 -7
- package/dist/types/taquito/src/contract/view_lambda.d.ts +0 -34
- package/dist/types/taquito/src/errors.d.ts +0 -26
- package/dist/types/taquito/src/estimate/errors.d.ts +0 -8
- package/dist/types/taquito/src/estimate/estimate-provider-interface.d.ts +0 -153
- package/dist/types/taquito/src/estimate/estimate.d.ts +0 -111
- package/dist/types/taquito/src/estimate/index.d.ts +0 -4
- package/dist/types/taquito/src/estimate/rpc-estimate-provider.d.ts +0 -174
- package/dist/types/taquito/src/extension/extension.d.ts +0 -4
- package/dist/types/taquito/src/forger/composite-forger.d.ts +0 -6
- package/dist/types/taquito/src/forger/errors.d.ts +0 -16
- package/dist/types/taquito/src/forger/rpc-forger.d.ts +0 -7
- package/dist/types/taquito/src/forger/taquito-local-forger.d.ts +0 -8
- package/dist/types/taquito/src/global-constants/default-global-constants-provider.d.ts +0 -18
- package/dist/types/taquito/src/global-constants/errors.d.ts +0 -16
- package/dist/types/taquito/src/global-constants/interface-global-constants-provider.d.ts +0 -11
- package/dist/types/taquito/src/global-constants/noop-global-constants-provider.d.ts +0 -5
- package/dist/types/taquito/src/import-key.d.ts +0 -13
- package/dist/types/taquito/src/injector/helper.d.ts +0 -2
- package/dist/types/taquito/src/injector/interface.d.ts +0 -5
- package/dist/types/taquito/src/injector/rpc-injector.d.ts +0 -7
- package/dist/types/taquito/src/operations/ballot-operation.d.ts +0 -18
- package/dist/types/taquito/src/operations/batch-operation.d.ts +0 -19
- package/dist/types/taquito/src/operations/delegate-operation.d.ts +0 -24
- package/dist/types/taquito/src/operations/drain-delegate-operation.d.ts +0 -17
- package/dist/types/taquito/src/operations/errors.d.ts +0 -50
- package/dist/types/taquito/src/operations/failing-noop-operation.d.ts +0 -17
- package/dist/types/taquito/src/operations/increase-paid-storage-operation.d.ts +0 -23
- package/dist/types/taquito/src/operations/index.d.ts +0 -18
- package/dist/types/taquito/src/operations/operations.d.ts +0 -35
- package/dist/types/taquito/src/operations/origination-operation.d.ts +0 -35
- package/dist/types/taquito/src/operations/proposals-operation.d.ts +0 -17
- package/dist/types/taquito/src/operations/register-global-constant-operation.d.ts +0 -25
- package/dist/types/taquito/src/operations/reveal-operation.d.ts +0 -25
- package/dist/types/taquito/src/operations/smart-rollup-add-messages-operation.d.ts +0 -20
- package/dist/types/taquito/src/operations/smart-rollup-execute-outbox-message-operation.d.ts +0 -24
- package/dist/types/taquito/src/operations/smart-rollup-originate-operation.d.ts +0 -23
- package/dist/types/taquito/src/operations/transaction-operation.d.ts +0 -28
- package/dist/types/taquito/src/operations/transfer-ticket-operation.d.ts +0 -22
- package/dist/types/taquito/src/operations/types.d.ts +0 -823
- package/dist/types/taquito/src/operations/update-companion-key-operation.d.ts +0 -23
- package/dist/types/taquito/src/operations/update-consensus-key-operation.d.ts +0 -23
- package/dist/types/taquito/src/packer/interface.d.ts +0 -4
- package/dist/types/taquito/src/packer/michel-codec-packer.d.ts +0 -5
- package/dist/types/taquito/src/packer/rpc-packer.d.ts +0 -8
- package/dist/types/taquito/src/parser/interface.d.ts +0 -4
- package/dist/types/taquito/src/parser/michel-codec-parser.d.ts +0 -16
- package/dist/types/taquito/src/parser/noop-parser.d.ts +0 -5
- package/dist/types/taquito/src/prepare/index.d.ts +0 -2
- package/dist/types/taquito/src/prepare/interface.d.ts +0 -152
- package/dist/types/taquito/src/prepare/prepare-provider.d.ts +0 -187
- package/dist/types/taquito/src/provider.d.ts +0 -50
- package/dist/types/taquito/src/read-provider/interface.d.ts +0 -132
- package/dist/types/taquito/src/read-provider/rpc-read-adapter.d.ts +0 -130
- package/dist/types/taquito/src/signer/errors.d.ts +0 -8
- package/dist/types/taquito/src/signer/noop.d.ts +0 -11
- package/dist/types/taquito/src/subscribe/create-observable-from-subscription.d.ts +0 -4
- package/dist/types/taquito/src/subscribe/errors.d.ts +0 -18
- package/dist/types/taquito/src/subscribe/filters.d.ts +0 -6
- package/dist/types/taquito/src/subscribe/interface.d.ts +0 -48
- package/dist/types/taquito/src/subscribe/observable-subscription.d.ts +0 -21
- package/dist/types/taquito/src/subscribe/polling-subcribe-provider.d.ts +0 -23
- package/dist/types/taquito/src/taquito.d.ts +0 -248
- package/dist/types/taquito/src/tz/interface.d.ts +0 -20
- package/dist/types/taquito/src/tz/rpc-tz-provider.d.ts +0 -13
- package/dist/types/taquito/src/version.d.ts +0 -4
- package/dist/types/taquito/src/wallet/batch-operation.d.ts +0 -13
- package/dist/types/taquito/src/wallet/delegation-operation.d.ts +0 -12
- package/dist/types/taquito/src/wallet/errors.d.ts +0 -24
- package/dist/types/taquito/src/wallet/increase-paid-storage-operation.d.ts +0 -12
- package/dist/types/taquito/src/wallet/index.d.ts +0 -9
- package/dist/types/taquito/src/wallet/interface.d.ts +0 -66
- package/dist/types/taquito/src/wallet/legacy.d.ts +0 -21
- package/dist/types/taquito/src/wallet/operation-factory.d.ts +0 -32
- package/dist/types/taquito/src/wallet/operation.d.ts +0 -55
- package/dist/types/taquito/src/wallet/origination-operation.d.ts +0 -14
- package/dist/types/taquito/src/wallet/receipt.d.ts +0 -16
- package/dist/types/taquito/src/wallet/register-global-constant-operation.d.ts +0 -13
- package/dist/types/taquito/src/wallet/transaction-operation.d.ts +0 -12
- package/dist/types/taquito/src/wallet/transfer-ticket-operation.d.ts +0 -12
- package/dist/types/taquito/src/wallet/wallet.d.ts +0 -196
- package/dist/types/taquito-core/src/errors.d.ts +0 -213
- package/dist/types/taquito-core/src/signer-interfaces.d.ts +0 -38
- package/dist/types/taquito-core/src/taquito-core.d.ts +0 -6
- package/dist/types/taquito-http-utils/src/errors.d.ts +0 -63
- package/dist/types/taquito-http-utils/src/status_code.d.ts +0 -318
- package/dist/types/taquito-http-utils/src/taquito-http-utils.d.ts +0 -58
- package/dist/types/taquito-http-utils/src/transport-errors.d.ts +0 -28
- package/dist/types/taquito-local-forging/src/codec.d.ts +0 -79
- package/dist/types/taquito-local-forging/src/constants.d.ts +0 -75
- package/dist/types/taquito-local-forging/src/decoder.d.ts +0 -5
- package/dist/types/taquito-local-forging/src/encoder.d.ts +0 -4
- package/dist/types/taquito-local-forging/src/errors.d.ts +0 -109
- package/dist/types/taquito-local-forging/src/interface.d.ts +0 -9
- package/dist/types/taquito-local-forging/src/michelson/codec.d.ts +0 -49
- package/dist/types/taquito-local-forging/src/protocols.d.ts +0 -27
- package/dist/types/taquito-local-forging/src/schema/operation.d.ts +0 -198
- package/dist/types/taquito-local-forging/src/taquito-local-forging.d.ts +0 -27
- package/dist/types/taquito-local-forging/src/uint8array-consumer.d.ts +0 -10
- package/dist/types/taquito-local-forging/src/utils.d.ts +0 -3
- package/dist/types/taquito-local-forging/src/validator.d.ts +0 -13
- package/dist/types/taquito-local-forging/src/version.d.ts +0 -4
- package/dist/types/taquito-michel-codec/src/base58.d.ts +0 -13
- package/dist/types/taquito-michel-codec/src/binary.d.ts +0 -127
- package/dist/types/taquito-michel-codec/src/errors.d.ts +0 -57
- package/dist/types/taquito-michel-codec/src/formatters.d.ts +0 -6
- package/dist/types/taquito-michel-codec/src/global-constants.d.ts +0 -3
- package/dist/types/taquito-michel-codec/src/macros.d.ts +0 -13
- package/dist/types/taquito-michel-codec/src/micheline-emitter.d.ts +0 -17
- package/dist/types/taquito-michel-codec/src/micheline-parser.d.ts +0 -130
- package/dist/types/taquito-michel-codec/src/micheline.d.ts +0 -44
- package/dist/types/taquito-michel-codec/src/michelson-contract.d.ts +0 -24
- package/dist/types/taquito-michel-codec/src/michelson-typecheck.d.ts +0 -38
- package/dist/types/taquito-michel-codec/src/michelson-types.d.ts +0 -147
- package/dist/types/taquito-michel-codec/src/michelson-validator.d.ts +0 -66
- package/dist/types/taquito-michel-codec/src/scan.d.ts +0 -26
- package/dist/types/taquito-michel-codec/src/taquito-michel-codec.d.ts +0 -16
- package/dist/types/taquito-michel-codec/src/utils.d.ts +0 -76
- package/dist/types/taquito-michel-codec/src/version.d.ts +0 -4
- package/dist/types/taquito-michelson-encoder/src/constants.d.ts +0 -8
- package/dist/types/taquito-michelson-encoder/src/errors.d.ts +0 -17
- package/dist/types/taquito-michelson-encoder/src/michelson-map.d.ts +0 -82
- package/dist/types/taquito-michelson-encoder/src/schema/errors.d.ts +0 -83
- package/dist/types/taquito-michelson-encoder/src/schema/event-schema.d.ts +0 -12
- package/dist/types/taquito-michelson-encoder/src/schema/parameter.d.ts +0 -54
- package/dist/types/taquito-michelson-encoder/src/schema/storage.d.ts +0 -97
- package/dist/types/taquito-michelson-encoder/src/schema/types.d.ts +0 -105
- package/dist/types/taquito-michelson-encoder/src/schema/view-schema.d.ts +0 -53
- package/dist/types/taquito-michelson-encoder/src/taquito-michelson-encoder.d.ts +0 -16
- package/dist/types/taquito-michelson-encoder/src/tokens/bigmap.d.ts +0 -51
- package/dist/types/taquito-michelson-encoder/src/tokens/bls12-381-fr.d.ts +0 -51
- package/dist/types/taquito-michelson-encoder/src/tokens/bls12-381-g1.d.ts +0 -47
- package/dist/types/taquito-michelson-encoder/src/tokens/bls12-381-g2.d.ts +0 -47
- package/dist/types/taquito-michelson-encoder/src/tokens/chain-id.d.ts +0 -51
- package/dist/types/taquito-michelson-encoder/src/tokens/chest-key.d.ts +0 -47
- package/dist/types/taquito-michelson-encoder/src/tokens/chest.d.ts +0 -47
- package/dist/types/taquito-michelson-encoder/src/tokens/comparable/address.d.ts +0 -61
- package/dist/types/taquito-michelson-encoder/src/tokens/comparable/bool.d.ts +0 -32
- package/dist/types/taquito-michelson-encoder/src/tokens/comparable/bytes.d.ts +0 -52
- package/dist/types/taquito-michelson-encoder/src/tokens/comparable/int.d.ts +0 -56
- package/dist/types/taquito-michelson-encoder/src/tokens/comparable/key_hash.d.ts +0 -55
- package/dist/types/taquito-michelson-encoder/src/tokens/comparable/mutez.d.ts +0 -53
- package/dist/types/taquito-michelson-encoder/src/tokens/comparable/nat.d.ts +0 -55
- package/dist/types/taquito-michelson-encoder/src/tokens/comparable/string.d.ts +0 -31
- package/dist/types/taquito-michelson-encoder/src/tokens/comparable/timestamp.d.ts +0 -34
- package/dist/types/taquito-michelson-encoder/src/tokens/constant.d.ts +0 -51
- package/dist/types/taquito-michelson-encoder/src/tokens/contract.d.ts +0 -48
- package/dist/types/taquito-michelson-encoder/src/tokens/createToken.d.ts +0 -18
- package/dist/types/taquito-michelson-encoder/src/tokens/key.d.ts +0 -55
- package/dist/types/taquito-michelson-encoder/src/tokens/lambda.d.ts +0 -24
- package/dist/types/taquito-michelson-encoder/src/tokens/list.d.ts +0 -46
- package/dist/types/taquito-michelson-encoder/src/tokens/map.d.ts +0 -47
- package/dist/types/taquito-michelson-encoder/src/tokens/never.d.ts +0 -41
- package/dist/types/taquito-michelson-encoder/src/tokens/operation.d.ts +0 -24
- package/dist/types/taquito-michelson-encoder/src/tokens/option.d.ts +0 -37
- package/dist/types/taquito-michelson-encoder/src/tokens/or.d.ts +0 -53
- package/dist/types/taquito-michelson-encoder/src/tokens/pair.d.ts +0 -50
- package/dist/types/taquito-michelson-encoder/src/tokens/sapling-state.d.ts +0 -44
- package/dist/types/taquito-michelson-encoder/src/tokens/sapling-transaction-deprecated.d.ts +0 -40
- package/dist/types/taquito-michelson-encoder/src/tokens/sapling-transaction.d.ts +0 -40
- package/dist/types/taquito-michelson-encoder/src/tokens/set.d.ts +0 -43
- package/dist/types/taquito-michelson-encoder/src/tokens/signature.d.ts +0 -53
- package/dist/types/taquito-michelson-encoder/src/tokens/ticket-deprecated.d.ts +0 -38
- package/dist/types/taquito-michelson-encoder/src/tokens/ticket.d.ts +0 -38
- package/dist/types/taquito-michelson-encoder/src/tokens/token.d.ts +0 -68
- package/dist/types/taquito-michelson-encoder/src/tokens/tokens.d.ts +0 -36
- package/dist/types/taquito-michelson-encoder/src/tokens/unit.d.ts +0 -34
- package/dist/types/taquito-michelson-encoder/src/version.d.ts +0 -4
- package/dist/types/taquito-rpc/src/opkind.d.ts +0 -45
- package/dist/types/taquito-rpc/src/rpc-client-interface.d.ts +0 -126
- package/dist/types/taquito-rpc/src/rpc-client-modules/rpc-cache.d.ts +0 -473
- package/dist/types/taquito-rpc/src/taquito-rpc.d.ts +0 -483
- package/dist/types/taquito-rpc/src/types.d.ts +0 -2362
- package/dist/types/taquito-rpc/src/utils/utils.d.ts +0 -14
- package/dist/types/taquito-rpc/src/version.d.ts +0 -4
- package/dist/types/taquito-signer/src/bls-key.d.ts +0 -21
- package/dist/types/taquito-signer/src/derivation-tools/ecdsa.d.ts +0 -49
- package/dist/types/taquito-signer/src/derivation-tools/ed25519.d.ts +0 -33
- package/dist/types/taquito-signer/src/derivation-tools/index.d.ts +0 -12
- package/dist/types/taquito-signer/src/derivation-tools/types.d.ts +0 -10
- package/dist/types/taquito-signer/src/derivation-tools/utils.d.ts +0 -1
- package/dist/types/taquito-signer/src/ec-key.d.ts +0 -42
- package/dist/types/taquito-signer/src/ed-key.d.ts +0 -39
- package/dist/types/taquito-signer/src/errors.d.ts +0 -51
- package/dist/types/taquito-signer/src/helpers.d.ts +0 -10
- package/dist/types/taquito-signer/src/in-memory-signer.d.ts +0 -56
- package/dist/types/taquito-signer/src/key-interface.d.ts +0 -37
- package/dist/types/taquito-signer/src/taquito-signer.d.ts +0 -10
- package/dist/types/taquito-signer/src/version.d.ts +0 -4
- package/dist/types/taquito-utils/src/constants.d.ts +0 -78
- package/dist/types/taquito-utils/src/encoding.d.ts +0 -184
- package/dist/types/taquito-utils/src/errors.d.ts +0 -20
- package/dist/types/taquito-utils/src/format.d.ts +0 -4
- package/dist/types/taquito-utils/src/taquito-utils.d.ts +0 -11
- package/dist/types/taquito-utils/src/validators.d.ts +0 -167
- package/dist/types/taquito-utils/src/verify-signature.d.ts +0 -22
- package/dist/types/taquito-utils/src/version.d.ts +0 -4
- package/dist/types/taquito-wallet-connect/src/version.d.ts +0 -4
- /package/dist/lib/{taquito-wallet-connect/src/errors.js → errors.js} +0 -0
- /package/dist/lib/{taquito-wallet-connect/src/types.js → types.js} +0 -0
- /package/dist/types/{taquito-wallet-connect/src/errors.d.ts → errors.d.ts} +0 -0
- /package/dist/types/{taquito-wallet-connect/src/taquito-wallet-connect.d.ts → taquito-wallet-connect.d.ts} +0 -0
- /package/dist/types/{taquito-wallet-connect/src/types.d.ts → types.d.ts} +0 -0
- /package/dist/types/{taquito-http-utils/src/version.d.ts → version.d.ts} +0 -0
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.KeyHashToken = exports.KeyHashValidationError = void 0;
|
|
4
|
-
const token_1 = require("../token");
|
|
5
|
-
const utils_1 = require("@taquito/utils");
|
|
6
|
-
/**
|
|
7
|
-
* @category Error
|
|
8
|
-
* Error that indicates a failure happening when parsing encoding/executing Key Hash
|
|
9
|
-
*/
|
|
10
|
-
class KeyHashValidationError extends token_1.TokenValidationError {
|
|
11
|
-
constructor(value, token, message) {
|
|
12
|
-
super(value, token, message);
|
|
13
|
-
this.value = value;
|
|
14
|
-
this.token = token;
|
|
15
|
-
this.name = 'KeyHashValidationError';
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.KeyHashValidationError = KeyHashValidationError;
|
|
19
|
-
class KeyHashToken extends token_1.ComparableToken {
|
|
20
|
-
constructor(val, idx, fac) {
|
|
21
|
-
super(val, idx, fac);
|
|
22
|
-
this.val = val;
|
|
23
|
-
this.idx = idx;
|
|
24
|
-
this.fac = fac;
|
|
25
|
-
}
|
|
26
|
-
Execute(val) {
|
|
27
|
-
if (val.string) {
|
|
28
|
-
return val.string;
|
|
29
|
-
}
|
|
30
|
-
return (0, utils_1.encodeKeyHash)(val.bytes);
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* @throws {@link KeyHashValidationError}
|
|
34
|
-
*/
|
|
35
|
-
validate(value) {
|
|
36
|
-
if ((0, utils_1.validateKeyHash)(value) !== utils_1.ValidationResult.VALID) {
|
|
37
|
-
throw new KeyHashValidationError(value, this, `KeyHash is not valid: ${JSON.stringify(value)}`);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* @throws {@link KeyHashValidationError}
|
|
42
|
-
*/
|
|
43
|
-
Encode(args) {
|
|
44
|
-
const val = args.pop();
|
|
45
|
-
this.validate(val);
|
|
46
|
-
return { string: val };
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* @throws {@link KeyHashValidationError}
|
|
50
|
-
*/
|
|
51
|
-
EncodeObject(val, semantic) {
|
|
52
|
-
this.validate(val);
|
|
53
|
-
if (semantic && semantic[KeyHashToken.prim]) {
|
|
54
|
-
return semantic[KeyHashToken.prim](val);
|
|
55
|
-
}
|
|
56
|
-
return { string: val };
|
|
57
|
-
}
|
|
58
|
-
generateSchema() {
|
|
59
|
-
return {
|
|
60
|
-
__michelsonType: KeyHashToken.prim,
|
|
61
|
-
schema: KeyHashToken.prim,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
ToKey({ string, bytes }) {
|
|
65
|
-
if (string) {
|
|
66
|
-
return string;
|
|
67
|
-
}
|
|
68
|
-
return (0, utils_1.encodeKeyHash)(bytes);
|
|
69
|
-
}
|
|
70
|
-
ToBigMapKey(val) {
|
|
71
|
-
return {
|
|
72
|
-
key: { string: val },
|
|
73
|
-
type: { prim: KeyHashToken.prim },
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
compare(pkh1, pkh2) {
|
|
77
|
-
// binary type tag actually reflects the expected prefix order
|
|
78
|
-
const h1 = (0, utils_1.b58DecodePublicKeyHash)(pkh1, 'array');
|
|
79
|
-
const h2 = (0, utils_1.b58DecodePublicKeyHash)(pkh2, 'array');
|
|
80
|
-
return (0, utils_1.compareArrays)(h1, h2);
|
|
81
|
-
}
|
|
82
|
-
findAndReturnTokens(tokenToFind, tokens) {
|
|
83
|
-
if (KeyHashToken.prim === tokenToFind) {
|
|
84
|
-
tokens.push(this);
|
|
85
|
-
}
|
|
86
|
-
return tokens;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
exports.KeyHashToken = KeyHashToken;
|
|
90
|
-
KeyHashToken.prim = 'key_hash';
|
|
@@ -1,90 +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.MutezToken = exports.MutezValidationError = void 0;
|
|
7
|
-
const token_1 = require("../token");
|
|
8
|
-
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
9
|
-
/**
|
|
10
|
-
* @category Error
|
|
11
|
-
* Error that indicates a failure happening when parsing encoding/executing Mutez
|
|
12
|
-
*/
|
|
13
|
-
class MutezValidationError extends token_1.TokenValidationError {
|
|
14
|
-
constructor(value, token, message) {
|
|
15
|
-
super(value, token, message);
|
|
16
|
-
this.value = value;
|
|
17
|
-
this.token = token;
|
|
18
|
-
this.name = 'MutezValidationError';
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.MutezValidationError = MutezValidationError;
|
|
22
|
-
class MutezToken extends token_1.ComparableToken {
|
|
23
|
-
constructor(val, idx, fac) {
|
|
24
|
-
super(val, idx, fac);
|
|
25
|
-
this.val = val;
|
|
26
|
-
this.idx = idx;
|
|
27
|
-
this.fac = fac;
|
|
28
|
-
}
|
|
29
|
-
Execute(val) {
|
|
30
|
-
return new bignumber_js_1.default(val[Object.keys(val)[0]]);
|
|
31
|
-
}
|
|
32
|
-
generateSchema() {
|
|
33
|
-
return {
|
|
34
|
-
__michelsonType: MutezToken.prim,
|
|
35
|
-
schema: MutezToken.prim,
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* @throws {@link MutezValidationError}
|
|
40
|
-
*/
|
|
41
|
-
validate(val) {
|
|
42
|
-
const bigNumber = new bignumber_js_1.default(val);
|
|
43
|
-
if (bigNumber.isNaN()) {
|
|
44
|
-
throw new MutezValidationError(val, this, `Value is not a number: ${val}`);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* @throws {@link MutezValidationError}
|
|
49
|
-
*/
|
|
50
|
-
Encode(args) {
|
|
51
|
-
const val = args.pop();
|
|
52
|
-
this.validate(val);
|
|
53
|
-
return { int: String(val).toString() };
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* @throws {@link MutezValidationError}
|
|
57
|
-
*/
|
|
58
|
-
EncodeObject(val, semantic) {
|
|
59
|
-
this.validate(val);
|
|
60
|
-
if (semantic && semantic[MutezToken.prim]) {
|
|
61
|
-
return semantic[MutezToken.prim](val);
|
|
62
|
-
}
|
|
63
|
-
return { int: String(val).toString() };
|
|
64
|
-
}
|
|
65
|
-
ToBigMapKey(val) {
|
|
66
|
-
return {
|
|
67
|
-
key: { int: String(val) },
|
|
68
|
-
type: { prim: MutezToken.prim },
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
ToKey({ int }) {
|
|
72
|
-
return int;
|
|
73
|
-
}
|
|
74
|
-
compare(mutez1, mutez2) {
|
|
75
|
-
const o1 = Number(mutez1);
|
|
76
|
-
const o2 = Number(mutez2);
|
|
77
|
-
if (o1 === o2) {
|
|
78
|
-
return 0;
|
|
79
|
-
}
|
|
80
|
-
return o1 < o2 ? -1 : 1;
|
|
81
|
-
}
|
|
82
|
-
findAndReturnTokens(tokenToFind, tokens) {
|
|
83
|
-
if (MutezToken.prim === tokenToFind) {
|
|
84
|
-
tokens.push(this);
|
|
85
|
-
}
|
|
86
|
-
return tokens;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
exports.MutezToken = MutezToken;
|
|
90
|
-
MutezToken.prim = 'mutez';
|
|
@@ -1,93 +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.NatToken = exports.NatValidationError = void 0;
|
|
7
|
-
const token_1 = require("../token");
|
|
8
|
-
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
9
|
-
/**
|
|
10
|
-
* @category Error
|
|
11
|
-
* Error that indicates a failure happening when parsing encoding/executing Nat
|
|
12
|
-
*/
|
|
13
|
-
class NatValidationError extends token_1.TokenValidationError {
|
|
14
|
-
constructor(value, token, message) {
|
|
15
|
-
super(value, token, message);
|
|
16
|
-
this.value = value;
|
|
17
|
-
this.token = token;
|
|
18
|
-
this.name = 'NatValidationError';
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.NatValidationError = NatValidationError;
|
|
22
|
-
class NatToken extends token_1.ComparableToken {
|
|
23
|
-
constructor(val, idx, fac) {
|
|
24
|
-
super(val, idx, fac);
|
|
25
|
-
this.val = val;
|
|
26
|
-
this.idx = idx;
|
|
27
|
-
this.fac = fac;
|
|
28
|
-
}
|
|
29
|
-
Execute(val) {
|
|
30
|
-
return new bignumber_js_1.default(val[Object.keys(val)[0]]);
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* @throws {@link NatValidationError}
|
|
34
|
-
*/
|
|
35
|
-
Encode(args) {
|
|
36
|
-
const val = args.pop();
|
|
37
|
-
this.validate(val);
|
|
38
|
-
return { int: new bignumber_js_1.default(val).toFixed() };
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* @throws {@link NatValidationError}
|
|
42
|
-
*/
|
|
43
|
-
validate(val) {
|
|
44
|
-
const bigNumber = new bignumber_js_1.default(val);
|
|
45
|
-
if (bigNumber.isNaN()) {
|
|
46
|
-
throw new NatValidationError(val, this, `Value is not a number: ${JSON.stringify(val)}`);
|
|
47
|
-
}
|
|
48
|
-
if (bigNumber.isNegative()) {
|
|
49
|
-
throw new NatValidationError(val, this, `Value cannot be negative: ${JSON.stringify(val)}`);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* @throws {@link NatValidationError}
|
|
54
|
-
*/
|
|
55
|
-
EncodeObject(val, semantic) {
|
|
56
|
-
this.validate(val);
|
|
57
|
-
if (semantic && semantic[NatToken.prim]) {
|
|
58
|
-
return semantic[NatToken.prim](val);
|
|
59
|
-
}
|
|
60
|
-
return { int: new bignumber_js_1.default(val).toFixed() };
|
|
61
|
-
}
|
|
62
|
-
generateSchema() {
|
|
63
|
-
return {
|
|
64
|
-
__michelsonType: NatToken.prim,
|
|
65
|
-
schema: NatToken.prim,
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
ToBigMapKey(val) {
|
|
69
|
-
return {
|
|
70
|
-
key: { int: String(val) },
|
|
71
|
-
type: { prim: NatToken.prim },
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
ToKey({ int }) {
|
|
75
|
-
return new bignumber_js_1.default(int);
|
|
76
|
-
}
|
|
77
|
-
compare(nat1, nat2) {
|
|
78
|
-
const o1 = Number(nat1);
|
|
79
|
-
const o2 = Number(nat2);
|
|
80
|
-
if (o1 === o2) {
|
|
81
|
-
return 0;
|
|
82
|
-
}
|
|
83
|
-
return o1 < o2 ? -1 : 1;
|
|
84
|
-
}
|
|
85
|
-
findAndReturnTokens(tokenToFind, tokens) {
|
|
86
|
-
if (NatToken.prim === tokenToFind) {
|
|
87
|
-
tokens.push(this);
|
|
88
|
-
}
|
|
89
|
-
return tokens;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
exports.NatToken = NatToken;
|
|
93
|
-
NatToken.prim = 'nat';
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StringToken = void 0;
|
|
4
|
-
const token_1 = require("../token");
|
|
5
|
-
class StringToken extends token_1.ComparableToken {
|
|
6
|
-
constructor(val, idx, fac) {
|
|
7
|
-
super(val, idx, fac);
|
|
8
|
-
this.val = val;
|
|
9
|
-
this.idx = idx;
|
|
10
|
-
this.fac = fac;
|
|
11
|
-
}
|
|
12
|
-
Execute(val) {
|
|
13
|
-
return val[Object.keys(val)[0]];
|
|
14
|
-
}
|
|
15
|
-
generateSchema() {
|
|
16
|
-
return {
|
|
17
|
-
__michelsonType: StringToken.prim,
|
|
18
|
-
schema: StringToken.prim,
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
Encode(args) {
|
|
22
|
-
const val = args.pop();
|
|
23
|
-
return { string: val };
|
|
24
|
-
}
|
|
25
|
-
EncodeObject(val, semantic) {
|
|
26
|
-
if (semantic && semantic[StringToken.prim]) {
|
|
27
|
-
return semantic[StringToken.prim](val);
|
|
28
|
-
}
|
|
29
|
-
return { string: val };
|
|
30
|
-
}
|
|
31
|
-
ToKey({ string }) {
|
|
32
|
-
return string;
|
|
33
|
-
}
|
|
34
|
-
ToBigMapKey(val) {
|
|
35
|
-
return {
|
|
36
|
-
key: { string: val },
|
|
37
|
-
type: { prim: StringToken.prim },
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
findAndReturnTokens(tokenToFind, tokens) {
|
|
41
|
-
if (StringToken.prim === tokenToFind) {
|
|
42
|
-
tokens.push(this);
|
|
43
|
-
}
|
|
44
|
-
return tokens;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
exports.StringToken = StringToken;
|
|
48
|
-
StringToken.prim = 'string';
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TimestampToken = void 0;
|
|
4
|
-
const token_1 = require("../token");
|
|
5
|
-
class TimestampToken extends token_1.ComparableToken {
|
|
6
|
-
constructor(val, idx, fac) {
|
|
7
|
-
super(val, idx, fac);
|
|
8
|
-
this.val = val;
|
|
9
|
-
this.idx = idx;
|
|
10
|
-
this.fac = fac;
|
|
11
|
-
}
|
|
12
|
-
Execute(val) {
|
|
13
|
-
if (val.string && /^\d+$/.test(val.string)) {
|
|
14
|
-
return new Date(Number(val.string) * 1000).toISOString();
|
|
15
|
-
}
|
|
16
|
-
else if (val.string) {
|
|
17
|
-
return new Date(val.string).toISOString();
|
|
18
|
-
}
|
|
19
|
-
else if (val.int) {
|
|
20
|
-
return new Date(Number(val.int) * 1000).toISOString();
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
Encode(args) {
|
|
24
|
-
const val = args.pop();
|
|
25
|
-
if (typeof val === 'number') {
|
|
26
|
-
return { int: String(val) };
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
return { string: val };
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
EncodeObject(val, semantic) {
|
|
33
|
-
if (semantic && semantic[TimestampToken.prim]) {
|
|
34
|
-
return semantic[TimestampToken.prim](val);
|
|
35
|
-
}
|
|
36
|
-
if (typeof val === 'number') {
|
|
37
|
-
return { int: String(val) };
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
return { string: val };
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
generateSchema() {
|
|
44
|
-
return {
|
|
45
|
-
__michelsonType: TimestampToken.prim,
|
|
46
|
-
schema: TimestampToken.prim,
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
ToKey({ string }) {
|
|
50
|
-
return string;
|
|
51
|
-
}
|
|
52
|
-
ToBigMapKey(val) {
|
|
53
|
-
return {
|
|
54
|
-
key: { string: val },
|
|
55
|
-
type: { prim: TimestampToken.prim },
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
findAndReturnTokens(tokenToFind, tokens) {
|
|
59
|
-
if (TimestampToken.prim === tokenToFind) {
|
|
60
|
-
tokens.push(this);
|
|
61
|
-
}
|
|
62
|
-
return tokens;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
exports.TimestampToken = TimestampToken;
|
|
66
|
-
TimestampToken.prim = 'timestamp';
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GlobalConstantToken = exports.GlobalConstantDecodingError = exports.GlobalConstantEncodingError = void 0;
|
|
4
|
-
const token_1 = require("./token");
|
|
5
|
-
/**
|
|
6
|
-
* @category Error
|
|
7
|
-
* Error that indicates a failure happening when parsing encoding a Global Constant
|
|
8
|
-
*/
|
|
9
|
-
class GlobalConstantEncodingError extends token_1.TokenValidationError {
|
|
10
|
-
constructor(value, token, message) {
|
|
11
|
-
super(value, token, message);
|
|
12
|
-
this.value = value;
|
|
13
|
-
this.token = token;
|
|
14
|
-
this.name = 'GlobalConstantEncodingError';
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.GlobalConstantEncodingError = GlobalConstantEncodingError;
|
|
18
|
-
/**
|
|
19
|
-
* @category Error
|
|
20
|
-
* Error that indicates a failure happening when parsing executing a Global Constant
|
|
21
|
-
*/
|
|
22
|
-
class GlobalConstantDecodingError extends token_1.TokenValidationError {
|
|
23
|
-
constructor(value, token, message) {
|
|
24
|
-
super(value, token, message);
|
|
25
|
-
this.value = value;
|
|
26
|
-
this.token = token;
|
|
27
|
-
this.name = 'GlobalConstantDecodingError';
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.GlobalConstantDecodingError = GlobalConstantDecodingError;
|
|
31
|
-
class GlobalConstantToken extends token_1.Token {
|
|
32
|
-
constructor(val, idx, fac) {
|
|
33
|
-
super(val, idx, fac);
|
|
34
|
-
this.val = val;
|
|
35
|
-
this.idx = idx;
|
|
36
|
-
this.fac = fac;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* @throws {@link GlobalConstantDecodingError}
|
|
40
|
-
*/
|
|
41
|
-
Execute(val, semantic) {
|
|
42
|
-
if (semantic && semantic[GlobalConstantToken.prim]) {
|
|
43
|
-
return semantic[GlobalConstantToken.prim](val, this.val);
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
throw new GlobalConstantDecodingError(val, this, `Unable to decode a value represented by a global constants. Please provide an expanded script to the Michelson-Encoder or semantics for the decoding. The following global constant hash was encountered: ${this.val.args[0]['string']}.`);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* @throws {@link GlobalConstantEncodingError}
|
|
51
|
-
*/
|
|
52
|
-
Encode(args) {
|
|
53
|
-
throw new GlobalConstantEncodingError(args, this, `Unable to encode a script containing global constants. Please provide an expanded script to the Michelson-Encoder. The following global constant hash was encountered: ${this.val.args[0]['string']}.`);
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* @throws {@link GlobalConstantEncodingError}
|
|
57
|
-
*/
|
|
58
|
-
EncodeObject(val, semantic) {
|
|
59
|
-
if (semantic && semantic[GlobalConstantToken.prim]) {
|
|
60
|
-
return semantic[GlobalConstantToken.prim](val);
|
|
61
|
-
}
|
|
62
|
-
throw new GlobalConstantEncodingError(val, this, `Unable to encode a script containing global constants. Please provide an expanded script to the Michelson-Encoder. The following global constant hash was encountered: ${this.val.args[0]['string']}.`);
|
|
63
|
-
}
|
|
64
|
-
generateSchema() {
|
|
65
|
-
return {
|
|
66
|
-
__michelsonType: GlobalConstantToken.prim,
|
|
67
|
-
schema: {
|
|
68
|
-
hash: this.val.args[0]['string'],
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
findAndReturnTokens(tokenToFind, tokens) {
|
|
73
|
-
if (GlobalConstantToken.prim === tokenToFind) {
|
|
74
|
-
tokens.push(this);
|
|
75
|
-
}
|
|
76
|
-
return tokens;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
exports.GlobalConstantToken = GlobalConstantToken;
|
|
80
|
-
GlobalConstantToken.prim = 'constant';
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ContractToken = exports.ContractValidationError = void 0;
|
|
4
|
-
const utils_1 = require("@taquito/utils");
|
|
5
|
-
const token_1 = require("./token");
|
|
6
|
-
/**
|
|
7
|
-
* @category Error
|
|
8
|
-
* Error that indicates a failure happening when parsing encoding/executing a Contract
|
|
9
|
-
*/
|
|
10
|
-
class ContractValidationError extends token_1.TokenValidationError {
|
|
11
|
-
constructor(value, token, message) {
|
|
12
|
-
super(value, token, message);
|
|
13
|
-
this.value = value;
|
|
14
|
-
this.token = token;
|
|
15
|
-
this.name = 'ContractValidationError';
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.ContractValidationError = ContractValidationError;
|
|
19
|
-
class ContractToken extends token_1.Token {
|
|
20
|
-
constructor(val, idx, fac) {
|
|
21
|
-
super(val, idx, fac);
|
|
22
|
-
this.val = val;
|
|
23
|
-
this.idx = idx;
|
|
24
|
-
this.fac = fac;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* @throws {@link ContractValidationError}
|
|
28
|
-
*/
|
|
29
|
-
validate(value) {
|
|
30
|
-
if (typeof value !== 'string') {
|
|
31
|
-
throw new ContractValidationError(value, this, 'Type error');
|
|
32
|
-
}
|
|
33
|
-
// tz1,tz2 and tz3 seems to be valid contract values (for Unit contract)
|
|
34
|
-
if ((0, utils_1.validateAddress)(value) !== utils_1.ValidationResult.VALID) {
|
|
35
|
-
throw new ContractValidationError(value, this, `Value ${JSON.stringify(value)} is not a valid contract address.`);
|
|
36
|
-
}
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* @throws {@link ContractValidationError}
|
|
41
|
-
*/
|
|
42
|
-
Execute(val) {
|
|
43
|
-
if (val.string) {
|
|
44
|
-
return val.string;
|
|
45
|
-
}
|
|
46
|
-
if (!val.bytes) {
|
|
47
|
-
throw new ContractValidationError(val, this, `Value ${JSON.stringify(val)} is not a valid contract address. must contain bytes or string.`);
|
|
48
|
-
}
|
|
49
|
-
return (0, utils_1.encodeAddress)(val.bytes);
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* @throws {@link ContractValidationError}
|
|
53
|
-
*/
|
|
54
|
-
Encode(args) {
|
|
55
|
-
const val = args.pop();
|
|
56
|
-
this.validate(val);
|
|
57
|
-
return { string: val };
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* @throws {@link ContractValidationError}
|
|
61
|
-
*/
|
|
62
|
-
EncodeObject(val, semantic) {
|
|
63
|
-
this.validate(val);
|
|
64
|
-
if (semantic && semantic[ContractToken.prim]) {
|
|
65
|
-
return semantic[ContractToken.prim](val);
|
|
66
|
-
}
|
|
67
|
-
return { string: val };
|
|
68
|
-
}
|
|
69
|
-
generateSchema() {
|
|
70
|
-
const valueSchema = this.createToken(this.val.args[0], 0);
|
|
71
|
-
return {
|
|
72
|
-
__michelsonType: ContractToken.prim,
|
|
73
|
-
schema: {
|
|
74
|
-
parameter: this.val.args[0] ? valueSchema.generateSchema() : {},
|
|
75
|
-
},
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
findAndReturnTokens(tokenToFind, tokens) {
|
|
79
|
-
if (ContractToken.prim === tokenToFind) {
|
|
80
|
-
tokens.push(this);
|
|
81
|
-
}
|
|
82
|
-
return tokens;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
exports.ContractToken = ContractToken;
|
|
86
|
-
ContractToken.prim = 'contract';
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InvalidTokenError = void 0;
|
|
4
|
-
exports.createToken = createToken;
|
|
5
|
-
const tokens_1 = require("./tokens");
|
|
6
|
-
const pair_1 = require("./pair");
|
|
7
|
-
const core_1 = require("@taquito/core");
|
|
8
|
-
/**
|
|
9
|
-
* @category Error
|
|
10
|
-
* Error that indicates a script having an invalid type or it being unsupported by the Michelson Encoder. Note some protocol changes might affect this, we encourage users to open an issue so we can look into implementing support for said types.
|
|
11
|
-
*/
|
|
12
|
-
class InvalidTokenError extends core_1.TaquitoError {
|
|
13
|
-
constructor(message, data) {
|
|
14
|
-
super(message);
|
|
15
|
-
this.message = message;
|
|
16
|
-
this.data = data;
|
|
17
|
-
this.name = 'Invalid token error';
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.InvalidTokenError = InvalidTokenError;
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
* Create a token from a value
|
|
24
|
-
* @throws {@link InvalidTokenError} If the value passed is not supported by the Michelson Encoder
|
|
25
|
-
*/
|
|
26
|
-
function createToken(val, idx, parentTokenType) {
|
|
27
|
-
if (Array.isArray(val)) {
|
|
28
|
-
return new pair_1.PairToken(val, idx, createToken, parentTokenType);
|
|
29
|
-
}
|
|
30
|
-
const t = tokens_1.tokens.find((x) => x.prim === val.prim);
|
|
31
|
-
if (!t) {
|
|
32
|
-
throw new InvalidTokenError(`Malformed data: ${JSON.stringify(val)}. Expected a value with a valid prim property`, val);
|
|
33
|
-
}
|
|
34
|
-
return new t(val, idx, createToken, parentTokenType);
|
|
35
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.KeyToken = exports.KeyValidationError = void 0;
|
|
4
|
-
const token_1 = require("./token");
|
|
5
|
-
const utils_1 = require("@taquito/utils");
|
|
6
|
-
const signer_1 = require("@taquito/signer");
|
|
7
|
-
/**
|
|
8
|
-
* @category Error
|
|
9
|
-
* Error that indicates a failure happening when parsing encoding/executing a Key
|
|
10
|
-
*/
|
|
11
|
-
class KeyValidationError extends token_1.TokenValidationError {
|
|
12
|
-
constructor(value, token, message) {
|
|
13
|
-
super(value, token, message);
|
|
14
|
-
this.value = value;
|
|
15
|
-
this.token = token;
|
|
16
|
-
this.name = 'KeyValidationError';
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.KeyValidationError = KeyValidationError;
|
|
20
|
-
class KeyToken extends token_1.ComparableToken {
|
|
21
|
-
constructor(val, idx, fac) {
|
|
22
|
-
super(val, idx, fac);
|
|
23
|
-
this.val = val;
|
|
24
|
-
this.idx = idx;
|
|
25
|
-
this.fac = fac;
|
|
26
|
-
}
|
|
27
|
-
Execute(val) {
|
|
28
|
-
if (val.string) {
|
|
29
|
-
return val.string;
|
|
30
|
-
}
|
|
31
|
-
return (0, utils_1.encodeKey)(val.bytes);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* @throws {@link KeyValidationError}
|
|
35
|
-
*/
|
|
36
|
-
validate(value) {
|
|
37
|
-
if ((0, utils_1.validatePublicKey)(value) !== utils_1.ValidationResult.VALID) {
|
|
38
|
-
throw new KeyValidationError(value, this, 'Key is not valid');
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* @throws {@link KeyValidationError}
|
|
43
|
-
*/
|
|
44
|
-
Encode(args) {
|
|
45
|
-
const val = args.pop();
|
|
46
|
-
this.validate(val);
|
|
47
|
-
return { string: val };
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* @throws {@link KeyValidationError}
|
|
51
|
-
*/
|
|
52
|
-
EncodeObject(val, semantic) {
|
|
53
|
-
this.validate(val);
|
|
54
|
-
if (semantic && semantic[KeyToken.prim]) {
|
|
55
|
-
return semantic[KeyToken.prim](val);
|
|
56
|
-
}
|
|
57
|
-
return { string: val };
|
|
58
|
-
}
|
|
59
|
-
generateSchema() {
|
|
60
|
-
return {
|
|
61
|
-
__michelsonType: KeyToken.prim,
|
|
62
|
-
schema: KeyToken.prim,
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
ToKey(val) {
|
|
66
|
-
return this.Execute(val);
|
|
67
|
-
}
|
|
68
|
-
ToBigMapKey(val) {
|
|
69
|
-
return {
|
|
70
|
-
key: { string: val },
|
|
71
|
-
type: { prim: KeyToken.prim },
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
compare(key1, key2) {
|
|
75
|
-
const publicKey1 = (0, signer_1.publicKeyFromString)(key1);
|
|
76
|
-
const publicKey2 = (0, signer_1.publicKeyFromString)(key2);
|
|
77
|
-
const bytes1 = publicKey1.toProtocol();
|
|
78
|
-
const bytes2 = publicKey2.toProtocol();
|
|
79
|
-
if (bytes1[0] === bytes2[0]) {
|
|
80
|
-
return publicKey1.compare(publicKey2);
|
|
81
|
-
}
|
|
82
|
-
else if (bytes1[0] > bytes2[0]) {
|
|
83
|
-
return 1;
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
return -1;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
findAndReturnTokens(tokenToFind, tokens) {
|
|
90
|
-
if (KeyToken.prim === tokenToFind) {
|
|
91
|
-
tokens.push(this);
|
|
92
|
-
}
|
|
93
|
-
return tokens;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
exports.KeyToken = KeyToken;
|
|
97
|
-
KeyToken.prim = 'key';
|