@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,363 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Provider = void 0;
|
|
4
|
-
const http_utils_1 = require("@taquito/http-utils");
|
|
5
|
-
const types_1 = require("./operations/types");
|
|
6
|
-
const errors_1 = require("./operations/errors");
|
|
7
|
-
const prepare_1 = require("./contract/prepare");
|
|
8
|
-
const rpc_1 = require("@taquito/rpc");
|
|
9
|
-
const utils_1 = require("@taquito/utils");
|
|
10
|
-
class Provider {
|
|
11
|
-
parseRpcErrors(error) {
|
|
12
|
-
if (!(error instanceof http_utils_1.HttpResponseError)) {
|
|
13
|
-
return [];
|
|
14
|
-
}
|
|
15
|
-
let parsed;
|
|
16
|
-
try {
|
|
17
|
-
parsed = JSON.parse(error.body);
|
|
18
|
-
}
|
|
19
|
-
catch {
|
|
20
|
-
return [];
|
|
21
|
-
}
|
|
22
|
-
if (!Array.isArray(parsed)) {
|
|
23
|
-
return [];
|
|
24
|
-
}
|
|
25
|
-
return parsed.filter((value) => {
|
|
26
|
-
return typeof value === 'object' && value !== null;
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
toBigInt(value) {
|
|
30
|
-
if (typeof value === 'bigint') {
|
|
31
|
-
return value;
|
|
32
|
-
}
|
|
33
|
-
if (typeof value === 'number' && Number.isFinite(value) && Number.isInteger(value)) {
|
|
34
|
-
return BigInt(value);
|
|
35
|
-
}
|
|
36
|
-
if (typeof value === 'string' && /^-?\d+$/.test(value)) {
|
|
37
|
-
return BigInt(value);
|
|
38
|
-
}
|
|
39
|
-
if (typeof value === 'object' && value !== null && 'toString' in value) {
|
|
40
|
-
const normalized = value.toString();
|
|
41
|
-
if (/^-?\d+$/.test(normalized)) {
|
|
42
|
-
return BigInt(normalized);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
parseCounterInThePastAdjustments(error) {
|
|
47
|
-
return this.parseRpcErrors(error)
|
|
48
|
-
.filter((value) => {
|
|
49
|
-
const id = value.id;
|
|
50
|
-
const contract = value.contract;
|
|
51
|
-
const expected = value.expected;
|
|
52
|
-
const found = value.found;
|
|
53
|
-
return (typeof id === 'string' &&
|
|
54
|
-
id.endsWith('contract.counter_in_the_past') &&
|
|
55
|
-
typeof contract === 'string' &&
|
|
56
|
-
typeof expected === 'string' &&
|
|
57
|
-
typeof found === 'string');
|
|
58
|
-
})
|
|
59
|
-
.map((value) => ({
|
|
60
|
-
contract: value.contract,
|
|
61
|
-
expected: BigInt(value.expected),
|
|
62
|
-
found: BigInt(value.found),
|
|
63
|
-
}))
|
|
64
|
-
.filter((value) => value.expected > value.found);
|
|
65
|
-
}
|
|
66
|
-
hasGasLimitTooHighAndBlockExhausted(error) {
|
|
67
|
-
const ids = this.parseRpcErrors(error)
|
|
68
|
-
.map((value) => value.id)
|
|
69
|
-
.filter((value) => typeof value === 'string');
|
|
70
|
-
return (ids.some((id) => id.endsWith('gas_limit_too_high')) &&
|
|
71
|
-
ids.some((id) => id.endsWith('gas_exhausted.block')));
|
|
72
|
-
}
|
|
73
|
-
async patchSimulationGasLimits(op, error, gasLimitPatchableIndexes) {
|
|
74
|
-
if (!this.hasGasLimitTooHighAndBlockExhausted(error)) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
if (!Array.isArray(op.operation.contents)) {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
const constants = await this.context.readProvider.getProtocolConstants('head');
|
|
81
|
-
const hardGasLimitPerOperation = this.toBigInt(constants.hard_gas_limit_per_operation);
|
|
82
|
-
const hardGasLimitPerBlock = this.toBigInt(constants.hard_gas_limit_per_block);
|
|
83
|
-
const zero = BigInt(0);
|
|
84
|
-
if (typeof hardGasLimitPerOperation === 'undefined' ||
|
|
85
|
-
typeof hardGasLimitPerBlock === 'undefined' ||
|
|
86
|
-
hardGasLimitPerOperation <= zero ||
|
|
87
|
-
hardGasLimitPerBlock <= zero) {
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
const contents = op.operation.contents.map((content) => ({ ...content }));
|
|
91
|
-
const adjustableIndexes = gasLimitPatchableIndexes && gasLimitPatchableIndexes.length > 0
|
|
92
|
-
? gasLimitPatchableIndexes.filter((index) => index >= 0 && index < contents.length)
|
|
93
|
-
: [];
|
|
94
|
-
let explicitGasLimitTotal = zero;
|
|
95
|
-
for (const [index, content] of contents.entries()) {
|
|
96
|
-
const kind = content.kind;
|
|
97
|
-
const gasLimit = this.toBigInt(content.gas_limit);
|
|
98
|
-
if (typeof gasLimit === 'undefined') {
|
|
99
|
-
continue;
|
|
100
|
-
}
|
|
101
|
-
if (adjustableIndexes.length === 0) {
|
|
102
|
-
if (kind !== 'reveal' && gasLimit >= hardGasLimitPerOperation) {
|
|
103
|
-
adjustableIndexes.push(index);
|
|
104
|
-
continue;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
else if (adjustableIndexes.includes(index)) {
|
|
108
|
-
continue;
|
|
109
|
-
}
|
|
110
|
-
explicitGasLimitTotal += gasLimit;
|
|
111
|
-
}
|
|
112
|
-
if (adjustableIndexes.length === 0) {
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
// Mirror octez-client's `may_patch_limits` logic in injection.ml:
|
|
116
|
-
// only rebalance manager operations whose gas limit was auto-assigned for
|
|
117
|
-
// simulation, while treating reveal and user-specified gas limits as already
|
|
118
|
-
// consuming part of the block budget.
|
|
119
|
-
const remainingBlockGas = hardGasLimitPerBlock - explicitGasLimitTotal;
|
|
120
|
-
const evenlyDistributedGas = remainingBlockGas > zero ? remainingBlockGas / BigInt(adjustableIndexes.length) : zero;
|
|
121
|
-
const patchedGasLimit = evenlyDistributedGas > hardGasLimitPerOperation
|
|
122
|
-
? hardGasLimitPerOperation
|
|
123
|
-
: evenlyDistributedGas;
|
|
124
|
-
let patched = false;
|
|
125
|
-
for (const index of adjustableIndexes) {
|
|
126
|
-
const content = contents[index];
|
|
127
|
-
const currentGasLimit = this.toBigInt(content.gas_limit);
|
|
128
|
-
if (currentGasLimit === patchedGasLimit) {
|
|
129
|
-
continue;
|
|
130
|
-
}
|
|
131
|
-
contents[index].gas_limit = patchedGasLimit.toString();
|
|
132
|
-
patched = true;
|
|
133
|
-
}
|
|
134
|
-
if (!patched) {
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
return {
|
|
138
|
-
...op,
|
|
139
|
-
operation: {
|
|
140
|
-
...op.operation,
|
|
141
|
-
contents,
|
|
142
|
-
},
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
patchSimulationCounters(op, adjustments) {
|
|
146
|
-
if (adjustments.length === 0) {
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
if (!Array.isArray(op.operation.contents)) {
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
152
|
-
const contents = op.operation.contents.map((content) => ({ ...content }));
|
|
153
|
-
let patched = false;
|
|
154
|
-
for (const adjustment of adjustments) {
|
|
155
|
-
const delta = adjustment.expected - adjustment.found;
|
|
156
|
-
for (const content of contents) {
|
|
157
|
-
const source = content.source;
|
|
158
|
-
const counter = content.counter;
|
|
159
|
-
if (source !== adjustment.contract || typeof counter === 'undefined') {
|
|
160
|
-
continue;
|
|
161
|
-
}
|
|
162
|
-
const contentCounter = BigInt(String(counter));
|
|
163
|
-
if (contentCounter < adjustment.found) {
|
|
164
|
-
continue;
|
|
165
|
-
}
|
|
166
|
-
content.counter = (contentCounter + delta).toString();
|
|
167
|
-
patched = true;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
if (!patched) {
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
return {
|
|
174
|
-
...op,
|
|
175
|
-
operation: {
|
|
176
|
-
...op.operation,
|
|
177
|
-
contents,
|
|
178
|
-
},
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
get rpc() {
|
|
182
|
-
return this.context.rpc;
|
|
183
|
-
}
|
|
184
|
-
get signer() {
|
|
185
|
-
return this.context.signer;
|
|
186
|
-
}
|
|
187
|
-
constructor(context) {
|
|
188
|
-
this.context = context;
|
|
189
|
-
}
|
|
190
|
-
async forge({ opOb: { branch, contents, protocol }, counter }) {
|
|
191
|
-
const forgedBytes = await this.context.forger.forge({ branch, contents });
|
|
192
|
-
return {
|
|
193
|
-
opbytes: forgedBytes,
|
|
194
|
-
opOb: {
|
|
195
|
-
branch,
|
|
196
|
-
contents,
|
|
197
|
-
protocol,
|
|
198
|
-
},
|
|
199
|
-
counter,
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
async estimate({ fee, gasLimit, storageLimit, ...rest }, estimator) {
|
|
203
|
-
let calculatedFee = fee;
|
|
204
|
-
let calculatedGas = gasLimit;
|
|
205
|
-
let calculatedStorage = storageLimit;
|
|
206
|
-
if (calculatedFee && calculatedFee % 1 !== 0) {
|
|
207
|
-
throw new errors_1.InvalidEstimateValueError(`Fee value must not be a decimal: ${calculatedFee}`);
|
|
208
|
-
}
|
|
209
|
-
if (calculatedGas && calculatedGas % 1 !== 0) {
|
|
210
|
-
throw new errors_1.InvalidEstimateValueError(`Gas Limit value must not be a decimal: ${calculatedGas}`);
|
|
211
|
-
}
|
|
212
|
-
if (calculatedStorage && calculatedStorage % 1 !== 0) {
|
|
213
|
-
throw new errors_1.InvalidEstimateValueError(`Storage Limit value must not be a decimal: ${calculatedStorage}`);
|
|
214
|
-
}
|
|
215
|
-
if (fee === undefined || gasLimit === undefined || storageLimit === undefined) {
|
|
216
|
-
const estimation = await estimator({ fee, gasLimit, storageLimit, ...rest });
|
|
217
|
-
calculatedFee ?? (calculatedFee = estimation.suggestedFeeMutez);
|
|
218
|
-
calculatedGas ?? (calculatedGas = estimation.gasLimit);
|
|
219
|
-
calculatedStorage ?? (calculatedStorage = estimation.storageLimit);
|
|
220
|
-
}
|
|
221
|
-
return {
|
|
222
|
-
fee: calculatedFee,
|
|
223
|
-
gasLimit: calculatedGas,
|
|
224
|
-
storageLimit: calculatedStorage,
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
async getRPCOp(param) {
|
|
228
|
-
switch (param.kind) {
|
|
229
|
-
case rpc_1.OpKind.TRANSACTION:
|
|
230
|
-
return (0, prepare_1.createTransferOperation)({
|
|
231
|
-
...param,
|
|
232
|
-
});
|
|
233
|
-
case rpc_1.OpKind.ORIGINATION:
|
|
234
|
-
return (0, prepare_1.createOriginationOperation)(await this.context.parser.prepareCodeOrigination({
|
|
235
|
-
...param,
|
|
236
|
-
}));
|
|
237
|
-
case rpc_1.OpKind.DELEGATION:
|
|
238
|
-
return (0, prepare_1.createSetDelegateOperation)({
|
|
239
|
-
...param,
|
|
240
|
-
});
|
|
241
|
-
case rpc_1.OpKind.REGISTER_GLOBAL_CONSTANT:
|
|
242
|
-
return (0, prepare_1.createRegisterGlobalConstantOperation)({
|
|
243
|
-
...param,
|
|
244
|
-
});
|
|
245
|
-
case rpc_1.OpKind.INCREASE_PAID_STORAGE:
|
|
246
|
-
return (0, prepare_1.createIncreasePaidStorageOperation)({
|
|
247
|
-
...param,
|
|
248
|
-
});
|
|
249
|
-
case rpc_1.OpKind.UPDATE_CONSENSUS_KEY:
|
|
250
|
-
return (0, prepare_1.createUpdateConsensusKeyOperation)({
|
|
251
|
-
...param,
|
|
252
|
-
});
|
|
253
|
-
case rpc_1.OpKind.UPDATE_COMPANION_KEY:
|
|
254
|
-
return (0, prepare_1.createUpdateCompanionKeyOperation)({
|
|
255
|
-
...param,
|
|
256
|
-
});
|
|
257
|
-
case rpc_1.OpKind.TRANSFER_TICKET:
|
|
258
|
-
return (0, prepare_1.createTransferTicketOperation)({
|
|
259
|
-
...param,
|
|
260
|
-
});
|
|
261
|
-
case rpc_1.OpKind.SMART_ROLLUP_ADD_MESSAGES:
|
|
262
|
-
return (0, prepare_1.createSmartRollupAddMessagesOperation)({
|
|
263
|
-
...param,
|
|
264
|
-
});
|
|
265
|
-
case rpc_1.OpKind.SMART_ROLLUP_ORIGINATE:
|
|
266
|
-
return (0, prepare_1.createSmartRollupOriginateOperation)({
|
|
267
|
-
...param,
|
|
268
|
-
});
|
|
269
|
-
case rpc_1.OpKind.SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE:
|
|
270
|
-
return (0, prepare_1.createSmartRollupExecuteOutboxMessageOperation)({
|
|
271
|
-
...param,
|
|
272
|
-
});
|
|
273
|
-
default:
|
|
274
|
-
throw new utils_1.InvalidOperationKindError(param.kind);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
async simulate(op, preparedOperation) {
|
|
278
|
-
const gasLimitPatchableIndexes = preparedOperation?.simulation?.gasLimitPatchableIndexes;
|
|
279
|
-
try {
|
|
280
|
-
return {
|
|
281
|
-
opResponse: await this.rpc.simulateOperation(op),
|
|
282
|
-
op,
|
|
283
|
-
context: this.context.clone(),
|
|
284
|
-
};
|
|
285
|
-
}
|
|
286
|
-
catch (error) {
|
|
287
|
-
const adjustments = this.parseCounterInThePastAdjustments(error);
|
|
288
|
-
const patchedOp = this.patchSimulationCounters(op, adjustments);
|
|
289
|
-
if (patchedOp) {
|
|
290
|
-
try {
|
|
291
|
-
return {
|
|
292
|
-
opResponse: await this.rpc.simulateOperation(patchedOp),
|
|
293
|
-
op: patchedOp,
|
|
294
|
-
context: this.context.clone(),
|
|
295
|
-
};
|
|
296
|
-
}
|
|
297
|
-
catch (counterRetryError) {
|
|
298
|
-
const gasPatchedOp = await this.patchSimulationGasLimits(patchedOp, counterRetryError, gasLimitPatchableIndexes);
|
|
299
|
-
if (!gasPatchedOp) {
|
|
300
|
-
throw counterRetryError;
|
|
301
|
-
}
|
|
302
|
-
return {
|
|
303
|
-
opResponse: await this.rpc.simulateOperation(gasPatchedOp),
|
|
304
|
-
op: gasPatchedOp,
|
|
305
|
-
context: this.context.clone(),
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
const gasPatchedOp = await this.patchSimulationGasLimits(op, error, gasLimitPatchableIndexes);
|
|
310
|
-
if (!gasPatchedOp) {
|
|
311
|
-
throw error;
|
|
312
|
-
}
|
|
313
|
-
return {
|
|
314
|
-
opResponse: await this.rpc.simulateOperation(gasPatchedOp),
|
|
315
|
-
op: gasPatchedOp,
|
|
316
|
-
context: this.context.clone(),
|
|
317
|
-
};
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
async isRevealOpNeeded(op, pkh) {
|
|
321
|
-
return !(await this.isAccountRevealRequired(pkh)) || !this.isRevealRequiredForOpType(op)
|
|
322
|
-
? false
|
|
323
|
-
: true;
|
|
324
|
-
}
|
|
325
|
-
async isAccountRevealRequired(publicKeyHash) {
|
|
326
|
-
return !(await this.context.readProvider.isAccountRevealed(publicKeyHash, 'head'));
|
|
327
|
-
}
|
|
328
|
-
isRevealRequiredForOpType(op) {
|
|
329
|
-
let opRequireReveal = false;
|
|
330
|
-
for (const operation of op) {
|
|
331
|
-
if ((0, types_1.isOpRequireReveal)(operation)) {
|
|
332
|
-
opRequireReveal = true;
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
return opRequireReveal;
|
|
336
|
-
}
|
|
337
|
-
async signAndInject(forgedBytes) {
|
|
338
|
-
const signed = await this.signer.sign(forgedBytes.opbytes, new Uint8Array([3]));
|
|
339
|
-
forgedBytes.opbytes = signed.sbytes;
|
|
340
|
-
forgedBytes.opOb.signature = signed.prefixSig;
|
|
341
|
-
const opResponse = [];
|
|
342
|
-
const results = await this.rpc.preapplyOperations([forgedBytes.opOb]);
|
|
343
|
-
if (!Array.isArray(results)) {
|
|
344
|
-
throw new errors_1.TezosPreapplyFailureError(results);
|
|
345
|
-
}
|
|
346
|
-
for (let i = 0; i < results.length; i++) {
|
|
347
|
-
for (let j = 0; j < results[i].contents.length; j++) {
|
|
348
|
-
opResponse.push(results[i].contents[j]);
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
const errors = (0, errors_1.flattenErrors)(results);
|
|
352
|
-
if (errors.length) {
|
|
353
|
-
throw new errors_1.TezosOperationError(errors, 'Error occurred during validation simulation of operation', opResponse);
|
|
354
|
-
}
|
|
355
|
-
return {
|
|
356
|
-
hash: await this.context.injector.inject(forgedBytes.opbytes),
|
|
357
|
-
forgedBytes,
|
|
358
|
-
opResponse,
|
|
359
|
-
context: this.context.clone(),
|
|
360
|
-
};
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
exports.Provider = Provider;
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RpcReadAdapter = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Converts calls from TzReadProvider into calls to the wrapped RpcClient in a format it can understand.
|
|
6
|
-
*/
|
|
7
|
-
class RpcReadAdapter {
|
|
8
|
-
constructor(rpc) {
|
|
9
|
-
this.rpc = rpc;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* The spendable balance of a contract (in mutez), also known as liquid balance. Corresponds to tez owned by the contract that are neither staked, nor in unstaked requests, nor in frozen bonds. Identical to the 'spendable' RPC.
|
|
13
|
-
* @param address address from which we want to retrieve the spendable balance
|
|
14
|
-
* @param block from which we want to retrieve the balance
|
|
15
|
-
* @returns the balance in mutez
|
|
16
|
-
*/
|
|
17
|
-
async getBalance(address, block) {
|
|
18
|
-
return this.rpc.getBalance(address, { block: String(block) });
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* The spendable balance of a contract (in mutez), also known as liquid balance. Corresponds to tez owned by the contract that are neither staked, nor in unstaked requests, nor in frozen bonds. Identical to the 'balance' RPC.
|
|
22
|
-
* @param address address from which we want to retrieve the spendable balance
|
|
23
|
-
* @param block from which we want to retrieve the balance
|
|
24
|
-
* @returns the balance in mutez
|
|
25
|
-
*/
|
|
26
|
-
async getSpendable(address, block) {
|
|
27
|
-
return this.rpc.getSpendable(address, { block: String(block) });
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Access the delegate of a contract, if any.
|
|
31
|
-
* @param address contract address from which we want to retrieve the delegate (baker)
|
|
32
|
-
* @param block from which we want to retrieve the delegate
|
|
33
|
-
* @returns the public key hash of the delegate or null if no delegate
|
|
34
|
-
*/
|
|
35
|
-
async getDelegate(address, block) {
|
|
36
|
-
return this.rpc.getDelegate(address, { block: String(block) });
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Access the next protocol hash
|
|
40
|
-
* @param block from which we want to retrieve the next protocol hash
|
|
41
|
-
*/
|
|
42
|
-
async getNextProtocol(block) {
|
|
43
|
-
const protocols = await this.rpc.getProtocols({ block: String(block) });
|
|
44
|
-
return protocols.next_protocol;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Access protocol constants used in Taquito
|
|
48
|
-
* @param block from which we want to retrieve the constants
|
|
49
|
-
*/
|
|
50
|
-
async getProtocolConstants(block) {
|
|
51
|
-
const { time_between_blocks, minimal_block_delay, hard_gas_limit_per_operation, hard_gas_limit_per_block, hard_storage_limit_per_operation, cost_per_byte, smart_rollup_origination_size, } = await this.rpc.getConstants({ block: String(block) });
|
|
52
|
-
return {
|
|
53
|
-
time_between_blocks,
|
|
54
|
-
minimal_block_delay,
|
|
55
|
-
hard_gas_limit_per_operation,
|
|
56
|
-
hard_gas_limit_per_block,
|
|
57
|
-
hard_storage_limit_per_operation,
|
|
58
|
-
cost_per_byte,
|
|
59
|
-
smart_rollup_origination_size,
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Access the script (code and storage) of a smart contract
|
|
64
|
-
* @param contract contract address from which we want to retrieve the script
|
|
65
|
-
* @param block from which we want to retrieve the storage value
|
|
66
|
-
* @returns Note: The code must be in the JSON format and not contain global constant
|
|
67
|
-
*/
|
|
68
|
-
async getScript(contract, block) {
|
|
69
|
-
const { script } = await this.rpc.getContract(contract, { block: String(block) });
|
|
70
|
-
return script;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Access the storage value of a contract
|
|
74
|
-
* @param contract contract address from which we want to retrieve the storage
|
|
75
|
-
* @param block from which we want to retrieve the storage value
|
|
76
|
-
*/
|
|
77
|
-
async getStorage(contract, block) {
|
|
78
|
-
return this.rpc.getStorage(contract, { block: String(block) });
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Access the block hash
|
|
82
|
-
*/
|
|
83
|
-
async getBlockHash(block) {
|
|
84
|
-
const { hash } = await this.rpc.getBlockHeader({ block: String(block) });
|
|
85
|
-
return hash;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Access the block level
|
|
89
|
-
*/
|
|
90
|
-
async getBlockLevel(block) {
|
|
91
|
-
const { level } = await this.rpc.getBlockHeader({ block: String(block) });
|
|
92
|
-
return level;
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Access the counter of an address
|
|
96
|
-
* @param pkh from which we want to retrieve the counter
|
|
97
|
-
* @param block from which we want to retrieve the counter
|
|
98
|
-
*/
|
|
99
|
-
async getCounter(pkh, block) {
|
|
100
|
-
const { counter } = await this.rpc.getContract(pkh, { block: String(block) });
|
|
101
|
-
return counter || '0';
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Access the timestamp of a block
|
|
105
|
-
* @param block from which we want to retrieve the timestamp
|
|
106
|
-
* @returns date ISO format zero UTC offset ("2022-01-19T22:37:07Z")
|
|
107
|
-
*/
|
|
108
|
-
async getBlockTimestamp(block) {
|
|
109
|
-
const { timestamp } = await this.rpc.getBlockHeader({ block: String(block) });
|
|
110
|
-
return timestamp;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Access the value associated with a key in a big map.
|
|
114
|
-
* @param bigMapQuery Big Map ID and Expression hash to query (A b58check encoded Blake2b hash of the expression)
|
|
115
|
-
* @param block from which we want to retrieve the big map value
|
|
116
|
-
*/
|
|
117
|
-
async getBigMapValue(bigMapQuery, block) {
|
|
118
|
-
return this.rpc.getBigMapExpr(bigMapQuery.id, bigMapQuery.expr, {
|
|
119
|
-
block: String(block),
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Access the value associated with a sapling state ID.
|
|
124
|
-
* @param saplingStateQuery Sapling state ID query
|
|
125
|
-
* @param block from which we want to retrieve the sapling state
|
|
126
|
-
*/
|
|
127
|
-
async getSaplingDiffById(saplingStateQuery, block) {
|
|
128
|
-
return this.rpc.getSaplingDiffById(saplingStateQuery.id, { block: String(block) });
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Access the sapling state of a smart contract.
|
|
132
|
-
* @param contractAddress The address of the smart contract
|
|
133
|
-
* @param block The block you want to retrieve the sapling state from
|
|
134
|
-
*/
|
|
135
|
-
async getSaplingDiffByContract(contractAddress, block) {
|
|
136
|
-
return this.rpc.getSaplingDiffByContract(contractAddress, { block: String(block) });
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Return the list of entrypoints of the contract
|
|
140
|
-
* @param contract address of the contract we want to get the entrypoints of
|
|
141
|
-
*/
|
|
142
|
-
async getEntrypoints(contract) {
|
|
143
|
-
return this.rpc.getEntrypoints(contract);
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Access the chain id
|
|
147
|
-
*/
|
|
148
|
-
async getChainId() {
|
|
149
|
-
return this.rpc.getChainId();
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Indicate if an account is revealed
|
|
153
|
-
* @param publicKeyHash of the account
|
|
154
|
-
* @param block from which we want to know if the account is revealed
|
|
155
|
-
*/
|
|
156
|
-
async isAccountRevealed(publicKeyHash, block) {
|
|
157
|
-
const manager = await this.rpc.getManagerKey(publicKeyHash, { block: String(block) });
|
|
158
|
-
const haveManager = manager && typeof manager === 'object' ? !!manager.key : !!manager;
|
|
159
|
-
return haveManager;
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* Return all the information about a block
|
|
163
|
-
* @param block from which we want to retrieve the information
|
|
164
|
-
*/
|
|
165
|
-
async getBlock(block) {
|
|
166
|
-
return this.rpc.getBlock({ block: String(block) });
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Return a list of the ancestors of the given block which, if referred to as the branch in an operation header, are recent enough for that operation to be included in the current block.
|
|
170
|
-
* @param block from which we want to retrieve the information
|
|
171
|
-
*/
|
|
172
|
-
getLiveBlocks(block) {
|
|
173
|
-
return this.rpc.getLiveBlocks({ block: String(block) });
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Returns the cycle at which the launch of the Adaptive Issuance feature is set to happen. A result of null means that the feature is not yet set to launch.
|
|
177
|
-
* @param block from which we want to retrieve the information
|
|
178
|
-
*/
|
|
179
|
-
getAdaptiveIssuanceLaunchCycle(block) {
|
|
180
|
-
return this.rpc.getAdaptiveIssuanceLaunchCycle({ block: String(block) });
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
exports.RpcReadAdapter = RpcReadAdapter;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UnconfiguredSignerError = void 0;
|
|
4
|
-
const core_1 = require("@taquito/core");
|
|
5
|
-
/**
|
|
6
|
-
* @category Error
|
|
7
|
-
* Error that indicates no signer has been configured in the TezosToolkit instance
|
|
8
|
-
*/
|
|
9
|
-
class UnconfiguredSignerError extends core_1.TezosToolkitConfigError {
|
|
10
|
-
constructor() {
|
|
11
|
-
super();
|
|
12
|
-
this.name = 'UnconfiguredSignerError';
|
|
13
|
-
this.message =
|
|
14
|
-
'No signer has been configured. Please configure one by calling setProvider({signer}) on your TezosToolkit instance.';
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.UnconfiguredSignerError = UnconfiguredSignerError;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NoopSigner = void 0;
|
|
4
|
-
const errors_1 = require("./errors");
|
|
5
|
-
/**
|
|
6
|
-
* Default signer implementation which does nothing and produce invalid signature
|
|
7
|
-
* @throw {@link UnconfiguredSignerError}
|
|
8
|
-
*/
|
|
9
|
-
class NoopSigner {
|
|
10
|
-
async publicKey() {
|
|
11
|
-
throw new errors_1.UnconfiguredSignerError();
|
|
12
|
-
}
|
|
13
|
-
async publicKeyHash() {
|
|
14
|
-
throw new errors_1.UnconfiguredSignerError();
|
|
15
|
-
}
|
|
16
|
-
async secretKey() {
|
|
17
|
-
throw new errors_1.UnconfiguredSignerError();
|
|
18
|
-
}
|
|
19
|
-
async sign(_bytes, _watermark) {
|
|
20
|
-
throw new errors_1.UnconfiguredSignerError();
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.NoopSigner = NoopSigner;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createObservableFromSubscription = createObservableFromSubscription;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
function createObservableFromSubscription(sub) {
|
|
6
|
-
return new rxjs_1.Observable((subscriber) => {
|
|
7
|
-
sub.on('data', (data) => {
|
|
8
|
-
subscriber.next(data);
|
|
9
|
-
});
|
|
10
|
-
sub.on('error', (error) => {
|
|
11
|
-
subscriber.error(error);
|
|
12
|
-
});
|
|
13
|
-
sub.on('close', () => {
|
|
14
|
-
subscriber.complete();
|
|
15
|
-
});
|
|
16
|
-
return () => {
|
|
17
|
-
sub.close();
|
|
18
|
-
};
|
|
19
|
-
});
|
|
20
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InvalidFilterExpressionError = exports.UnsupportedEventError = void 0;
|
|
4
|
-
const core_1 = require("@taquito/core");
|
|
5
|
-
/**
|
|
6
|
-
* @category Error
|
|
7
|
-
* Error that indicates an unsupported event being passed or used
|
|
8
|
-
*/
|
|
9
|
-
class UnsupportedEventError extends core_1.ParameterValidationError {
|
|
10
|
-
constructor(type) {
|
|
11
|
-
super();
|
|
12
|
-
this.type = type;
|
|
13
|
-
this.name = 'UnsupportedEventError';
|
|
14
|
-
this.message = `Unsupported event type "${type}" expecting one of the "data", "error", or "close".`;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.UnsupportedEventError = UnsupportedEventError;
|
|
18
|
-
/**
|
|
19
|
-
* @category Error
|
|
20
|
-
* Error that indicates an invalid filter expression being passed or used
|
|
21
|
-
*/
|
|
22
|
-
class InvalidFilterExpressionError extends core_1.ParameterValidationError {
|
|
23
|
-
constructor(invalidExpression) {
|
|
24
|
-
super();
|
|
25
|
-
this.invalidExpression = invalidExpression;
|
|
26
|
-
this.name = 'InvalidFilterExpressionError';
|
|
27
|
-
this.message = `Invalid filter expression expecting the object to contain either and/or property`;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.InvalidFilterExpressionError = InvalidFilterExpressionError;
|