@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,260 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Schema = void 0;
|
|
5
|
-
exports.deepEqual = deepEqual;
|
|
6
|
-
const bigmap_1 = require("../tokens/bigmap");
|
|
7
|
-
const createToken_1 = require("../tokens/createToken");
|
|
8
|
-
const map_1 = require("../tokens/map");
|
|
9
|
-
const or_1 = require("../tokens/or");
|
|
10
|
-
const pair_1 = require("../tokens/pair");
|
|
11
|
-
const ticket_1 = require("../tokens/ticket");
|
|
12
|
-
const ticket_deprecated_1 = require("../tokens/ticket-deprecated");
|
|
13
|
-
const token_1 = require("../tokens/token");
|
|
14
|
-
const errors_1 = require("./errors");
|
|
15
|
-
const schemaTypeSymbol = Symbol.for('taquito-schema-type-symbol');
|
|
16
|
-
// collapse comb pair
|
|
17
|
-
function collapse(val, prim = pair_1.PairToken.prim) {
|
|
18
|
-
if (Array.isArray(val)) {
|
|
19
|
-
return collapse({
|
|
20
|
-
prim: prim,
|
|
21
|
-
args: val,
|
|
22
|
-
}, prim);
|
|
23
|
-
}
|
|
24
|
-
const extended = val;
|
|
25
|
-
if (extended.prim === prim && extended.args && extended.args.length > 2) {
|
|
26
|
-
return {
|
|
27
|
-
...extended,
|
|
28
|
-
args: [
|
|
29
|
-
extended.args?.[0],
|
|
30
|
-
{
|
|
31
|
-
prim: prim,
|
|
32
|
-
args: extended.args?.slice(1),
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
return extended;
|
|
38
|
-
}
|
|
39
|
-
function deepEqual(a, b) {
|
|
40
|
-
if (a === undefined || b === undefined) {
|
|
41
|
-
return a === b;
|
|
42
|
-
}
|
|
43
|
-
const ac = collapse(a);
|
|
44
|
-
const bc = collapse(b);
|
|
45
|
-
return (ac.prim === bc.prim &&
|
|
46
|
-
((ac.args === undefined && bc.args === undefined) ||
|
|
47
|
-
(ac.args !== undefined &&
|
|
48
|
-
bc.args !== undefined &&
|
|
49
|
-
ac.args.length === bc.args.length &&
|
|
50
|
-
ac.args.every((v, i) => deepEqual(v, bc.args?.[i] ?? {})))) &&
|
|
51
|
-
((ac.annots === undefined && bc.annots === undefined) ||
|
|
52
|
-
(ac.annots !== undefined &&
|
|
53
|
-
bc.annots !== undefined &&
|
|
54
|
-
ac.annots.length === bc.annots.length &&
|
|
55
|
-
ac.annots.every((v, i) => v === bc.annots?.[i]))));
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* @remarks Our current smart contract abstraction feature is currently in preview. Its API is not final, and it may not cover every use case (yet). We will greatly appreciate any feedback on this feature.
|
|
59
|
-
*/
|
|
60
|
-
class Schema {
|
|
61
|
-
static isSchema(obj) {
|
|
62
|
-
return obj && obj[schemaTypeSymbol] === true;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* @throws {@link InvalidRpcResponseError}
|
|
66
|
-
*/
|
|
67
|
-
static fromRPCResponse(val) {
|
|
68
|
-
if (!val) {
|
|
69
|
-
throw new errors_1.InvalidRpcResponseError(val, 'the RPC response is empty');
|
|
70
|
-
}
|
|
71
|
-
if (!val.script) {
|
|
72
|
-
throw new errors_1.InvalidRpcResponseError(val, 'the RPC response has no script');
|
|
73
|
-
}
|
|
74
|
-
if (!Array.isArray(val.script.code)) {
|
|
75
|
-
throw new errors_1.InvalidRpcResponseError(val, 'The response.script.code should be an array');
|
|
76
|
-
}
|
|
77
|
-
let code = val.script.code;
|
|
78
|
-
while (code.length === 1 && Array.isArray(code[0])) {
|
|
79
|
-
code = code[0];
|
|
80
|
-
}
|
|
81
|
-
const storage = code.find((x) => 'prim' in x && x.prim === 'storage');
|
|
82
|
-
if (!storage || !Array.isArray(storage.args)) {
|
|
83
|
-
throw new errors_1.InvalidRpcResponseError(val, 'The response.script.code has an element of type {prim: "storage"}, but its args is not an array');
|
|
84
|
-
}
|
|
85
|
-
return new Schema(storage.args[0]);
|
|
86
|
-
}
|
|
87
|
-
isExpressionExtended(val) {
|
|
88
|
-
return 'prim' in val && Array.isArray(val.args);
|
|
89
|
-
}
|
|
90
|
-
constructor(val) {
|
|
91
|
-
this.val = val;
|
|
92
|
-
this[_a] = true;
|
|
93
|
-
this.root = (0, createToken_1.createToken)(val, 0);
|
|
94
|
-
if (this.root instanceof bigmap_1.BigMapToken) {
|
|
95
|
-
this.bigMap = this.root;
|
|
96
|
-
}
|
|
97
|
-
else if (this.isExpressionExtended(val) && val.prim === 'pair') {
|
|
98
|
-
const exp = val.args[0];
|
|
99
|
-
if (this.isExpressionExtended(exp) && exp.prim === 'big_map') {
|
|
100
|
-
this.bigMap = new bigmap_1.BigMapToken(exp, 0, createToken_1.createToken);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
removeTopLevelAnnotation(obj) {
|
|
105
|
-
// PairToken and OrToken can have redundant top level annotation in their storage
|
|
106
|
-
if (this.root instanceof pair_1.PairToken || this.root instanceof or_1.OrToken) {
|
|
107
|
-
if (this.root.hasAnnotations() && typeof obj === 'object' && Object.keys(obj).length === 1) {
|
|
108
|
-
return obj[Object.keys(obj)[0]];
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
return obj;
|
|
112
|
-
}
|
|
113
|
-
Execute(val, semantics) {
|
|
114
|
-
const storage = this.root.Execute(val, semantics);
|
|
115
|
-
return this.removeTopLevelAnnotation(storage);
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Validates that a value matches the schema type.
|
|
119
|
-
* Performs type checking with special handling for BigMap, Ticket, and nested Map tokens.
|
|
120
|
-
*
|
|
121
|
-
* @param val - The value to validate against the schema
|
|
122
|
-
* @returns Returns true if validation passes, false if validation fails
|
|
123
|
-
*/
|
|
124
|
-
Typecheck(val) {
|
|
125
|
-
if (this.root instanceof bigmap_1.BigMapToken && Number.isInteger(Number(val))) {
|
|
126
|
-
return true;
|
|
127
|
-
}
|
|
128
|
-
if (this.root instanceof ticket_1.TicketToken && val.ticketer && val.value && val.amount) {
|
|
129
|
-
return true;
|
|
130
|
-
}
|
|
131
|
-
if (this.root instanceof ticket_deprecated_1.TicketDeprecatedToken && val.ticketer && val.value && val.amount) {
|
|
132
|
-
return true;
|
|
133
|
-
}
|
|
134
|
-
if (this.root instanceof map_1.MapToken && this.root.ValueSchema instanceof bigmap_1.BigMapToken) {
|
|
135
|
-
return true;
|
|
136
|
-
}
|
|
137
|
-
try {
|
|
138
|
-
this.root.EncodeObject(val);
|
|
139
|
-
return true;
|
|
140
|
-
}
|
|
141
|
-
catch (error) {
|
|
142
|
-
return false;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* @throws {@link InvalidBigMapSchemaError}
|
|
147
|
-
* @throws {@link InvalidBigMapDiffError}
|
|
148
|
-
*/
|
|
149
|
-
ExecuteOnBigMapDiff(diff, semantics) {
|
|
150
|
-
if (!this.bigMap) {
|
|
151
|
-
throw new errors_1.InvalidBigMapSchemaError('Big map schema is undefined');
|
|
152
|
-
}
|
|
153
|
-
if (!Array.isArray(diff)) {
|
|
154
|
-
throw new errors_1.InvalidBigMapDiffError(`Big map diff must be an array, got: ${JSON.stringify(diff)}`, diff);
|
|
155
|
-
}
|
|
156
|
-
const eltFormat = diff.map(({ key, value }) => ({ args: [key, value] }));
|
|
157
|
-
return this.bigMap.Execute(eltFormat, semantics);
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* @throws {@link InvalidBigMapSchemaError}
|
|
161
|
-
*/
|
|
162
|
-
ExecuteOnBigMapValue(key, semantics) {
|
|
163
|
-
if (!this.bigMap) {
|
|
164
|
-
throw new errors_1.InvalidBigMapSchemaError('Big map schema is undefined');
|
|
165
|
-
}
|
|
166
|
-
return this.bigMap.ValueSchema.Execute(key, semantics);
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* @throws {@link InvalidBigMapSchemaError}
|
|
170
|
-
* @throws {@link BigMapEncodingError}
|
|
171
|
-
*/
|
|
172
|
-
EncodeBigMapKey(key) {
|
|
173
|
-
if (!this.bigMap) {
|
|
174
|
-
throw new errors_1.InvalidBigMapSchemaError('Big map schema is undefined');
|
|
175
|
-
}
|
|
176
|
-
try {
|
|
177
|
-
return this.bigMap.KeySchema.ToBigMapKey(key);
|
|
178
|
-
}
|
|
179
|
-
catch (ex) {
|
|
180
|
-
throw new errors_1.BigMapEncodingError('key', ex, this.bigMap.KeySchema, key);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* @throws TokenValidationError
|
|
185
|
-
* @throws {@link StorageEncodingError}
|
|
186
|
-
*/
|
|
187
|
-
Encode(value, semantics) {
|
|
188
|
-
try {
|
|
189
|
-
return this.root.EncodeObject(value, semantics);
|
|
190
|
-
}
|
|
191
|
-
catch (ex) {
|
|
192
|
-
if (ex instanceof token_1.TokenValidationError) {
|
|
193
|
-
throw ex;
|
|
194
|
-
}
|
|
195
|
-
throw new errors_1.StorageEncodingError('storage object', ex, this.root, value, semantics);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* Produce a representation of the storage schema.
|
|
200
|
-
* Note: Provide guidance on how to write the storage object for the origination operation with Taquito.
|
|
201
|
-
*/
|
|
202
|
-
generateSchema() {
|
|
203
|
-
return this.removeTopLevelAnnotation(this.root.generateSchema());
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Look up in top-level pairs of the storage to find a value matching the specified type
|
|
207
|
-
*
|
|
208
|
-
* @returns The first value found that match the type or `undefined` if no value is found
|
|
209
|
-
*
|
|
210
|
-
* @param storage storage to parse to find the value
|
|
211
|
-
* @param valueType type of value to look for
|
|
212
|
-
*
|
|
213
|
-
*/
|
|
214
|
-
FindFirstInTopLevelPair(storage, valueType) {
|
|
215
|
-
return this.findValue(this.root['val'], storage, valueType);
|
|
216
|
-
}
|
|
217
|
-
// TODO check these type casts
|
|
218
|
-
/**
|
|
219
|
-
* @throws {@link MissingArgumentError}
|
|
220
|
-
*/
|
|
221
|
-
findValue(schema, storage, valueToFind) {
|
|
222
|
-
if (deepEqual(valueToFind, schema)) {
|
|
223
|
-
return storage;
|
|
224
|
-
}
|
|
225
|
-
if (Array.isArray(schema) || schema.prim === 'pair') {
|
|
226
|
-
const sch = collapse(schema);
|
|
227
|
-
const strg = collapse(storage, 'Pair');
|
|
228
|
-
if (sch.args === undefined || strg.args === undefined) {
|
|
229
|
-
throw new errors_1.MissingArgumentError('Tokens have no arguments'); // unlikely
|
|
230
|
-
}
|
|
231
|
-
if (sch.args[0])
|
|
232
|
-
return (
|
|
233
|
-
// unsafe
|
|
234
|
-
this.findValue(sch.args[0], strg.args[0], valueToFind) ||
|
|
235
|
-
this.findValue(sch.args[1], strg.args[1], valueToFind));
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* Look up the schema to find any occurrence of a particular token.
|
|
240
|
-
*
|
|
241
|
-
* @returns an array of tokens of the specified kind or an empty array if no token was found
|
|
242
|
-
*
|
|
243
|
-
* @param tokenToFind string representing the prim property of the token to find
|
|
244
|
-
*
|
|
245
|
-
* @example
|
|
246
|
-
* ```
|
|
247
|
-
* Useful to find all global constants in a script, an array of GlobalConstantToken is returned:
|
|
248
|
-
*
|
|
249
|
-
* const schema = new Schema(script);
|
|
250
|
-
* const allGlobalConstantTokens = schema.findToken('constant');
|
|
251
|
-
* ```
|
|
252
|
-
*
|
|
253
|
-
*/
|
|
254
|
-
findToken(tokenToFind) {
|
|
255
|
-
const tokens = [];
|
|
256
|
-
return this.root.findAndReturnTokens(tokenToFind, tokens);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
exports.Schema = Schema;
|
|
260
|
-
_a = schemaTypeSymbol;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ViewSchema = void 0;
|
|
4
|
-
const createToken_1 = require("../tokens/createToken");
|
|
5
|
-
const errors_1 = require("./errors");
|
|
6
|
-
class ViewSchema {
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* Create an instance of ViewSchema for each view in a script
|
|
10
|
-
*
|
|
11
|
-
* @param val contract script obtained from the RPC
|
|
12
|
-
* @returns array of ViewSchema or empty array if there is no view in the contract
|
|
13
|
-
* @throws {@link InvalidScriptError}
|
|
14
|
-
*/
|
|
15
|
-
static fromRPCResponse(val) {
|
|
16
|
-
const allViewSchema = [];
|
|
17
|
-
const views = val &&
|
|
18
|
-
val.script &&
|
|
19
|
-
Array.isArray(val.script.code) &&
|
|
20
|
-
val.script.code.filter((x) => x.prim === 'view');
|
|
21
|
-
if (views) {
|
|
22
|
-
views.forEach((view) => {
|
|
23
|
-
allViewSchema.push(new ViewSchema(view.args));
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
return allViewSchema;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* @throws {@link InvalidScriptError}
|
|
30
|
-
*/
|
|
31
|
-
constructor(viewArgs) {
|
|
32
|
-
if (!viewArgs) {
|
|
33
|
-
throw new errors_1.InvalidScriptError(viewArgs, 'the args are not defined');
|
|
34
|
-
}
|
|
35
|
-
if (viewArgs.length !== 4) {
|
|
36
|
-
throw new errors_1.InvalidScriptError(viewArgs, `there should be exactly 4 arguments`);
|
|
37
|
-
}
|
|
38
|
-
if (!('string' in viewArgs[0]) || !viewArgs[0]['string']) {
|
|
39
|
-
throw new errors_1.InvalidScriptError(viewArgs, `The first argument should be a string, representing the view name. It should be in the form: { string: 'viewName' }`);
|
|
40
|
-
}
|
|
41
|
-
this.viewName = viewArgs[0]['string'];
|
|
42
|
-
this.viewArgsType = viewArgs[1];
|
|
43
|
-
this.viewReturnType = viewArgs[2];
|
|
44
|
-
this.instructions = viewArgs[3];
|
|
45
|
-
this.rootArgsType = (0, createToken_1.createToken)(this.viewArgsType, 0);
|
|
46
|
-
this.rootReturnType = (0, createToken_1.createToken)(this.viewReturnType, 0);
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
*
|
|
50
|
-
* Transform the view parameter into Michelson
|
|
51
|
-
*
|
|
52
|
-
* @param args parameter of the view in js format
|
|
53
|
-
* @returns parameter of the view in Michelson
|
|
54
|
-
* @throws {@link ParameterEncodingError}
|
|
55
|
-
*/
|
|
56
|
-
encodeViewArgs(args) {
|
|
57
|
-
try {
|
|
58
|
-
return this.rootArgsType.EncodeObject(args);
|
|
59
|
-
}
|
|
60
|
-
catch (ex) {
|
|
61
|
-
throw new errors_1.ParameterEncodingError(this.viewName, undefined, args, ex);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
*
|
|
66
|
-
* Transform the view result from Michelson to readable data
|
|
67
|
-
*
|
|
68
|
-
* @param val result of the view in JSON Michelson
|
|
69
|
-
* @param semantics optional semantics to override the default decoding behavior
|
|
70
|
-
* @returns result of the view in a readable format
|
|
71
|
-
*/
|
|
72
|
-
decodeViewResult(val, semantics) {
|
|
73
|
-
return this.rootReturnType.Execute(val, semantics);
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
*
|
|
77
|
-
* Return the signature of the view parameter
|
|
78
|
-
*/
|
|
79
|
-
extractArgsSchema() {
|
|
80
|
-
return this.rootArgsType.generateSchema();
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
*
|
|
84
|
-
* Return the format of the view result
|
|
85
|
-
*/
|
|
86
|
-
extractResultSchema() {
|
|
87
|
-
return this.rootReturnType.generateSchema();
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
exports.ViewSchema = ViewSchema;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @packageDocumentation
|
|
4
|
-
* @module @taquito/michelson-encoder
|
|
5
|
-
*/
|
|
6
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
-
if (k2 === undefined) k2 = k;
|
|
8
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
-
}
|
|
12
|
-
Object.defineProperty(o, k2, desc);
|
|
13
|
-
}) : (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
o[k2] = m[k];
|
|
16
|
-
}));
|
|
17
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.Token = exports.VERSION = exports.SaplingStateValue = exports.UnitValue = void 0;
|
|
22
|
-
__exportStar(require("./schema/storage"), exports);
|
|
23
|
-
__exportStar(require("./schema/parameter"), exports);
|
|
24
|
-
__exportStar(require("./schema/view-schema"), exports);
|
|
25
|
-
__exportStar(require("./schema/event-schema"), exports);
|
|
26
|
-
__exportStar(require("./schema/errors"), exports);
|
|
27
|
-
__exportStar(require("./schema/types"), exports);
|
|
28
|
-
__exportStar(require("./errors"), exports);
|
|
29
|
-
var constants_1 = require("./constants");
|
|
30
|
-
Object.defineProperty(exports, "UnitValue", { enumerable: true, get: function () { return constants_1.UnitValue; } });
|
|
31
|
-
Object.defineProperty(exports, "SaplingStateValue", { enumerable: true, get: function () { return constants_1.SaplingStateValue; } });
|
|
32
|
-
__exportStar(require("./michelson-map"), exports);
|
|
33
|
-
var version_1 = require("./version");
|
|
34
|
-
Object.defineProperty(exports, "VERSION", { enumerable: true, get: function () { return version_1.VERSION; } });
|
|
35
|
-
var token_1 = require("./tokens/token");
|
|
36
|
-
Object.defineProperty(exports, "Token", { enumerable: true, get: function () { return token_1.Token; } });
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BigMapToken = exports.BigMapValidationError = void 0;
|
|
4
|
-
const michelson_map_1 = require("../michelson-map");
|
|
5
|
-
const token_1 = require("./token");
|
|
6
|
-
/**
|
|
7
|
-
* @category Error
|
|
8
|
-
* Error that indicates a failure happening when parsing encoding/executing Big Map types
|
|
9
|
-
*/
|
|
10
|
-
class BigMapValidationError extends token_1.TokenValidationError {
|
|
11
|
-
constructor(value, token, message) {
|
|
12
|
-
super(value, token, message);
|
|
13
|
-
this.value = value;
|
|
14
|
-
this.token = token;
|
|
15
|
-
this.name = 'BigMapValidationError';
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.BigMapValidationError = BigMapValidationError;
|
|
19
|
-
class BigMapToken extends token_1.Token {
|
|
20
|
-
constructor(val, idx, fac) {
|
|
21
|
-
super(val, idx, fac);
|
|
22
|
-
this.val = val;
|
|
23
|
-
this.idx = idx;
|
|
24
|
-
this.fac = fac;
|
|
25
|
-
}
|
|
26
|
-
get ValueSchema() {
|
|
27
|
-
return this.createToken(this.val.args[1], 0);
|
|
28
|
-
}
|
|
29
|
-
get KeySchema() {
|
|
30
|
-
return this.createToken(this.val.args[0], 0);
|
|
31
|
-
}
|
|
32
|
-
generateSchema() {
|
|
33
|
-
return {
|
|
34
|
-
__michelsonType: BigMapToken.prim,
|
|
35
|
-
schema: {
|
|
36
|
-
key: this.KeySchema.generateSchema(),
|
|
37
|
-
value: this.ValueSchema.generateSchema(),
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* @throws {@link BigMapValidationError}
|
|
43
|
-
*/
|
|
44
|
-
validate(value) {
|
|
45
|
-
if (!michelson_map_1.MichelsonMap.isMichelsonMap(value)) {
|
|
46
|
-
throw new BigMapValidationError(value, this, `Value ${JSON.stringify(value)} is not a MichelsonMap`);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
objLitToMichelsonMap(val) {
|
|
50
|
-
if (val instanceof michelson_map_1.MichelsonMap)
|
|
51
|
-
return val;
|
|
52
|
-
if (typeof val === 'object') {
|
|
53
|
-
if (Object.keys(val).length === 0) {
|
|
54
|
-
return new michelson_map_1.MichelsonMap();
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
return michelson_map_1.MichelsonMap.fromLiteral(val);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return val;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* @throws {@link BigMapValidationError}
|
|
64
|
-
*/
|
|
65
|
-
Encode(args) {
|
|
66
|
-
const val = this.objLitToMichelsonMap(args.pop());
|
|
67
|
-
this.validate(val);
|
|
68
|
-
return Array.from(val.keys())
|
|
69
|
-
.sort((a, b) => this.KeySchema.compare(a, b))
|
|
70
|
-
.map((key) => {
|
|
71
|
-
return {
|
|
72
|
-
prim: 'Elt',
|
|
73
|
-
args: [this.KeySchema.EncodeObject(key), this.ValueSchema.EncodeObject(val.get(key))],
|
|
74
|
-
};
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* @throws {@link BigMapValidationError}
|
|
79
|
-
*/
|
|
80
|
-
EncodeObject(args, semantic) {
|
|
81
|
-
const val = this.objLitToMichelsonMap(args);
|
|
82
|
-
this.validate(val);
|
|
83
|
-
if (semantic && semantic[BigMapToken.prim]) {
|
|
84
|
-
return semantic[BigMapToken.prim](val, this.val);
|
|
85
|
-
}
|
|
86
|
-
return Array.from(val.keys())
|
|
87
|
-
.sort((a, b) => this.KeySchema.compare(a, b))
|
|
88
|
-
.map((key) => {
|
|
89
|
-
return {
|
|
90
|
-
prim: 'Elt',
|
|
91
|
-
args: [this.KeySchema.EncodeObject(key), this.ValueSchema.EncodeObject(val.get(key))],
|
|
92
|
-
};
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* @throws {@link InvalidMapTypeError} when the argument passed to val is an array but not a valid map type
|
|
97
|
-
* @throws {@link BigMapValidationError} when the value is invalid
|
|
98
|
-
*/
|
|
99
|
-
Execute(val, semantic) {
|
|
100
|
-
if (semantic && semantic[BigMapToken.prim]) {
|
|
101
|
-
return semantic[BigMapToken.prim](val, this.val);
|
|
102
|
-
}
|
|
103
|
-
if (Array.isArray(val)) {
|
|
104
|
-
// Athens is returning an empty array for big map in storage
|
|
105
|
-
// Internal: In taquito v5 it is still used to decode big map diff (as if they were a regular map)
|
|
106
|
-
const map = new michelson_map_1.MichelsonMap(this.val);
|
|
107
|
-
val.forEach((current) => {
|
|
108
|
-
map.set(this.KeySchema.ToKey(current.args[0]), this.ValueSchema.Execute(current.args[1]));
|
|
109
|
-
});
|
|
110
|
-
return map;
|
|
111
|
-
}
|
|
112
|
-
else if ('int' in val) {
|
|
113
|
-
// Babylon is returning an int with the big map id in contract storage
|
|
114
|
-
return val.int;
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
throw new BigMapValidationError(val, this, `Big map is expecting either an array (Athens) or an object with an int property (Babylon). Got ${JSON.stringify(val)}`);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
findAndReturnTokens(tokenToFind, tokens) {
|
|
121
|
-
if (BigMapToken.prim === tokenToFind) {
|
|
122
|
-
tokens.push(this);
|
|
123
|
-
}
|
|
124
|
-
this.KeySchema.findAndReturnTokens(tokenToFind, tokens);
|
|
125
|
-
this.ValueSchema.findAndReturnTokens(tokenToFind, tokens);
|
|
126
|
-
return tokens;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
exports.BigMapToken = BigMapToken;
|
|
130
|
-
BigMapToken.prim = 'big_map';
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Bls12381frToken = exports.Bls12381frValidationError = void 0;
|
|
4
|
-
const token_1 = require("./token");
|
|
5
|
-
/**
|
|
6
|
-
* @category Error
|
|
7
|
-
* Error that indicates a failure happening when parsing encoding/executing a BLS12-381 scalar field Fr
|
|
8
|
-
*/
|
|
9
|
-
class Bls12381frValidationError 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 = 'Bls12381frValidationError';
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.Bls12381frValidationError = Bls12381frValidationError;
|
|
18
|
-
class Bls12381frToken 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 Bls12381frValidationError}
|
|
27
|
-
*/
|
|
28
|
-
validate(val) {
|
|
29
|
-
if (/^[0-9a-fA-F]*$/.test(val) && val.length % 2 === 0) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
throw new Bls12381frValidationError(val, this, `Invalid bytes: ${JSON.stringify(val)}`);
|
|
33
|
-
}
|
|
34
|
-
convertUint8ArrayToHexString(val) {
|
|
35
|
-
return val.constructor === Uint8Array ? Buffer.from(val).toString('hex') : val;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* @throws {@link Bls12381frValidationError}
|
|
39
|
-
*/
|
|
40
|
-
Encode(args) {
|
|
41
|
-
let val = args.pop();
|
|
42
|
-
if (typeof val === 'number') {
|
|
43
|
-
return { int: val.toString() };
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
val = this.convertUint8ArrayToHexString(val);
|
|
47
|
-
this.validate(val);
|
|
48
|
-
return { bytes: val };
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* @throws {@link Bls12381frValidationError}
|
|
53
|
-
*/
|
|
54
|
-
EncodeObject(val, semantic) {
|
|
55
|
-
if (semantic && semantic[Bls12381frToken.prim]) {
|
|
56
|
-
return semantic[Bls12381frToken.prim](val);
|
|
57
|
-
}
|
|
58
|
-
if (typeof val === 'number') {
|
|
59
|
-
return { int: val.toString() };
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
val = this.convertUint8ArrayToHexString(val);
|
|
63
|
-
this.validate(val);
|
|
64
|
-
return { bytes: val };
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
Execute(val) {
|
|
68
|
-
return val.bytes;
|
|
69
|
-
}
|
|
70
|
-
generateSchema() {
|
|
71
|
-
return {
|
|
72
|
-
__michelsonType: Bls12381frToken.prim,
|
|
73
|
-
schema: Bls12381frToken.prim,
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
findAndReturnTokens(tokenToFind, tokens) {
|
|
77
|
-
if (Bls12381frToken.prim === tokenToFind) {
|
|
78
|
-
tokens.push(this);
|
|
79
|
-
}
|
|
80
|
-
return tokens;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
exports.Bls12381frToken = Bls12381frToken;
|
|
84
|
-
// An element of the BLS12-381 scalar field Fr
|
|
85
|
-
// see https://tezos.gitlab.io/michelson-reference/#type-bls12_381_fr
|
|
86
|
-
Bls12381frToken.prim = 'bls12_381_fr';
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Bls12381g1Token = exports.Bls12381g1ValidationError = void 0;
|
|
4
|
-
const token_1 = require("./token");
|
|
5
|
-
/**
|
|
6
|
-
* @category Error
|
|
7
|
-
* Error that indicates a failure happening when parsing encoding/executing a BLS12-381 curve G1
|
|
8
|
-
*/
|
|
9
|
-
class Bls12381g1ValidationError 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 = 'Bls12381g1ValidationError';
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.Bls12381g1ValidationError = Bls12381g1ValidationError;
|
|
18
|
-
class Bls12381g1Token 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 Bls12381g1ValidationError}
|
|
27
|
-
*/
|
|
28
|
-
validate(val) {
|
|
29
|
-
if (/^[0-9a-fA-F]*$/.test(val) && val.length % 2 === 0) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
throw new Bls12381g1ValidationError(val, this, `Invalid bytes: ${JSON.stringify(val)}`);
|
|
33
|
-
}
|
|
34
|
-
convertUint8ArrayToHexString(val) {
|
|
35
|
-
return val.constructor === Uint8Array ? Buffer.from(val).toString('hex') : val;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* @throws {@link Bls12381g1ValidationError}
|
|
39
|
-
*/
|
|
40
|
-
Encode(args) {
|
|
41
|
-
let val = args.pop();
|
|
42
|
-
val = this.convertUint8ArrayToHexString(val);
|
|
43
|
-
this.validate(val);
|
|
44
|
-
return { bytes: val };
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* @throws {@link Bls12381g1ValidationError}
|
|
48
|
-
*/
|
|
49
|
-
EncodeObject(val, semantic) {
|
|
50
|
-
val = this.convertUint8ArrayToHexString(val);
|
|
51
|
-
this.validate(val);
|
|
52
|
-
if (semantic && semantic[Bls12381g1Token.prim]) {
|
|
53
|
-
return semantic[Bls12381g1Token.prim](val);
|
|
54
|
-
}
|
|
55
|
-
return { bytes: val };
|
|
56
|
-
}
|
|
57
|
-
Execute(val) {
|
|
58
|
-
return val.bytes;
|
|
59
|
-
}
|
|
60
|
-
generateSchema() {
|
|
61
|
-
return {
|
|
62
|
-
__michelsonType: Bls12381g1Token.prim,
|
|
63
|
-
schema: Bls12381g1Token.prim,
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
findAndReturnTokens(tokenToFind, tokens) {
|
|
67
|
-
if (Bls12381g1Token.prim === tokenToFind) {
|
|
68
|
-
tokens.push(this);
|
|
69
|
-
}
|
|
70
|
-
return tokens;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
exports.Bls12381g1Token = Bls12381g1Token;
|
|
74
|
-
// A point on the BLS12-381 curve G1
|
|
75
|
-
// See https://tezos.gitlab.io/michelson-reference/#type-bls12_381_g1
|
|
76
|
-
Bls12381g1Token.prim = 'bls12_381_g1';
|