@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,282 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OrToken = exports.OrValidationError = void 0;
|
|
4
|
-
const token_1 = require("./token");
|
|
5
|
-
/**
|
|
6
|
-
* @category Error
|
|
7
|
-
* Error that indicates a failure happening when parsing encoding/executing an OrToken
|
|
8
|
-
*/
|
|
9
|
-
class OrValidationError 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 = 'OrValidationError';
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.OrValidationError = OrValidationError;
|
|
18
|
-
class OrToken extends token_1.ComparableToken {
|
|
19
|
-
constructor(val, idx, fac, parentTokenType) {
|
|
20
|
-
super(val, idx, fac, parentTokenType);
|
|
21
|
-
this.val = val;
|
|
22
|
-
this.idx = idx;
|
|
23
|
-
this.fac = fac;
|
|
24
|
-
this.parentTokenType = parentTokenType;
|
|
25
|
-
}
|
|
26
|
-
Encode(args) {
|
|
27
|
-
const label = args[args.length - 1];
|
|
28
|
-
const leftToken = this.createToken(this.val.args[0], this.getIdxForChildren(), 'Or');
|
|
29
|
-
let keyCount = 1;
|
|
30
|
-
if (leftToken instanceof OrToken) {
|
|
31
|
-
keyCount = Object.keys(leftToken.generateSchema().schema).length;
|
|
32
|
-
}
|
|
33
|
-
const rightToken = this.createToken(this.val.args[1], this.getIdxForChildren() + keyCount, 'Or');
|
|
34
|
-
if (String(leftToken.annot()) === String(label) && !(leftToken instanceof OrToken)) {
|
|
35
|
-
args.pop();
|
|
36
|
-
return { prim: 'Left', args: [leftToken.Encode(args)] };
|
|
37
|
-
}
|
|
38
|
-
else if (String(rightToken.annot()) === String(label) && !(rightToken instanceof OrToken)) {
|
|
39
|
-
args.pop();
|
|
40
|
-
return { prim: 'Right', args: [rightToken.Encode(args)] };
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
if (leftToken instanceof OrToken) {
|
|
44
|
-
const val = leftToken.Encode(args);
|
|
45
|
-
if (val) {
|
|
46
|
-
return { prim: 'Left', args: [val] };
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
if (rightToken instanceof OrToken) {
|
|
50
|
-
const val = rightToken.Encode(args);
|
|
51
|
-
if (val) {
|
|
52
|
-
return { prim: 'Right', args: [val] };
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
ExtractSignature() {
|
|
59
|
-
const leftToken = this.createToken(this.val.args[0], this.getIdxForChildren(), 'Or');
|
|
60
|
-
let keyCount = 1;
|
|
61
|
-
if (leftToken instanceof OrToken) {
|
|
62
|
-
keyCount = Object.keys(leftToken.generateSchema().schema).length;
|
|
63
|
-
}
|
|
64
|
-
const rightToken = this.createToken(this.val.args[1], this.getIdxForChildren() + keyCount, 'Or');
|
|
65
|
-
const newSig = [];
|
|
66
|
-
if (leftToken instanceof OrToken) {
|
|
67
|
-
newSig.push(...leftToken.ExtractSignature());
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
for (const sig of leftToken.ExtractSignature()) {
|
|
71
|
-
newSig.push([leftToken.annot(), ...sig]);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
if (rightToken instanceof OrToken) {
|
|
75
|
-
newSig.push(...rightToken.ExtractSignature());
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
for (const sig of rightToken.ExtractSignature()) {
|
|
79
|
-
newSig.push([rightToken.annot(), ...sig]);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return newSig;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* @throws {@link OrValidationError}
|
|
86
|
-
*/
|
|
87
|
-
EncodeObject(args, semantic) {
|
|
88
|
-
this.validateJavascriptObject(args);
|
|
89
|
-
const label = Object.keys(args)[0];
|
|
90
|
-
const leftToken = this.createToken(this.val.args[0], this.getIdxForChildren(), 'Or');
|
|
91
|
-
let keyCount = 1;
|
|
92
|
-
if (leftToken instanceof OrToken) {
|
|
93
|
-
keyCount = Object.keys(leftToken.generateSchema().schema).length;
|
|
94
|
-
}
|
|
95
|
-
const rightToken = this.createToken(this.val.args[1], this.getIdxForChildren() + keyCount, 'Or');
|
|
96
|
-
if (String(leftToken.annot()) === String(label) && !(leftToken instanceof OrToken)) {
|
|
97
|
-
return { prim: 'Left', args: [leftToken.EncodeObject(args[label], semantic)] };
|
|
98
|
-
}
|
|
99
|
-
else if (String(rightToken.annot()) === String(label) && !(rightToken instanceof OrToken)) {
|
|
100
|
-
return { prim: 'Right', args: [rightToken.EncodeObject(args[label], semantic)] };
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
if (leftToken instanceof OrToken) {
|
|
104
|
-
const val = leftToken.EncodeObject(args, semantic);
|
|
105
|
-
if (val) {
|
|
106
|
-
return { prim: 'Left', args: [val] };
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
if (rightToken instanceof OrToken) {
|
|
110
|
-
const val = rightToken.EncodeObject(args, semantic);
|
|
111
|
-
if (val) {
|
|
112
|
-
return { prim: 'Right', args: [val] };
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* @throws {@link OrValidationError}
|
|
120
|
-
*/
|
|
121
|
-
validateJavascriptObject(args) {
|
|
122
|
-
if (typeof args !== 'object' ||
|
|
123
|
-
Array.isArray(args) ||
|
|
124
|
-
args === null ||
|
|
125
|
-
Object.keys(args).length !== 1) {
|
|
126
|
-
throw new OrValidationError(args, this, `EncodeObject expects an object with a single key but got: ${JSON.stringify(args)}`);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* @throws {@link OrValidationError}
|
|
131
|
-
*/
|
|
132
|
-
Execute(val, semantics) {
|
|
133
|
-
const leftToken = this.createToken(this.val.args[0], this.getIdxForChildren(), 'Or');
|
|
134
|
-
let keyCount = 1;
|
|
135
|
-
if (leftToken instanceof OrToken) {
|
|
136
|
-
keyCount = Object.keys(leftToken.generateSchema().schema).length;
|
|
137
|
-
}
|
|
138
|
-
const rightToken = this.createToken(this.val.args[1], this.getIdxForChildren() + keyCount, 'Or');
|
|
139
|
-
if (val.prim === 'Right') {
|
|
140
|
-
if (rightToken instanceof OrToken) {
|
|
141
|
-
return rightToken.Execute(val.args[0], semantics);
|
|
142
|
-
}
|
|
143
|
-
else {
|
|
144
|
-
return {
|
|
145
|
-
[rightToken.annot()]: rightToken.Execute(val.args[0], semantics),
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
else if (val.prim === 'Left') {
|
|
150
|
-
if (leftToken instanceof OrToken) {
|
|
151
|
-
return leftToken.Execute(val.args[0], semantics);
|
|
152
|
-
}
|
|
153
|
-
return {
|
|
154
|
-
[leftToken.annot()]: leftToken.Execute(val.args[0], semantics),
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
else {
|
|
158
|
-
throw new OrValidationError(val, this, `Was expecting Left or Right prim but got: ${JSON.stringify(val.prim)}`);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
traversal(getLeftValue, getRightValue, concat) {
|
|
162
|
-
const leftToken = this.createToken(this.val.args[0], this.getIdxForChildren(), 'Or');
|
|
163
|
-
let keyCount = 1;
|
|
164
|
-
let leftValue;
|
|
165
|
-
if (leftToken instanceof OrToken) {
|
|
166
|
-
leftValue = getLeftValue(leftToken);
|
|
167
|
-
keyCount = Object.keys(leftToken.generateSchema().schema).length;
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
170
|
-
leftValue = { [leftToken.annot()]: getLeftValue(leftToken) };
|
|
171
|
-
}
|
|
172
|
-
const rightToken = this.createToken(this.val.args[1], this.getIdxForChildren() + keyCount, 'Or');
|
|
173
|
-
let rightValue;
|
|
174
|
-
if (rightToken instanceof OrToken) {
|
|
175
|
-
rightValue = getRightValue(rightToken);
|
|
176
|
-
}
|
|
177
|
-
else {
|
|
178
|
-
rightValue = { [rightToken.annot()]: getRightValue(rightToken) };
|
|
179
|
-
}
|
|
180
|
-
const res = concat(leftValue, rightValue);
|
|
181
|
-
return res;
|
|
182
|
-
}
|
|
183
|
-
generateSchema() {
|
|
184
|
-
return {
|
|
185
|
-
__michelsonType: OrToken.prim,
|
|
186
|
-
schema: this.traversal((leftToken) => {
|
|
187
|
-
if (leftToken instanceof OrToken) {
|
|
188
|
-
return leftToken.generateSchema().schema;
|
|
189
|
-
}
|
|
190
|
-
else {
|
|
191
|
-
return leftToken.generateSchema();
|
|
192
|
-
}
|
|
193
|
-
}, (rightToken) => {
|
|
194
|
-
if (rightToken instanceof OrToken) {
|
|
195
|
-
return rightToken.generateSchema().schema;
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
return rightToken.generateSchema();
|
|
199
|
-
}
|
|
200
|
-
}, (leftValue, rightValue) => ({
|
|
201
|
-
...leftValue,
|
|
202
|
-
...rightValue,
|
|
203
|
-
})),
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
findToken(label) {
|
|
207
|
-
const leftToken = this.createToken(this.val.args[0], this.getIdxForChildren(), 'Or');
|
|
208
|
-
let keyCount = 1;
|
|
209
|
-
if (leftToken instanceof OrToken) {
|
|
210
|
-
const schema = leftToken.generateSchema();
|
|
211
|
-
keyCount = Object.keys(schema.schema).length;
|
|
212
|
-
}
|
|
213
|
-
const rightToken = this.createToken(this.val.args[1], this.getIdxForChildren() + keyCount, 'Or');
|
|
214
|
-
if (String(leftToken.annot()) === String(label) &&
|
|
215
|
-
!(leftToken instanceof OrToken) &&
|
|
216
|
-
leftToken instanceof token_1.ComparableToken) {
|
|
217
|
-
return leftToken;
|
|
218
|
-
}
|
|
219
|
-
else if (String(rightToken.annot()) === String(label) &&
|
|
220
|
-
!(rightToken instanceof OrToken) &&
|
|
221
|
-
rightToken instanceof token_1.ComparableToken) {
|
|
222
|
-
return rightToken;
|
|
223
|
-
}
|
|
224
|
-
else {
|
|
225
|
-
if (leftToken instanceof OrToken) {
|
|
226
|
-
const tok = leftToken.findToken(label);
|
|
227
|
-
if (tok) {
|
|
228
|
-
return tok;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
if (rightToken instanceof OrToken) {
|
|
232
|
-
const tok = rightToken.findToken(label);
|
|
233
|
-
if (tok) {
|
|
234
|
-
return tok;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
return null;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
compare(val1, val2) {
|
|
241
|
-
const labelVal1 = Object.keys(val1)[0];
|
|
242
|
-
const labelVal2 = Object.keys(val2)[0];
|
|
243
|
-
if (labelVal1 === labelVal2) {
|
|
244
|
-
const token = this.findToken(labelVal1);
|
|
245
|
-
if (token instanceof token_1.ComparableToken) {
|
|
246
|
-
return token.compare(val1[labelVal1], val2[labelVal1]);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
else {
|
|
250
|
-
const encoded1 = JSON.stringify(this.EncodeObject(val1));
|
|
251
|
-
const encoded2 = JSON.stringify(this.EncodeObject(val2));
|
|
252
|
-
return encoded1 < encoded2 ? -1 : 1;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
ToKey(val) {
|
|
256
|
-
return this.Execute(val);
|
|
257
|
-
}
|
|
258
|
-
ToBigMapKey(val) {
|
|
259
|
-
return {
|
|
260
|
-
key: this.EncodeObject(val),
|
|
261
|
-
type: this.typeWithoutAnnotations(),
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
findAndReturnTokens(tokenToFind, tokens) {
|
|
265
|
-
if (OrToken.prim === tokenToFind) {
|
|
266
|
-
tokens.push(this);
|
|
267
|
-
}
|
|
268
|
-
this.traversal((leftToken) => leftToken.findAndReturnTokens(tokenToFind, tokens), (rightToken) => rightToken.findAndReturnTokens(tokenToFind, tokens), (leftValue, rightValue) => ({
|
|
269
|
-
...leftValue,
|
|
270
|
-
...rightValue,
|
|
271
|
-
}));
|
|
272
|
-
return tokens;
|
|
273
|
-
}
|
|
274
|
-
getIdxForChildren() {
|
|
275
|
-
if (token_1.Token.fieldNumberingStrategy === 'Legacy') {
|
|
276
|
-
return this.idx;
|
|
277
|
-
}
|
|
278
|
-
return this.parentTokenType === 'Or' ? this.idx : 0;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
exports.OrToken = OrToken;
|
|
282
|
-
OrToken.prim = 'or';
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PairToken = exports.TokenComparisonError = exports.TokenArgumentValidationError = void 0;
|
|
4
|
-
const token_1 = require("./token");
|
|
5
|
-
const or_1 = require("./or");
|
|
6
|
-
const core_1 = require("@taquito/core");
|
|
7
|
-
/**
|
|
8
|
-
* @category Error
|
|
9
|
-
* Error that indicates in invalid token argument being passed
|
|
10
|
-
*/
|
|
11
|
-
class TokenArgumentValidationError extends core_1.TaquitoError {
|
|
12
|
-
constructor(message) {
|
|
13
|
-
super(message);
|
|
14
|
-
this.message = message;
|
|
15
|
-
this.name = 'TokenArgumentValidationError';
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.TokenArgumentValidationError = TokenArgumentValidationError;
|
|
19
|
-
/**
|
|
20
|
-
* @category Error
|
|
21
|
-
* Error that indicates a failure occurring when doing a comparison of tokens
|
|
22
|
-
*/
|
|
23
|
-
class TokenComparisonError extends core_1.TaquitoError {
|
|
24
|
-
constructor(val1, val2) {
|
|
25
|
-
super();
|
|
26
|
-
this.val1 = val1;
|
|
27
|
-
this.val2 = val2;
|
|
28
|
-
this.name = 'TokenComparisonError';
|
|
29
|
-
this.message = `Tokens ${JSON.stringify(val1)} and ${JSON.stringify(val2)} are not comparable`;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.TokenComparisonError = TokenComparisonError;
|
|
33
|
-
// collapse comb pair
|
|
34
|
-
/**
|
|
35
|
-
* @throws {@link TokenArgumentValidationError}
|
|
36
|
-
*/
|
|
37
|
-
function collapse(val, prim = PairToken.prim) {
|
|
38
|
-
if (Array.isArray(val)) {
|
|
39
|
-
return collapse({
|
|
40
|
-
prim: prim,
|
|
41
|
-
args: val,
|
|
42
|
-
}, prim);
|
|
43
|
-
}
|
|
44
|
-
if (val.args === undefined) {
|
|
45
|
-
throw new TokenArgumentValidationError(`The value ${JSON.stringify(val)} is an invalid PairToken with no arguments, a pair must have two or more arguments.`);
|
|
46
|
-
}
|
|
47
|
-
if (val.args.length > 2) {
|
|
48
|
-
return [
|
|
49
|
-
val.args[0],
|
|
50
|
-
{
|
|
51
|
-
prim: prim,
|
|
52
|
-
args: val.args.slice(1),
|
|
53
|
-
},
|
|
54
|
-
];
|
|
55
|
-
}
|
|
56
|
-
return [val.args[0], val.args[1]];
|
|
57
|
-
}
|
|
58
|
-
class PairToken extends token_1.ComparableToken {
|
|
59
|
-
constructor(val, idx, fac, parentTokenType) {
|
|
60
|
-
super(Array.isArray(val)
|
|
61
|
-
? {
|
|
62
|
-
prim: PairToken.prim,
|
|
63
|
-
args: val,
|
|
64
|
-
}
|
|
65
|
-
: val.prim
|
|
66
|
-
? val
|
|
67
|
-
: {
|
|
68
|
-
prim: PairToken.prim,
|
|
69
|
-
args: val,
|
|
70
|
-
}, idx, fac, parentTokenType);
|
|
71
|
-
}
|
|
72
|
-
args() {
|
|
73
|
-
// collapse comb pair
|
|
74
|
-
return collapse(this.val);
|
|
75
|
-
}
|
|
76
|
-
tokens() {
|
|
77
|
-
let cnt = 0;
|
|
78
|
-
return this.args().map((a) => {
|
|
79
|
-
const tok = this.createToken(a, this.getIdxForChildren() + cnt, 'Pair');
|
|
80
|
-
if (tok instanceof PairToken) {
|
|
81
|
-
cnt += Object.keys(tok.generateSchema()).length;
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
cnt++;
|
|
85
|
-
}
|
|
86
|
-
return tok;
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
Encode(args) {
|
|
90
|
-
return {
|
|
91
|
-
prim: 'Pair',
|
|
92
|
-
args: this.tokens().map((t) => t.Encode(args)),
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
ExtractSignature() {
|
|
96
|
-
const args = this.args();
|
|
97
|
-
const leftToken = this.createToken(args[0], this.getIdxForChildren(), 'Pair');
|
|
98
|
-
let keyCount = 1;
|
|
99
|
-
if (leftToken instanceof or_1.OrToken) {
|
|
100
|
-
keyCount = Object.keys(leftToken.generateSchema()).length;
|
|
101
|
-
}
|
|
102
|
-
const rightToken = this.createToken(args[1], this.getIdxForChildren() + keyCount, 'Pair');
|
|
103
|
-
const newSig = [];
|
|
104
|
-
for (const leftSig of leftToken.ExtractSignature()) {
|
|
105
|
-
for (const rightSig of rightToken.ExtractSignature()) {
|
|
106
|
-
newSig.push([...leftSig, ...rightSig]);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
return newSig;
|
|
110
|
-
}
|
|
111
|
-
ToBigMapKey(val) {
|
|
112
|
-
return {
|
|
113
|
-
key: this.EncodeObject(val),
|
|
114
|
-
type: this.typeWithoutAnnotations(),
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
ToKey(val) {
|
|
118
|
-
return this.Execute(val);
|
|
119
|
-
}
|
|
120
|
-
EncodeObject(args, semantic) {
|
|
121
|
-
const [leftToken, rightToken] = this.tokens();
|
|
122
|
-
let leftValue;
|
|
123
|
-
if (leftToken instanceof PairToken && !leftToken.hasAnnotations()) {
|
|
124
|
-
leftValue = args;
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
leftValue = args[leftToken.annot()];
|
|
128
|
-
}
|
|
129
|
-
let rightValue;
|
|
130
|
-
if (rightToken instanceof PairToken && !rightToken.hasAnnotations()) {
|
|
131
|
-
rightValue = args;
|
|
132
|
-
}
|
|
133
|
-
else {
|
|
134
|
-
rightValue = args[rightToken.annot()];
|
|
135
|
-
}
|
|
136
|
-
return {
|
|
137
|
-
prim: 'Pair',
|
|
138
|
-
args: [
|
|
139
|
-
leftToken.EncodeObject(leftValue, semantic),
|
|
140
|
-
rightToken.EncodeObject(rightValue, semantic),
|
|
141
|
-
],
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
traversal(getLeftValue, getRightValue) {
|
|
145
|
-
const args = this.args();
|
|
146
|
-
const leftToken = this.createToken(args[0], this.getIdxForChildren(), 'Pair');
|
|
147
|
-
let keyCount = 1;
|
|
148
|
-
let leftValue;
|
|
149
|
-
if (leftToken instanceof PairToken && !leftToken.hasAnnotations()) {
|
|
150
|
-
leftValue = getLeftValue(leftToken);
|
|
151
|
-
if (leftToken instanceof PairToken) {
|
|
152
|
-
keyCount = Object.keys(leftToken.generateSchema()).length;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
leftValue = { [leftToken.annot()]: getLeftValue(leftToken) };
|
|
157
|
-
}
|
|
158
|
-
const rightToken = this.createToken(args[1], this.getIdxForChildren() + keyCount, 'Pair');
|
|
159
|
-
let rightValue;
|
|
160
|
-
if (rightToken instanceof PairToken && !rightToken.hasAnnotations()) {
|
|
161
|
-
rightValue = getRightValue(rightToken);
|
|
162
|
-
}
|
|
163
|
-
else {
|
|
164
|
-
rightValue = { [rightToken.annot()]: getRightValue(rightToken) };
|
|
165
|
-
}
|
|
166
|
-
const res = {
|
|
167
|
-
...leftValue,
|
|
168
|
-
...rightValue,
|
|
169
|
-
};
|
|
170
|
-
return res;
|
|
171
|
-
}
|
|
172
|
-
Execute(val, semantics) {
|
|
173
|
-
const args = collapse(val, 'Pair');
|
|
174
|
-
return this.traversal((leftToken) => leftToken.Execute(args[0], semantics), (rightToken) => rightToken.Execute(args[1], semantics));
|
|
175
|
-
}
|
|
176
|
-
generateSchema() {
|
|
177
|
-
return {
|
|
178
|
-
__michelsonType: PairToken.prim,
|
|
179
|
-
schema: this.traversal((leftToken) => {
|
|
180
|
-
if (leftToken instanceof PairToken && !leftToken.hasAnnotations()) {
|
|
181
|
-
return leftToken.generateSchema().schema;
|
|
182
|
-
}
|
|
183
|
-
else {
|
|
184
|
-
return leftToken.generateSchema();
|
|
185
|
-
}
|
|
186
|
-
}, (rightToken) => {
|
|
187
|
-
if (rightToken instanceof PairToken && !rightToken.hasAnnotations()) {
|
|
188
|
-
return rightToken.generateSchema().schema;
|
|
189
|
-
}
|
|
190
|
-
else {
|
|
191
|
-
return rightToken.generateSchema();
|
|
192
|
-
}
|
|
193
|
-
}),
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* @throws {@link TokenComparisonError}
|
|
198
|
-
*/
|
|
199
|
-
compare(val1, val2) {
|
|
200
|
-
const [leftToken, rightToken] = this.tokens();
|
|
201
|
-
const getValue = (token, args) => {
|
|
202
|
-
if (token instanceof PairToken && !token.hasAnnotations()) {
|
|
203
|
-
return args;
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
206
|
-
return args[token.annot()];
|
|
207
|
-
}
|
|
208
|
-
};
|
|
209
|
-
if (leftToken instanceof token_1.ComparableToken && rightToken instanceof token_1.ComparableToken) {
|
|
210
|
-
const result = leftToken.compare(getValue(leftToken, val1), getValue(leftToken, val2));
|
|
211
|
-
if (result === 0) {
|
|
212
|
-
return rightToken.compare(getValue(rightToken, val1), getValue(rightToken, val2));
|
|
213
|
-
}
|
|
214
|
-
return result;
|
|
215
|
-
}
|
|
216
|
-
throw new TokenComparisonError(val1, val2);
|
|
217
|
-
}
|
|
218
|
-
findAndReturnTokens(tokenToFind, tokens) {
|
|
219
|
-
if (PairToken.prim === tokenToFind) {
|
|
220
|
-
tokens.push(this);
|
|
221
|
-
}
|
|
222
|
-
this.tokens().map((t) => t.findAndReturnTokens(tokenToFind, tokens));
|
|
223
|
-
return tokens;
|
|
224
|
-
}
|
|
225
|
-
getIdxForChildren() {
|
|
226
|
-
if (token_1.Token.fieldNumberingStrategy === 'Legacy') {
|
|
227
|
-
return this.idx;
|
|
228
|
-
}
|
|
229
|
-
return this.parentTokenType === 'Pair' ? this.idx : 0;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
exports.PairToken = PairToken;
|
|
233
|
-
PairToken.prim = 'pair';
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SaplingStateToken = exports.SaplingStateValidationError = void 0;
|
|
4
|
-
const token_1 = require("./token");
|
|
5
|
-
/**
|
|
6
|
-
* @category Error
|
|
7
|
-
* Error that indicates a failure happening when parsing encoding/executing a Sapling State
|
|
8
|
-
*/
|
|
9
|
-
class SaplingStateValidationError 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 = 'SaplingStateValidationError';
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.SaplingStateValidationError = SaplingStateValidationError;
|
|
18
|
-
class SaplingStateToken extends token_1.Token {
|
|
19
|
-
constructor(val, idx, fac) {
|
|
20
|
-
super(val, idx, fac);
|
|
21
|
-
this.val = val;
|
|
22
|
-
this.idx = idx;
|
|
23
|
-
this.fac = fac;
|
|
24
|
-
}
|
|
25
|
-
isValid(val) {
|
|
26
|
-
return typeof val === 'object' && Object.keys(val).length === 0;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* @throws {@link SaplingStateValidationError}
|
|
30
|
-
*/
|
|
31
|
-
Execute(val, semantic) {
|
|
32
|
-
if (semantic && semantic[SaplingStateToken.prim]) {
|
|
33
|
-
return semantic[SaplingStateToken.prim](val, this.val);
|
|
34
|
-
}
|
|
35
|
-
if ('int' in val) {
|
|
36
|
-
return val.int;
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
throw new SaplingStateValidationError(val, this, `Sapling state is expecting an object with an int property. Got ${JSON.stringify(val)}`);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* @throws {@link SaplingStateValidationError}
|
|
44
|
-
*/
|
|
45
|
-
Encode(args) {
|
|
46
|
-
const val = args.pop();
|
|
47
|
-
if (this.isValid(val)) {
|
|
48
|
-
return [];
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
throw new SaplingStateValidationError(val, this, `Invalid sapling_state. Received: ${JSON.stringify(val)} while expecting: {}`);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* @throws {@link SaplingStateValidationError}
|
|
56
|
-
*/
|
|
57
|
-
EncodeObject(val, semantic) {
|
|
58
|
-
if (semantic && semantic[SaplingStateToken.prim]) {
|
|
59
|
-
return semantic[SaplingStateToken.prim](val);
|
|
60
|
-
}
|
|
61
|
-
if (this.isValid(val)) {
|
|
62
|
-
return [];
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
throw new SaplingStateValidationError(val, this, `Invalid sapling_state. Received: ${JSON.stringify(val)} while expecting: {}`);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
generateSchema() {
|
|
69
|
-
return {
|
|
70
|
-
__michelsonType: SaplingStateToken.prim,
|
|
71
|
-
schema: {
|
|
72
|
-
memoSize: this.val.args[0]['int'],
|
|
73
|
-
},
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
findAndReturnTokens(tokenToFind, tokens) {
|
|
77
|
-
if (SaplingStateToken.prim === tokenToFind) {
|
|
78
|
-
tokens.push(this);
|
|
79
|
-
}
|
|
80
|
-
return tokens;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
exports.SaplingStateToken = SaplingStateToken;
|
|
84
|
-
SaplingStateToken.prim = 'sapling_state';
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SaplingTransactionDeprecatedToken = exports.SaplingTransactionDeprecatedValidationError = void 0;
|
|
4
|
-
const token_1 = require("./token");
|
|
5
|
-
/**
|
|
6
|
-
* @category Error
|
|
7
|
-
* Error that indicates a failure happening when parsing encoding/executing a Sapling Transaction Deprecated
|
|
8
|
-
*/
|
|
9
|
-
class SaplingTransactionDeprecatedValidationError 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 = 'SaplingTransactionDeprecatedValidationError';
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.SaplingTransactionDeprecatedValidationError = SaplingTransactionDeprecatedValidationError;
|
|
18
|
-
class SaplingTransactionDeprecatedToken extends token_1.Token {
|
|
19
|
-
constructor(val, idx, fac) {
|
|
20
|
-
super(val, idx, fac);
|
|
21
|
-
this.val = val;
|
|
22
|
-
this.idx = idx;
|
|
23
|
-
this.fac = fac;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* @throws {@link SaplingTransactionDeprecatedValidationError}
|
|
27
|
-
*/
|
|
28
|
-
Execute(_val) {
|
|
29
|
-
throw new SaplingTransactionDeprecatedValidationError(_val, this, `There is no literal value for the sapling_transaction_deprecated type. Got: ${JSON.stringify(_val)}.`);
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* @throws {@link SaplingTransactionDeprecatedValidationError}
|
|
33
|
-
*/
|
|
34
|
-
validateBytes(val) {
|
|
35
|
-
const bytes = /^(0x|0X)?([0-9a-fA-F]*$)/.exec(val);
|
|
36
|
-
if (bytes && bytes[2].length % 2 === 0) {
|
|
37
|
-
return bytes[2];
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
throw new SaplingTransactionDeprecatedValidationError(val, this, `Invalid bytes: ${JSON.stringify(val)}`);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
convertUint8ArrayToHexString(val) {
|
|
44
|
-
return val.constructor === Uint8Array ? Buffer.from(val).toString('hex') : val;
|
|
45
|
-
}
|
|
46
|
-
Encode(args) {
|
|
47
|
-
let val = args.pop();
|
|
48
|
-
val = this.validateBytes(this.convertUint8ArrayToHexString(val));
|
|
49
|
-
return { bytes: String(val).toString() };
|
|
50
|
-
}
|
|
51
|
-
EncodeObject(val, semantic) {
|
|
52
|
-
val = this.validateBytes(this.convertUint8ArrayToHexString(val));
|
|
53
|
-
if (semantic && semantic[SaplingTransactionDeprecatedToken.prim]) {
|
|
54
|
-
return semantic[SaplingTransactionDeprecatedToken.prim](val);
|
|
55
|
-
}
|
|
56
|
-
return { bytes: String(val).toString() };
|
|
57
|
-
}
|
|
58
|
-
generateSchema() {
|
|
59
|
-
return {
|
|
60
|
-
__michelsonType: SaplingTransactionDeprecatedToken.prim,
|
|
61
|
-
schema: {
|
|
62
|
-
memoSize: this.val.args[0]['int'],
|
|
63
|
-
},
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
findAndReturnTokens(tokenToFind, tokens) {
|
|
67
|
-
if (SaplingTransactionDeprecatedToken.prim === tokenToFind) {
|
|
68
|
-
tokens.push(this);
|
|
69
|
-
}
|
|
70
|
-
return tokens;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
exports.SaplingTransactionDeprecatedToken = SaplingTransactionDeprecatedToken;
|
|
74
|
-
SaplingTransactionDeprecatedToken.prim = 'sapling_transaction_deprecated';
|