@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,201 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
var _a;
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.MichelsonMap = exports.MapTypecheckError = exports.InvalidMapTypeError = void 0;
|
|
8
|
-
const storage_1 = require("./schema/storage");
|
|
9
|
-
const fast_json_stable_stringify_1 = __importDefault(require("fast-json-stable-stringify"));
|
|
10
|
-
const core_1 = require("@taquito/core");
|
|
11
|
-
/**
|
|
12
|
-
* @category Error
|
|
13
|
-
* Error that indicates an invalid map type being passed or used
|
|
14
|
-
*/
|
|
15
|
-
class InvalidMapTypeError extends core_1.TaquitoError {
|
|
16
|
-
constructor(mapType, reason) {
|
|
17
|
-
super();
|
|
18
|
-
this.mapType = mapType;
|
|
19
|
-
this.reason = reason;
|
|
20
|
-
this.message = `The map type '${JSON.stringify(mapType)}' is invalid. Reason: ${reason}.`;
|
|
21
|
-
this.name = 'InvalidMapTypeError';
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.InvalidMapTypeError = InvalidMapTypeError;
|
|
25
|
-
// Retrieve a unique symbol associated with the key from the environment
|
|
26
|
-
// Used in order to identify all object that are of type MichelsonMap even if they come from different module
|
|
27
|
-
const michelsonMapTypeSymbol = Symbol.for('taquito-michelson-map-type-symbol');
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @throws {@link InvalidMapTypeError} when the argument passed to mapType is not a valid map type
|
|
31
|
-
*/
|
|
32
|
-
function validateMapType(value) {
|
|
33
|
-
if (!('prim' in value)) {
|
|
34
|
-
throw new InvalidMapTypeError(value, `Missing 'prim' field`);
|
|
35
|
-
}
|
|
36
|
-
if (!['map', 'big_map'].includes(value.prim)) {
|
|
37
|
-
throw new InvalidMapTypeError(value, `The prim field should be 'map' or 'big_map'`);
|
|
38
|
-
}
|
|
39
|
-
if (!('args' in value)) {
|
|
40
|
-
throw new InvalidMapTypeError(value, `Missing 'args' field`);
|
|
41
|
-
}
|
|
42
|
-
if (!Array.isArray(value.args)) {
|
|
43
|
-
throw new InvalidMapTypeError(value, `The 'args' field should be an array`);
|
|
44
|
-
}
|
|
45
|
-
if (value.args.length !== 2) {
|
|
46
|
-
throw new InvalidMapTypeError(value, `The 'args' field should have 2 elements`);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* @category Error
|
|
51
|
-
* Error that indicates a map type mismatch, where an attempt to set a key or value in a Map doesn't match the defined type of the Map
|
|
52
|
-
*/
|
|
53
|
-
class MapTypecheckError extends core_1.TaquitoError {
|
|
54
|
-
constructor(value, type, objectType, reason) {
|
|
55
|
-
super();
|
|
56
|
-
this.value = value;
|
|
57
|
-
this.type = type;
|
|
58
|
-
this.reason = reason;
|
|
59
|
-
this.name = 'MapTypecheckError';
|
|
60
|
-
this.message = `The ${objectType} provided: ${JSON.stringify(value)} is not compatible with the expected michelson type: ${JSON.stringify(type)}. Reason: ${JSON.stringify(reason)}.`;
|
|
61
|
-
this.name = 'MapTypecheckError';
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
exports.MapTypecheckError = MapTypecheckError;
|
|
65
|
-
/**
|
|
66
|
-
* Michelson Map is an abstraction over the michelson native map. It supports complex Pair as key
|
|
67
|
-
*/
|
|
68
|
-
class MichelsonMap {
|
|
69
|
-
// Used to check if an object is a michelson map.
|
|
70
|
-
// Using instanceof was not working for project that had multiple instance of taquito dependencies
|
|
71
|
-
// as the class constructor is different
|
|
72
|
-
static isMichelsonMap(obj) {
|
|
73
|
-
return obj && obj[michelsonMapTypeSymbol] === true;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* @param mapType If specified key and value will be type-checked before being added to the map
|
|
77
|
-
*
|
|
78
|
-
* @example new MichelsonMap({ prim: "map", args: [{prim: "string"}, {prim: "int"}]})
|
|
79
|
-
*/
|
|
80
|
-
constructor(mapType) {
|
|
81
|
-
this.valueMap = new Map();
|
|
82
|
-
this.keyMap = new Map();
|
|
83
|
-
this[_a] = true;
|
|
84
|
-
if (mapType) {
|
|
85
|
-
this.setType(mapType);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
setType(mapType) {
|
|
89
|
-
validateMapType(mapType);
|
|
90
|
-
this.keySchema = new storage_1.Schema(mapType.args[0]);
|
|
91
|
-
this.valueSchema = new storage_1.Schema(mapType.args[1]);
|
|
92
|
-
}
|
|
93
|
-
removeType() {
|
|
94
|
-
this.keySchema = undefined;
|
|
95
|
-
this.valueSchema = undefined;
|
|
96
|
-
}
|
|
97
|
-
static fromLiteral(obj, mapType) {
|
|
98
|
-
const map = new MichelsonMap(mapType);
|
|
99
|
-
Object.keys(obj).forEach((key) => {
|
|
100
|
-
map.set(key, obj[key]);
|
|
101
|
-
});
|
|
102
|
-
return map;
|
|
103
|
-
}
|
|
104
|
-
typecheckKey(key) {
|
|
105
|
-
if (!this.keySchema) {
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
if (!this.keySchema.Typecheck(key)) {
|
|
109
|
-
throw new MapTypecheckError(key, this.keySchema, 'key', 'Type validation failed');
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
typecheckValue(value) {
|
|
113
|
-
if (!this.valueSchema) {
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
if (!this.valueSchema.Typecheck(value)) {
|
|
117
|
-
throw new MapTypecheckError(value, this.valueSchema, 'value', 'Type validation failed');
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* @throws {@link MapTypecheckError} when the argument passed does not match the expected schema for value
|
|
122
|
-
*/
|
|
123
|
-
assertTypecheckValue(value) {
|
|
124
|
-
this.typecheckValue(value);
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* @throws {@link MapTypecheckError} when the argument passed does not match the expected schema for key
|
|
128
|
-
*/
|
|
129
|
-
assertTypecheckKey(key) {
|
|
130
|
-
this.typecheckKey(key);
|
|
131
|
-
}
|
|
132
|
-
serializeDeterministically(key) {
|
|
133
|
-
return (0, fast_json_stable_stringify_1.default)(key);
|
|
134
|
-
}
|
|
135
|
-
*keys() {
|
|
136
|
-
for (const [key] of this.entries()) {
|
|
137
|
-
yield key;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
*values() {
|
|
141
|
-
for (const [, value] of this.entries()) {
|
|
142
|
-
yield value;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
*entries() {
|
|
146
|
-
for (const key of this.valueMap.keys()) {
|
|
147
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
148
|
-
yield [this.keyMap.get(key), this.valueMap.get(key)];
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
get(key) {
|
|
152
|
-
this.assertTypecheckKey(key);
|
|
153
|
-
const strKey = this.serializeDeterministically(key);
|
|
154
|
-
return this.valueMap.get(strKey);
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
*
|
|
158
|
-
* Set a key and a value in the MichelsonMap. If the key already exists, override the current value.
|
|
159
|
-
*
|
|
160
|
-
* @example map.set("myKey", "myValue") // Using a string as key
|
|
161
|
-
*
|
|
162
|
-
* @example map.set({0: "test", 1: "test1"}, "myValue") // Using a pair as key
|
|
163
|
-
*
|
|
164
|
-
* @remarks The same key can be represented in multiple ways, depending on the type of the key. This duplicate key situation will cause a runtime error (duplicate key) when sending the map data to the Tezos RPC node.
|
|
165
|
-
*
|
|
166
|
-
* For example, consider a contract with a map whose key is of type boolean. If you set the following values in MichelsonMap: map.set(false, "myValue") and map.set(null, "myValue").
|
|
167
|
-
*
|
|
168
|
-
* You will get two unique entries in the MichelsonMap. These values will both be evaluated as falsy by the MichelsonEncoder and ultimately rejected by the Tezos RPC.
|
|
169
|
-
*/
|
|
170
|
-
set(key, value) {
|
|
171
|
-
this.assertTypecheckKey(key);
|
|
172
|
-
this.assertTypecheckValue(value);
|
|
173
|
-
const strKey = this.serializeDeterministically(key);
|
|
174
|
-
this.keyMap.set(strKey, key);
|
|
175
|
-
this.valueMap.set(strKey, value);
|
|
176
|
-
}
|
|
177
|
-
delete(key) {
|
|
178
|
-
this.assertTypecheckKey(key);
|
|
179
|
-
this.keyMap.delete(this.serializeDeterministically(key));
|
|
180
|
-
this.valueMap.delete(this.serializeDeterministically(key));
|
|
181
|
-
}
|
|
182
|
-
has(key) {
|
|
183
|
-
this.assertTypecheckKey(key);
|
|
184
|
-
const strKey = this.serializeDeterministically(key);
|
|
185
|
-
return this.keyMap.has(strKey) && this.valueMap.has(strKey);
|
|
186
|
-
}
|
|
187
|
-
clear() {
|
|
188
|
-
this.keyMap.clear();
|
|
189
|
-
this.valueMap.clear();
|
|
190
|
-
}
|
|
191
|
-
get size() {
|
|
192
|
-
return this.keyMap.size;
|
|
193
|
-
}
|
|
194
|
-
forEach(cb) {
|
|
195
|
-
for (const [key, value] of this.entries()) {
|
|
196
|
-
cb(value, key, this);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
exports.MichelsonMap = MichelsonMap;
|
|
201
|
-
_a = michelsonMapTypeSymbol;
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.MissingArgumentError = exports.StorageEncodingError = exports.BigMapEncodingError = exports.InvalidBigMapDiffError = exports.InvalidBigMapSchemaError = exports.InvalidRpcResponseError = exports.InvalidScriptError = exports.ParameterEncodingError = void 0;
|
|
5
|
-
const core_1 = require("@taquito/core");
|
|
6
|
-
/**
|
|
7
|
-
* @category Error
|
|
8
|
-
* Error that indicates a failure when encoding (transforming JS parameter into JSON Michelson) the parameter of the view
|
|
9
|
-
*/
|
|
10
|
-
class ParameterEncodingError extends core_1.InvalidViewParameterError {
|
|
11
|
-
constructor(viewName, sigs, args, cause) {
|
|
12
|
-
super(viewName, sigs, args, cause);
|
|
13
|
-
this.viewName = viewName;
|
|
14
|
-
this.sigs = sigs;
|
|
15
|
-
this.args = args;
|
|
16
|
-
this.cause = cause;
|
|
17
|
-
this.name = 'ParameterEncodingError';
|
|
18
|
-
this.message = `Could not encode parameter ${JSON.stringify(args)} received for name "${viewName}" expecting one of the following signatures ${JSON.stringify(sigs)}`;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.ParameterEncodingError = ParameterEncodingError;
|
|
22
|
-
/**
|
|
23
|
-
* @category Error
|
|
24
|
-
* Error that indicates an invalid on-chain view found on the script
|
|
25
|
-
*/
|
|
26
|
-
class InvalidScriptError extends core_1.TaquitoError {
|
|
27
|
-
constructor(script, reason) {
|
|
28
|
-
super();
|
|
29
|
-
this.script = script;
|
|
30
|
-
this.reason = reason;
|
|
31
|
-
this.name = 'InvalidScriptError';
|
|
32
|
-
let message = `Invalid on-chain view found in the following script.`;
|
|
33
|
-
if (reason) {
|
|
34
|
-
message += ` Reason: ${reason}.`;
|
|
35
|
-
}
|
|
36
|
-
message += `Script: ${JSON.stringify(script)}`;
|
|
37
|
-
this.message = message;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
exports.InvalidScriptError = InvalidScriptError;
|
|
41
|
-
/**
|
|
42
|
-
* @category Error
|
|
43
|
-
* Error that indicates an invalid RPC response being passed or used
|
|
44
|
-
*/
|
|
45
|
-
class InvalidRpcResponseError extends core_1.TaquitoError {
|
|
46
|
-
constructor(script, reason) {
|
|
47
|
-
super();
|
|
48
|
-
this.script = script;
|
|
49
|
-
this.reason = reason;
|
|
50
|
-
this.name = 'InvalidRpcResponseError';
|
|
51
|
-
let message = `Invalid RPC response passed as argument(s).`;
|
|
52
|
-
if (reason) {
|
|
53
|
-
message += ` Reason: ${reason}.`;
|
|
54
|
-
}
|
|
55
|
-
message += ` Received: ${JSON.stringify(script)}`;
|
|
56
|
-
this.message = message;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.InvalidRpcResponseError = InvalidRpcResponseError;
|
|
60
|
-
/**
|
|
61
|
-
* @category Error
|
|
62
|
-
* Error that indicates an invalid big map schema being passed or used
|
|
63
|
-
*/
|
|
64
|
-
class InvalidBigMapSchemaError extends core_1.TaquitoError {
|
|
65
|
-
constructor(message) {
|
|
66
|
-
super(message);
|
|
67
|
-
this.message = message;
|
|
68
|
-
this.name = 'InvalidBigMapSchemaError';
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
exports.InvalidBigMapSchemaError = InvalidBigMapSchemaError;
|
|
72
|
-
/**
|
|
73
|
-
* @category Error
|
|
74
|
-
* Error that indicates an invalid big map diff being passed or used
|
|
75
|
-
*/
|
|
76
|
-
class InvalidBigMapDiffError extends core_1.TaquitoError {
|
|
77
|
-
constructor(message, value) {
|
|
78
|
-
super(message);
|
|
79
|
-
this.message = message;
|
|
80
|
-
this.value = value;
|
|
81
|
-
this.name = 'InvalidBigMapDiffError';
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
exports.InvalidBigMapDiffError = InvalidBigMapDiffError;
|
|
85
|
-
/**
|
|
86
|
-
* @category Error
|
|
87
|
-
* Error that indicates a failure when trying to encode big maps
|
|
88
|
-
*/
|
|
89
|
-
class BigMapEncodingError extends core_1.TaquitoError {
|
|
90
|
-
constructor(obj, details, schema, value) {
|
|
91
|
-
super();
|
|
92
|
-
this.details = details;
|
|
93
|
-
this.schema = schema;
|
|
94
|
-
this.value = value;
|
|
95
|
-
this.name = 'BigMapEncodingError';
|
|
96
|
-
this.message = `Unable to encode the big map ${obj}. Schema is: ${JSON.stringify(schema)}. The ${obj} is: ${JSON.stringify(value)}. Error details: ${details}`;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
exports.BigMapEncodingError = BigMapEncodingError;
|
|
100
|
-
/**
|
|
101
|
-
* @category Error
|
|
102
|
-
* Error that indicates a failure when trying to encode storage
|
|
103
|
-
*/
|
|
104
|
-
class StorageEncodingError extends core_1.TaquitoError {
|
|
105
|
-
constructor(obj, details, schema, value, semantics) {
|
|
106
|
-
super();
|
|
107
|
-
this.details = details;
|
|
108
|
-
this.schema = schema;
|
|
109
|
-
this.value = value;
|
|
110
|
-
this.semantics = semantics;
|
|
111
|
-
this.name = 'StorageEncodingError';
|
|
112
|
-
this.message = `Unable to encode ${obj}. The schema is: ${JSON.stringify(schema)}, the value is: ${JSON.stringify(value)}.${semantics ? `And the semantic is: ${JSON.stringify(semantics)}` : ''}. Error details: ${details}`;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
exports.StorageEncodingError = StorageEncodingError;
|
|
116
|
-
/**
|
|
117
|
-
* @category Error
|
|
118
|
-
* General error that indicates a function not being passed a necessary argument
|
|
119
|
-
*/
|
|
120
|
-
class MissingArgumentError extends core_1.TaquitoError {
|
|
121
|
-
constructor(message) {
|
|
122
|
-
super(message);
|
|
123
|
-
this.message = message;
|
|
124
|
-
this.name = 'MissingArgumentError';
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
exports.MissingArgumentError = MissingArgumentError;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EventSchema = void 0;
|
|
4
|
-
const storage_1 = require("./storage");
|
|
5
|
-
class EventSchema {
|
|
6
|
-
constructor(tag, type) {
|
|
7
|
-
this.tag = tag;
|
|
8
|
-
this.type = type;
|
|
9
|
-
}
|
|
10
|
-
static fromMichelineValue(val) {
|
|
11
|
-
return new EventSchema(val.annots?.[0], val.args?.[0]);
|
|
12
|
-
}
|
|
13
|
-
static fromRPCResponse(val) {
|
|
14
|
-
const allEventSchema = [];
|
|
15
|
-
val.script.code.forEach((code) => {
|
|
16
|
-
if (!('prim' in code) ||
|
|
17
|
-
code.prim !== 'code' ||
|
|
18
|
-
!('args' in code) ||
|
|
19
|
-
!code.args) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
allEventSchema.push(...EventSchema.extractEventsRecursively(code.args));
|
|
23
|
-
});
|
|
24
|
-
return EventSchema.removeDuplicates(allEventSchema);
|
|
25
|
-
}
|
|
26
|
-
static removeDuplicates(events) {
|
|
27
|
-
const uniqueEvents = [];
|
|
28
|
-
events.forEach((event) => {
|
|
29
|
-
const idx = uniqueEvents.findIndex((e) => e.tag === event.tag && (0, storage_1.deepEqual)(e.type, event.type));
|
|
30
|
-
if (idx === -1) {
|
|
31
|
-
uniqueEvents.push(event);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
return uniqueEvents;
|
|
35
|
-
}
|
|
36
|
-
static extractEventsRecursively(code) {
|
|
37
|
-
if (Array.isArray(code)) {
|
|
38
|
-
return code.flatMap((c) => EventSchema.extractEventsRecursively(c));
|
|
39
|
-
}
|
|
40
|
-
if (!('prim' in code)) {
|
|
41
|
-
return [];
|
|
42
|
-
}
|
|
43
|
-
if (code.prim === 'EMIT') {
|
|
44
|
-
return [EventSchema.fromMichelineValue(code)];
|
|
45
|
-
}
|
|
46
|
-
if (!('args' in code) || !code.args) {
|
|
47
|
-
return [];
|
|
48
|
-
}
|
|
49
|
-
return code.args.flatMap((c) => EventSchema.extractEventsRecursively(c));
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
exports.EventSchema = EventSchema;
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ParameterSchema = void 0;
|
|
4
|
-
const createToken_1 = require("../tokens/createToken");
|
|
5
|
-
const token_1 = require("../tokens/token");
|
|
6
|
-
const or_1 = require("../tokens/or");
|
|
7
|
-
const option_1 = require("../tokens/option");
|
|
8
|
-
const errors_1 = require("./errors");
|
|
9
|
-
/**
|
|
10
|
-
* @remarks Our current smart contract abstraction feature is currently in preview. It's API is not final, and it may not cover every use case (yet). We will greatly appreciate any feedback on this feature.
|
|
11
|
-
*/
|
|
12
|
-
class ParameterSchema {
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* Create an instance of ParameterSchema from a contract script
|
|
16
|
-
*
|
|
17
|
-
* @param val contract script obtained from the RPC
|
|
18
|
-
* @returns ParameterSchema
|
|
19
|
-
* @throws {InvalidRpcResponseError} If the RPC response is invalid
|
|
20
|
-
*/
|
|
21
|
-
static fromRPCResponse(val) {
|
|
22
|
-
if (!val) {
|
|
23
|
-
throw new errors_1.InvalidRpcResponseError(val, 'the RPC response is empty');
|
|
24
|
-
}
|
|
25
|
-
if (!val.script) {
|
|
26
|
-
throw new errors_1.InvalidRpcResponseError(val, 'the RPC response has no script');
|
|
27
|
-
}
|
|
28
|
-
if (!Array.isArray(val.script.code)) {
|
|
29
|
-
throw new errors_1.InvalidRpcResponseError(val, 'The response.script.code should be an array');
|
|
30
|
-
}
|
|
31
|
-
const parameter = val.script.code.find((x) => 'prim' in x && x.prim === 'parameter');
|
|
32
|
-
if (!parameter) {
|
|
33
|
-
throw new errors_1.InvalidRpcResponseError(val, `The response.script.code should have an element of type {prim: "parameter"}`);
|
|
34
|
-
}
|
|
35
|
-
if (!Array.isArray(parameter.args)) {
|
|
36
|
-
throw new errors_1.InvalidRpcResponseError(val, `The response.script.code has an element of type {prim: "parameter"}, but its args is not an array`);
|
|
37
|
-
}
|
|
38
|
-
return new ParameterSchema(parameter.args[0]);
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Check if the Contract parameter is multiple entry point or not
|
|
42
|
-
*/
|
|
43
|
-
get isMultipleEntryPoint() {
|
|
44
|
-
return (this.root instanceof or_1.OrToken ||
|
|
45
|
-
(this.root instanceof option_1.OptionToken && this.root.subToken() instanceof or_1.OrToken));
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Check if the Contract parameter has an annotation or not
|
|
49
|
-
*/
|
|
50
|
-
get hasAnnotation() {
|
|
51
|
-
if (this.isMultipleEntryPoint) {
|
|
52
|
-
return Object.keys(this.generateSchema())[0] !== '0';
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Return the schema of the parameter of a specific entry point
|
|
60
|
-
* @throws InvalidTokenError
|
|
61
|
-
*/
|
|
62
|
-
constructor(val) {
|
|
63
|
-
this.root = (0, createToken_1.createToken)(val, 0);
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Returns the javascript object equivalent of the Micheline value provided
|
|
67
|
-
*/
|
|
68
|
-
Execute(val, semantics) {
|
|
69
|
-
return this.root.Execute(val, semantics);
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Returns a micheline formatted object for the values provided
|
|
73
|
-
* @throws TokenValidationError
|
|
74
|
-
* @throws {@link ParameterEncodingError}
|
|
75
|
-
*/
|
|
76
|
-
Encode(...args) {
|
|
77
|
-
try {
|
|
78
|
-
return this.root.Encode(args.reverse());
|
|
79
|
-
}
|
|
80
|
-
catch (ex) {
|
|
81
|
-
if (ex instanceof token_1.TokenValidationError) {
|
|
82
|
-
throw ex;
|
|
83
|
-
}
|
|
84
|
-
throw new errors_1.ParameterEncodingError('Unable to encode parameter', this.root, args, ex);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Returns a micheline formatted object for the javascript object provided
|
|
89
|
-
* @throws TokenValidationError
|
|
90
|
-
* @throws {@link ParameterEncodingError}
|
|
91
|
-
*/
|
|
92
|
-
EncodeObject(value, semantics) {
|
|
93
|
-
try {
|
|
94
|
-
return this.root.EncodeObject(value, semantics);
|
|
95
|
-
}
|
|
96
|
-
catch (ex) {
|
|
97
|
-
if (ex instanceof token_1.TokenValidationError) {
|
|
98
|
-
throw ex;
|
|
99
|
-
}
|
|
100
|
-
throw new errors_1.ParameterEncodingError('Unable to encode parameter object', this.root, value, ex);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Produce a schema grouping together all the entry points of a contract.
|
|
105
|
-
*/
|
|
106
|
-
generateSchema() {
|
|
107
|
-
return this.root.generateSchema();
|
|
108
|
-
}
|
|
109
|
-
ExtractSignatures() {
|
|
110
|
-
return this.root.ExtractSignature();
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
exports.ParameterSchema = ParameterSchema;
|