wowok 1.8.2 → 2.1.9
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/README.md +4 -33
- package/dist/cjs/bcs/bcs.d.ts +1973 -0
- package/dist/cjs/bcs/bcs.js +327 -0
- package/dist/cjs/bcs/effects.d.ts +579 -0
- package/dist/cjs/bcs/effects.js +231 -0
- package/dist/cjs/bcs/index.d.ts +2589 -0
- package/dist/cjs/bcs/index.js +79 -0
- package/dist/cjs/bcs/pure.d.ts +22 -0
- package/dist/cjs/bcs/pure.js +62 -0
- package/dist/cjs/bcs/type-tag-serializer.d.ts +7 -0
- package/dist/cjs/bcs/type-tag-serializer.js +124 -0
- package/dist/cjs/bcs/types.d.ts +114 -0
- package/dist/cjs/bcs/types.js +26 -0
- package/dist/cjs/client/index.d.ts +5 -0
- package/dist/cjs/client/index.js +34 -0
- package/dist/cjs/client/network.d.ts +5 -0
- package/dist/cjs/client/network.js +43 -0
- package/dist/cjs/cryptography/index.d.ts +7 -0
- package/dist/cjs/cryptography/index.js +46 -0
- package/dist/cjs/cryptography/intent.d.ts +6 -0
- package/dist/cjs/cryptography/intent.js +34 -0
- package/dist/cjs/cryptography/keypair.d.ts +73 -0
- package/dist/cjs/cryptography/keypair.js +125 -0
- package/dist/cjs/cryptography/mnemonics.d.ts +27 -0
- package/dist/cjs/cryptography/mnemonics.js +50 -0
- package/dist/cjs/cryptography/publickey.d.ts +67 -0
- package/dist/cjs/cryptography/publickey.js +142 -0
- package/dist/cjs/cryptography/signature-scheme.d.ts +24 -0
- package/dist/cjs/cryptography/signature-scheme.js +47 -0
- package/dist/cjs/cryptography/signature.d.ts +62 -0
- package/dist/cjs/cryptography/signature.js +71 -0
- package/dist/cjs/experimental/cache.d.ts +12 -0
- package/dist/cjs/experimental/client.d.ts +12 -0
- package/dist/cjs/experimental/core.d.ts +33 -0
- package/dist/cjs/experimental/errors.d.ts +8 -0
- package/dist/cjs/experimental/index.d.ts +7 -0
- package/dist/cjs/experimental/persistent-storage.d.ts +134 -0
- package/dist/cjs/experimental/persistent-storage.test.d.ts +5 -0
- package/dist/cjs/experimental/transports/utils.d.ts +3 -0
- package/dist/cjs/experimental/types.d.ts +367 -0
- package/dist/cjs/faucet/faucet.d.ts +66 -0
- package/dist/cjs/faucet/faucet.js +138 -0
- package/dist/cjs/faucet/index.d.ts +1 -0
- package/dist/cjs/faucet/index.js +29 -0
- package/dist/cjs/graphql/client.js +98 -0
- package/dist/cjs/graphql/core.js +506 -0
- package/dist/cjs/graphql/generated/2024.1/tada-env.js +13141 -0
- package/dist/cjs/graphql/generated/2024.1/tsconfig.tada.js +11 -0
- package/dist/cjs/graphql/generated/2024.4/tada-env.js +13287 -0
- package/dist/cjs/graphql/generated/2024.4/tsconfig.tada.js +11 -0
- package/dist/cjs/graphql/generated/latest/tada-env.js +12925 -0
- package/dist/cjs/graphql/generated/latest/tsconfig.tada.js +11 -0
- package/dist/cjs/graphql/generated/queries.js +807 -0
- package/dist/cjs/graphql/index.js +25 -0
- package/dist/cjs/graphql/schemas/2024.1/index.js +28 -0
- package/dist/cjs/graphql/schemas/2024.4/index.js +28 -0
- package/dist/cjs/graphql/schemas/latest/index.js +28 -0
- package/dist/cjs/graphql/types.js +16 -0
- package/dist/cjs/grpc/client.d.ts +32 -0
- package/dist/cjs/grpc/client.js +64 -0
- package/dist/cjs/grpc/core.d.ts +28 -0
- package/dist/cjs/grpc/core.js +645 -0
- package/dist/cjs/grpc/index.d.ts +4 -0
- package/dist/cjs/grpc/index.js +26 -0
- package/dist/cjs/grpc/proto/google/protobuf/any.d.ts +173 -0
- package/dist/cjs/grpc/proto/google/protobuf/any.js +138 -0
- package/dist/cjs/grpc/proto/google/protobuf/duration.d.ts +104 -0
- package/dist/cjs/grpc/proto/google/protobuf/duration.js +94 -0
- package/dist/cjs/grpc/proto/google/protobuf/empty.d.ts +25 -0
- package/dist/cjs/grpc/proto/google/protobuf/empty.js +30 -0
- package/dist/cjs/grpc/proto/google/protobuf/field_mask.d.ts +231 -0
- package/dist/cjs/grpc/proto/google/protobuf/field_mask.js +77 -0
- package/dist/cjs/grpc/proto/google/protobuf/struct.d.ts +169 -0
- package/dist/cjs/grpc/proto/google/protobuf/struct.js +224 -0
- package/dist/cjs/grpc/proto/google/protobuf/timestamp.d.ts +145 -0
- package/dist/cjs/grpc/proto/google/protobuf/timestamp.js +134 -0
- package/dist/cjs/grpc/proto/google/rpc/error_details.d.ts +525 -0
- package/dist/cjs/grpc/proto/google/rpc/error_details.js +317 -0
- package/dist/cjs/grpc/proto/google/rpc/status.d.ts +46 -0
- package/dist/cjs/grpc/proto/google/rpc/status.js +52 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/argument.d.ts +66 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/argument.js +70 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/balance_change.d.ts +34 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/balance_change.js +52 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/bcs.d.ts +30 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/bcs.js +45 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint.d.ts +68 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint.js +77 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_contents.d.ts +74 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_contents.js +84 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_summary.d.ts +195 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_summary.js +170 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/effects.d.ts +338 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/effects.js +300 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/epoch.d.ts +62 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/epoch.js +87 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/error_reason.d.ts +17 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/error_reason.js +29 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/event.d.ts +88 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/event.js +86 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/executed_transaction.d.ts +80 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/executed_transaction.js +87 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/execution_status.d.ts +843 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/execution_status.js +519 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/gas_cost_summary.d.ts +41 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/gas_cost_summary.js +63 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/input.d.ts +98 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/input.js +85 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/jwk.d.ts +70 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/jwk.js +81 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.client.d.ts +95 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.client.js +122 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.d.ts +420 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.js +368 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/move_package.d.ts +579 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/move_package.js +485 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.client.d.ts +61 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.client.js +81 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.d.ts +229 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.js +241 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.client.d.ts +41 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.client.js +55 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.d.ts +144 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.js +141 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/object.d.ts +127 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/object.js +114 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/object_reference.d.ts +34 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/object_reference.js +53 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/owner.d.ts +61 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/owner.js +63 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/protocol_config.d.ts +30 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/protocol_config.js +61 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/signature.d.ts +630 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/signature.js +541 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/signature_scheme.d.ts +40 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/signature_scheme.js +33 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.client.d.ts +35 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.client.js +50 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.d.ts +79 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.js +90 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.client.d.ts +71 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.client.js +88 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.d.ts +690 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.js +546 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.client.d.ts +55 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.client.js +54 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.d.ts +57 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.js +65 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/system_state.d.ts +684 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/system_state.js +740 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/transaction.d.ts +1321 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/transaction.js +1005 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.client.d.ts +41 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.client.js +49 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.d.ts +184 -0
- package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.js +177 -0
- package/dist/cjs/index.d.ts +25 -0
- package/dist/cjs/index.js +93 -0
- package/dist/cjs/jsonRpc/client.d.ts +261 -0
- package/dist/cjs/jsonRpc/client.js +747 -0
- package/dist/cjs/jsonRpc/core.d.ts +87 -0
- package/dist/cjs/jsonRpc/core.js +638 -0
- package/dist/cjs/jsonRpc/errors.d.ts +12 -0
- package/dist/cjs/jsonRpc/errors.js +65 -0
- package/dist/cjs/jsonRpc/http-transport.d.ts +42 -0
- package/dist/cjs/jsonRpc/http-transport.js +121 -0
- package/dist/cjs/jsonRpc/index.d.ts +4 -0
- package/dist/cjs/jsonRpc/index.js +31 -0
- package/dist/cjs/jsonRpc/json-rpc-resolver.d.ts +4 -0
- package/dist/cjs/jsonRpc/json-rpc-resolver.js +321 -0
- package/dist/cjs/jsonRpc/rpc-websocket-client.d.ts +43 -0
- package/dist/cjs/jsonRpc/rpc-websocket-client.js +220 -0
- package/dist/cjs/jsonRpc/types/chain.d.ts +99 -0
- package/dist/cjs/jsonRpc/types/chain.js +16 -0
- package/dist/cjs/jsonRpc/types/changes.d.ts +19 -0
- package/dist/cjs/jsonRpc/types/changes.js +16 -0
- package/dist/cjs/jsonRpc/types/coins.d.ts +6 -0
- package/dist/cjs/jsonRpc/types/coins.js +16 -0
- package/dist/cjs/jsonRpc/types/common.d.ts +2 -0
- package/dist/cjs/jsonRpc/types/common.js +16 -0
- package/dist/cjs/jsonRpc/types/generated.d.ts +1492 -0
- package/dist/cjs/jsonRpc/types/generated.js +16 -0
- package/dist/cjs/jsonRpc/types/index.d.ts +6 -0
- package/dist/cjs/jsonRpc/types/index.js +16 -0
- package/dist/cjs/jsonRpc/types/params.d.ts +656 -0
- package/dist/cjs/jsonRpc/types/params.js +16 -0
- package/dist/cjs/keypairs/ed25519/ed25519-hd-key.d.ts +8 -0
- package/dist/cjs/keypairs/ed25519/ed25519-hd-key.js +82 -0
- package/dist/cjs/keypairs/ed25519/index.d.ts +2 -0
- package/dist/cjs/keypairs/ed25519/index.js +27 -0
- package/dist/cjs/keypairs/ed25519/keypair.d.ts +74 -0
- package/dist/cjs/keypairs/ed25519/keypair.js +169 -0
- package/dist/cjs/keypairs/ed25519/publickey.d.ts +30 -0
- package/dist/cjs/keypairs/ed25519/publickey.js +90 -0
- package/dist/cjs/keypairs/index.d.ts +4 -0
- package/dist/cjs/keypairs/index.js +21 -0
- package/dist/cjs/keypairs/passkey/index.d.ts +3 -0
- package/dist/cjs/keypairs/passkey/index.js +28 -0
- package/dist/cjs/keypairs/passkey/keypair.d.ts +113 -0
- package/dist/cjs/keypairs/passkey/keypair.js +268 -0
- package/dist/cjs/keypairs/passkey/publickey.d.ts +72 -0
- package/dist/cjs/keypairs/passkey/publickey.js +175 -0
- package/dist/cjs/keypairs/passkey/types.d.ts +12 -0
- package/dist/cjs/keypairs/passkey/types.js +16 -0
- package/dist/cjs/keypairs/secp256k1/index.d.ts +2 -0
- package/dist/cjs/keypairs/secp256k1/index.js +27 -0
- package/dist/cjs/keypairs/secp256k1/keypair.d.ts +73 -0
- package/dist/cjs/keypairs/secp256k1/keypair.js +159 -0
- package/dist/cjs/keypairs/secp256k1/publickey.d.ts +30 -0
- package/dist/cjs/keypairs/secp256k1/publickey.js +95 -0
- package/dist/cjs/keypairs/secp256r1/index.d.ts +2 -0
- package/dist/cjs/keypairs/secp256r1/index.js +27 -0
- package/dist/cjs/keypairs/secp256r1/keypair.d.ts +73 -0
- package/dist/cjs/keypairs/secp256r1/keypair.js +155 -0
- package/dist/cjs/keypairs/secp256r1/publickey.d.ts +30 -0
- package/dist/cjs/keypairs/secp256r1/publickey.js +96 -0
- package/dist/cjs/multisig/index.d.ts +2 -0
- package/dist/cjs/multisig/index.js +27 -0
- package/dist/cjs/multisig/publickey.d.ts +79 -0
- package/dist/cjs/multisig/publickey.js +296 -0
- package/dist/cjs/multisig/signer.d.ts +20 -0
- package/dist/cjs/multisig/signer.js +114 -0
- package/dist/cjs/package.json +5 -0
- package/dist/cjs/transactions/Arguments.d.ts +57 -0
- package/dist/cjs/transactions/Arguments.js +36 -0
- package/dist/cjs/transactions/Commands.d.ts +57 -0
- package/dist/cjs/transactions/Commands.js +143 -0
- package/dist/cjs/transactions/Inputs.d.ts +22 -0
- package/dist/cjs/transactions/Inputs.js +87 -0
- package/dist/cjs/transactions/ObjectCache.d.ts +83 -0
- package/dist/cjs/transactions/ObjectCache.js +251 -0
- package/dist/cjs/transactions/Transaction.d.ts +710 -0
- package/dist/cjs/transactions/Transaction.js +742 -0
- package/dist/cjs/transactions/TransactionData.d.ts +73 -0
- package/dist/cjs/transactions/TransactionData.js +472 -0
- package/dist/cjs/transactions/__tests__/Transaction.test.d.ts +1 -0
- package/dist/cjs/transactions/__tests__/bcs.test.d.ts +1 -0
- package/dist/cjs/transactions/data/internal.d.ts +1010 -0
- package/dist/cjs/transactions/data/internal.js +230 -0
- package/dist/cjs/transactions/data/v1.d.ts +312 -0
- package/dist/cjs/transactions/data/v1.js +538 -0
- package/dist/cjs/transactions/data/v2.d.ts +153 -0
- package/dist/cjs/transactions/data/v2.js +124 -0
- package/dist/cjs/transactions/executor/caching.d.ts +31 -0
- package/dist/cjs/transactions/executor/caching.js +118 -0
- package/dist/cjs/transactions/executor/parallel.d.ts +37 -0
- package/dist/cjs/transactions/executor/parallel.js +395 -0
- package/dist/cjs/transactions/executor/queue.d.ts +11 -0
- package/dist/cjs/transactions/executor/queue.js +87 -0
- package/dist/cjs/transactions/executor/serial.d.ts +31 -0
- package/dist/cjs/transactions/executor/serial.js +136 -0
- package/dist/cjs/transactions/hash.d.ts +7 -0
- package/dist/cjs/transactions/hash.js +31 -0
- package/dist/cjs/transactions/index.d.ts +21 -0
- package/dist/cjs/transactions/index.js +50 -0
- package/dist/cjs/transactions/intents/CoinWithBalance.d.ts +9 -0
- package/dist/cjs/transactions/intents/CoinWithBalance.js +206 -0
- package/dist/cjs/transactions/object.d.ts +24 -0
- package/dist/cjs/transactions/object.js +116 -0
- package/dist/cjs/transactions/plugins/NamedPackagesPlugin.d.ts +31 -0
- package/dist/cjs/transactions/plugins/NamedPackagesPlugin.js +37 -0
- package/dist/cjs/transactions/pure.d.ts +20 -0
- package/dist/cjs/transactions/pure.js +64 -0
- package/dist/cjs/transactions/resolve.d.ts +13 -0
- package/dist/cjs/transactions/resolve.js +103 -0
- package/dist/cjs/transactions/serializer.d.ts +7 -0
- package/dist/cjs/transactions/serializer.js +189 -0
- package/dist/cjs/transactions/utils.d.ts +10 -0
- package/dist/cjs/transactions/utils.js +143 -0
- package/dist/cjs/utils/constants.d.ts +17 -0
- package/dist/cjs/utils/constants.js +57 -0
- package/dist/cjs/utils/derived-objects.d.ts +5 -0
- package/dist/cjs/utils/derived-objects.js +33 -0
- package/dist/cjs/utils/dynamic-fields.d.ts +2 -0
- package/dist/cjs/utils/dynamic-fields.js +40 -0
- package/dist/cjs/utils/format.d.ts +2 -0
- package/dist/cjs/utils/format.js +35 -0
- package/dist/cjs/utils/index.d.ts +8 -0
- package/dist/cjs/utils/index.js +65 -0
- package/dist/cjs/utils/move-registry.d.ts +6 -0
- package/dist/cjs/utils/move-registry.js +44 -0
- package/dist/cjs/utils/sui-types.d.ts +26 -0
- package/dist/cjs/utils/sui-types.js +90 -0
- package/dist/cjs/utils/suins.d.ts +2 -0
- package/dist/cjs/utils/suins.js +56 -0
- package/dist/cjs/verify/index.d.ts +1 -0
- package/dist/cjs/verify/index.js +28 -0
- package/dist/cjs/verify/verify.d.ts +16 -0
- package/dist/cjs/verify/verify.js +125 -0
- package/dist/cjs/version.d.ts +2 -0
- package/dist/cjs/version.js +26 -0
- package/dist/cjs/w/call/allocation.d.ts +35 -0
- package/dist/cjs/w/call/allocation.js +439 -0
- package/dist/cjs/w/call/arb.d.ts +17 -0
- package/dist/cjs/w/call/arb.js +149 -0
- package/dist/cjs/w/call/arbitration.d.ts +106 -0
- package/dist/cjs/w/call/arbitration.js +1623 -0
- package/dist/cjs/w/call/base.d.ts +42 -0
- package/dist/cjs/w/call/base.js +363 -0
- package/dist/cjs/w/call/contact.d.ts +45 -0
- package/dist/cjs/w/call/contact.js +479 -0
- package/dist/cjs/w/call/demand.d.ts +79 -0
- package/dist/cjs/w/call/demand.js +872 -0
- package/dist/cjs/w/call/entity.d.ts +33 -0
- package/dist/cjs/w/call/entity.js +230 -0
- package/dist/cjs/w/call/guard-ins.d.ts +31 -0
- package/dist/cjs/w/call/guard-ins.js +4391 -0
- package/dist/cjs/w/call/guard.d.ts +254 -0
- package/dist/cjs/w/call/guard.js +1210 -0
- package/dist/cjs/w/call/index.d.ts +37 -0
- package/dist/cjs/w/call/index.js +71 -0
- package/dist/cjs/w/call/machine.d.ts +124 -0
- package/dist/cjs/w/call/machine.js +1486 -0
- package/dist/cjs/w/call/order.d.ts +73 -0
- package/dist/cjs/w/call/order.js +485 -0
- package/dist/cjs/w/call/passport.d.ts +24 -0
- package/dist/cjs/w/call/passport.js +281 -0
- package/dist/cjs/w/call/payment.d.ts +27 -0
- package/dist/cjs/w/call/payment.js +241 -0
- package/dist/cjs/w/call/permission.d.ts +222 -0
- package/dist/cjs/w/call/permission.js +1368 -0
- package/dist/cjs/w/call/personal.d.ts +51 -0
- package/dist/cjs/w/call/personal.js +184 -0
- package/dist/cjs/w/call/progress.d.ts +94 -0
- package/dist/cjs/w/call/progress.js +833 -0
- package/dist/cjs/w/call/proof.d.ts +27 -0
- package/dist/cjs/w/call/proof.js +124 -0
- package/dist/cjs/w/call/repository.d.ts +97 -0
- package/dist/cjs/w/call/repository.js +1324 -0
- package/dist/cjs/w/call/resource.d.ts +27 -0
- package/dist/cjs/w/call/resource.js +149 -0
- package/dist/cjs/w/call/reward.d.ts +52 -0
- package/dist/cjs/w/call/reward.js +879 -0
- package/dist/cjs/w/call/service.d.ts +184 -0
- package/dist/cjs/w/call/service.js +2468 -0
- package/dist/cjs/w/call/treasury.d.ts +77 -0
- package/dist/cjs/w/call/treasury.js +1192 -0
- package/dist/cjs/w/call/util.d.ts +12 -0
- package/dist/cjs/w/call/util.js +661 -0
- package/dist/cjs/w/common.d.ts +359 -0
- package/dist/cjs/w/common.js +625 -0
- package/dist/cjs/w/exception.d.ts +82 -0
- package/dist/cjs/w/exception.js +604 -0
- package/dist/cjs/w/index.d.ts +8 -0
- package/dist/cjs/w/index.js +25 -0
- package/dist/cjs/w/local/.eslintrc.js +15 -0
- package/dist/cjs/w/local/account.d.ts +134 -0
- package/dist/cjs/w/local/account.js +770 -0
- package/dist/cjs/w/local/cache.d.ts +35 -0
- package/dist/cjs/w/local/cache.js +181 -0
- package/dist/cjs/w/local/config.d.ts +15 -0
- package/dist/cjs/w/local/config.js +83 -0
- package/dist/cjs/w/local/index.d.ts +193 -0
- package/dist/cjs/w/local/index.js +322 -0
- package/dist/cjs/w/local/local.d.ts +93 -0
- package/dist/cjs/w/local/local.js +673 -0
- package/dist/cjs/w/local/storage.d.ts +61 -0
- package/dist/cjs/w/local/storage.js +219 -0
- package/dist/cjs/w/local/token.d.ts +22 -0
- package/dist/cjs/w/local/token.js +182 -0
- package/dist/cjs/w/local/util.d.ts +5 -0
- package/dist/cjs/w/local/util.js +57 -0
- package/dist/cjs/w/local/wip.d.ts +218 -0
- package/dist/cjs/w/local/wip.js +911 -0
- package/dist/cjs/w/messenger/.eslintrc.js +15 -0
- package/dist/cjs/w/messenger/crypto.d.ts +269 -0
- package/dist/cjs/w/messenger/crypto.js +448 -0
- package/dist/cjs/w/messenger/index.d.ts +23 -0
- package/dist/cjs/w/messenger/index.js +37 -0
- package/dist/cjs/w/messenger/messenger-api.d.ts +225 -0
- package/dist/cjs/w/messenger/messenger-api.js +1247 -0
- package/dist/cjs/w/messenger/messenger-manager.d.ts +80 -0
- package/dist/cjs/w/messenger/messenger-manager.js +1143 -0
- package/dist/cjs/w/messenger/messenger.d.ts +231 -0
- package/dist/cjs/w/messenger/messenger.js +1512 -0
- package/dist/cjs/w/messenger/server.d.ts +134 -0
- package/dist/cjs/w/messenger/server.js +535 -0
- package/dist/cjs/w/messenger/session.d.ts +78 -0
- package/dist/cjs/w/messenger/session.js +418 -0
- package/dist/cjs/w/messenger/storage.d.ts +192 -0
- package/dist/cjs/w/messenger/storage.js +964 -0
- package/dist/cjs/w/messenger/types.d.ts +705 -0
- package/dist/cjs/w/messenger/types.js +107 -0
- package/dist/cjs/w/messenger/utils.d.ts +15 -0
- package/dist/cjs/w/messenger/utils.js +37 -0
- package/dist/cjs/w/query/bult-in.d.ts +73 -0
- package/dist/cjs/w/query/bult-in.js +121 -0
- package/dist/cjs/w/query/event.d.ts +82 -0
- package/dist/cjs/w/query/event.js +157 -0
- package/dist/cjs/w/query/index.d.ts +5 -0
- package/dist/cjs/w/query/index.js +22 -0
- package/dist/cjs/w/query/object.d.ts +658 -0
- package/dist/cjs/w/query/object.js +1671 -0
- package/dist/cjs/w/query/received.d.ts +34 -0
- package/dist/cjs/w/query/received.js +93 -0
- package/dist/cjs/w/query/util.d.ts +5 -0
- package/dist/cjs/w/query/util.js +82 -0
- package/dist/cjs/w/util.d.ts +19 -0
- package/dist/cjs/w/util.js +715 -0
- package/dist/cjs/zklogin/address.js +93 -0
- package/dist/cjs/zklogin/bcs.js +41 -0
- package/dist/cjs/zklogin/index.js +45 -0
- package/dist/cjs/zklogin/jwt-decode.js +88 -0
- package/dist/cjs/zklogin/jwt-utils.js +128 -0
- package/dist/cjs/zklogin/nonce.js +60 -0
- package/dist/cjs/zklogin/poseidon.js +64 -0
- package/dist/cjs/zklogin/publickey.js +281 -0
- package/dist/cjs/zklogin/signature.js +57 -0
- package/dist/cjs/zklogin/utils.js +98 -0
- package/dist/esm/bcs/bcs.d.ts +1973 -0
- package/dist/esm/bcs/bcs.js +319 -0
- package/dist/esm/bcs/effects.d.ts +579 -0
- package/dist/esm/bcs/effects.js +211 -0
- package/dist/esm/bcs/index.d.ts +2589 -0
- package/dist/esm/bcs/index.js +98 -0
- package/dist/esm/bcs/pure.d.ts +22 -0
- package/dist/esm/bcs/pure.js +42 -0
- package/dist/esm/bcs/type-tag-serializer.d.ts +7 -0
- package/dist/esm/bcs/type-tag-serializer.js +104 -0
- package/dist/esm/bcs/types.d.ts +114 -0
- package/dist/esm/bcs/types.js +6 -0
- package/dist/esm/client/index.d.ts +5 -0
- package/dist/esm/client/index.js +23 -0
- package/dist/esm/client/network.d.ts +5 -0
- package/dist/esm/client/network.js +23 -0
- package/dist/esm/cryptography/index.d.ts +7 -0
- package/dist/esm/cryptography/index.js +46 -0
- package/dist/esm/cryptography/intent.d.ts +6 -0
- package/dist/esm/cryptography/intent.js +14 -0
- package/dist/esm/cryptography/keypair.d.ts +73 -0
- package/dist/esm/cryptography/keypair.js +108 -0
- package/dist/esm/cryptography/mnemonics.d.ts +27 -0
- package/dist/esm/cryptography/mnemonics.js +30 -0
- package/dist/esm/cryptography/publickey.d.ts +67 -0
- package/dist/esm/cryptography/publickey.js +125 -0
- package/dist/esm/cryptography/signature-scheme.d.ts +24 -0
- package/dist/esm/cryptography/signature-scheme.js +27 -0
- package/dist/esm/cryptography/signature.d.ts +62 -0
- package/dist/esm/cryptography/signature.js +54 -0
- package/dist/esm/experimental/cache.d.ts +12 -0
- package/dist/esm/experimental/client.d.ts +12 -0
- package/dist/esm/experimental/core.d.ts +33 -0
- package/dist/esm/experimental/errors.d.ts +8 -0
- package/dist/esm/experimental/index.d.ts +7 -0
- package/dist/esm/experimental/persistent-storage.d.ts +134 -0
- package/dist/esm/experimental/persistent-storage.test.d.ts +5 -0
- package/dist/esm/experimental/transports/utils.d.ts +3 -0
- package/dist/esm/experimental/types.d.ts +367 -0
- package/dist/esm/faucet/faucet.d.ts +66 -0
- package/dist/esm/faucet/faucet.js +118 -0
- package/dist/esm/faucet/index.d.ts +1 -0
- package/dist/esm/faucet/index.js +16 -0
- package/dist/esm/graphql/client.js +79 -0
- package/dist/esm/graphql/core.js +505 -0
- package/dist/esm/graphql/generated/2024.1/tada-env.js +13121 -0
- package/dist/esm/graphql/generated/2024.1/tsconfig.tada.js +16 -0
- package/dist/esm/graphql/generated/2024.4/tada-env.js +13267 -0
- package/dist/esm/graphql/generated/2024.4/tsconfig.tada.js +16 -0
- package/dist/esm/graphql/generated/latest/tada-env.js +12905 -0
- package/dist/esm/graphql/generated/latest/tsconfig.tada.js +16 -0
- package/dist/esm/graphql/generated/queries.js +788 -0
- package/dist/esm/graphql/index.js +8 -0
- package/dist/esm/graphql/schemas/2024.1/index.js +8 -0
- package/dist/esm/graphql/schemas/2024.4/index.js +8 -0
- package/dist/esm/graphql/schemas/latest/index.js +8 -0
- package/dist/esm/graphql/types.js +0 -0
- package/dist/esm/grpc/client.d.ts +32 -0
- package/dist/esm/grpc/client.js +45 -0
- package/dist/esm/grpc/core.d.ts +28 -0
- package/dist/esm/grpc/core.js +634 -0
- package/dist/esm/grpc/index.d.ts +4 -0
- package/dist/esm/grpc/index.js +6 -0
- package/dist/esm/grpc/proto/google/protobuf/any.d.ts +173 -0
- package/dist/esm/grpc/proto/google/protobuf/any.js +118 -0
- package/dist/esm/grpc/proto/google/protobuf/duration.d.ts +104 -0
- package/dist/esm/grpc/proto/google/protobuf/duration.js +74 -0
- package/dist/esm/grpc/proto/google/protobuf/empty.d.ts +25 -0
- package/dist/esm/grpc/proto/google/protobuf/empty.js +10 -0
- package/dist/esm/grpc/proto/google/protobuf/field_mask.d.ts +231 -0
- package/dist/esm/grpc/proto/google/protobuf/field_mask.js +57 -0
- package/dist/esm/grpc/proto/google/protobuf/struct.d.ts +169 -0
- package/dist/esm/grpc/proto/google/protobuf/struct.js +204 -0
- package/dist/esm/grpc/proto/google/protobuf/timestamp.d.ts +145 -0
- package/dist/esm/grpc/proto/google/protobuf/timestamp.js +114 -0
- package/dist/esm/grpc/proto/google/rpc/error_details.d.ts +525 -0
- package/dist/esm/grpc/proto/google/rpc/error_details.js +297 -0
- package/dist/esm/grpc/proto/google/rpc/status.d.ts +46 -0
- package/dist/esm/grpc/proto/google/rpc/status.js +32 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/argument.d.ts +66 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/argument.js +50 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/balance_change.d.ts +34 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/balance_change.js +32 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/bcs.d.ts +30 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/bcs.js +25 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint.d.ts +68 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint.js +57 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_contents.d.ts +74 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_contents.js +64 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_summary.d.ts +195 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_summary.js +150 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/effects.d.ts +338 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/effects.js +280 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/epoch.d.ts +62 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/epoch.js +67 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/error_reason.d.ts +17 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/error_reason.js +9 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/event.d.ts +88 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/event.js +66 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/executed_transaction.d.ts +80 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/executed_transaction.js +67 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/execution_status.d.ts +843 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/execution_status.js +499 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/gas_cost_summary.d.ts +41 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/gas_cost_summary.js +43 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/input.d.ts +98 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/input.js +65 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/jwk.d.ts +70 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/jwk.js +61 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.client.d.ts +95 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.client.js +103 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.d.ts +420 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.js +348 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/move_package.d.ts +579 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/move_package.js +465 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.client.d.ts +61 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.client.js +62 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.d.ts +229 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.js +221 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/name_service.client.d.ts +41 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/name_service.client.js +36 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/name_service.d.ts +144 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/name_service.js +121 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/object.d.ts +127 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/object.js +94 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/object_reference.d.ts +34 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/object_reference.js +33 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/owner.d.ts +61 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/owner.js +43 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/protocol_config.d.ts +30 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/protocol_config.js +41 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/signature.d.ts +630 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/signature.js +521 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/signature_scheme.d.ts +40 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/signature_scheme.js +13 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.client.d.ts +35 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.client.js +31 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.d.ts +79 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.js +70 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/state_service.client.d.ts +71 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/state_service.client.js +69 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/state_service.d.ts +690 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/state_service.js +526 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.client.d.ts +55 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.client.js +35 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.d.ts +57 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.js +45 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/system_state.d.ts +684 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/system_state.js +720 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/transaction.d.ts +1321 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/transaction.js +985 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.client.d.ts +41 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.client.js +30 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.d.ts +184 -0
- package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.js +157 -0
- package/dist/esm/index.d.ts +25 -0
- package/dist/esm/index.js +119 -0
- package/dist/esm/jsonRpc/client.d.ts +261 -0
- package/dist/esm/jsonRpc/client.js +734 -0
- package/dist/esm/jsonRpc/core.d.ts +87 -0
- package/dist/esm/jsonRpc/core.js +621 -0
- package/dist/esm/jsonRpc/errors.d.ts +12 -0
- package/dist/esm/jsonRpc/errors.js +46 -0
- package/dist/esm/jsonRpc/http-transport.d.ts +42 -0
- package/dist/esm/jsonRpc/http-transport.js +101 -0
- package/dist/esm/jsonRpc/index.d.ts +4 -0
- package/dist/esm/jsonRpc/index.js +20 -0
- package/dist/esm/jsonRpc/json-rpc-resolver.d.ts +4 -0
- package/dist/esm/jsonRpc/json-rpc-resolver.js +309 -0
- package/dist/esm/jsonRpc/rpc-websocket-client.d.ts +43 -0
- package/dist/esm/jsonRpc/rpc-websocket-client.js +201 -0
- package/dist/esm/jsonRpc/types/chain.d.ts +99 -0
- package/dist/esm/jsonRpc/types/chain.js +0 -0
- package/dist/esm/jsonRpc/types/changes.d.ts +19 -0
- package/dist/esm/jsonRpc/types/changes.js +0 -0
- package/dist/esm/jsonRpc/types/coins.d.ts +6 -0
- package/dist/esm/jsonRpc/types/coins.js +0 -0
- package/dist/esm/jsonRpc/types/common.d.ts +2 -0
- package/dist/esm/jsonRpc/types/common.js +0 -0
- package/dist/esm/jsonRpc/types/generated.d.ts +1492 -0
- package/dist/esm/jsonRpc/types/generated.js +0 -0
- package/dist/esm/jsonRpc/types/index.d.ts +6 -0
- package/dist/esm/jsonRpc/types/index.js +0 -0
- package/dist/esm/jsonRpc/types/params.d.ts +656 -0
- package/dist/esm/jsonRpc/types/params.js +0 -0
- package/dist/esm/keypairs/ed25519/ed25519-hd-key.d.ts +8 -0
- package/dist/esm/keypairs/ed25519/ed25519-hd-key.js +62 -0
- package/dist/esm/keypairs/ed25519/index.d.ts +2 -0
- package/dist/esm/keypairs/ed25519/index.js +10 -0
- package/dist/esm/keypairs/ed25519/keypair.d.ts +74 -0
- package/dist/esm/keypairs/ed25519/keypair.js +158 -0
- package/dist/esm/keypairs/ed25519/publickey.d.ts +30 -0
- package/dist/esm/keypairs/ed25519/publickey.js +75 -0
- package/dist/esm/keypairs/index.d.ts +4 -0
- package/dist/esm/keypairs/index.js +4 -0
- package/dist/esm/keypairs/passkey/index.d.ts +3 -0
- package/dist/esm/keypairs/passkey/index.js +12 -0
- package/dist/esm/keypairs/passkey/keypair.d.ts +113 -0
- package/dist/esm/keypairs/passkey/keypair.js +258 -0
- package/dist/esm/keypairs/passkey/publickey.d.ts +72 -0
- package/dist/esm/keypairs/passkey/publickey.js +156 -0
- package/dist/esm/keypairs/passkey/types.d.ts +12 -0
- package/dist/esm/keypairs/passkey/types.js +0 -0
- package/dist/esm/keypairs/secp256k1/index.d.ts +2 -0
- package/dist/esm/keypairs/secp256k1/index.js +10 -0
- package/dist/esm/keypairs/secp256k1/keypair.d.ts +73 -0
- package/dist/esm/keypairs/secp256k1/keypair.js +147 -0
- package/dist/esm/keypairs/secp256k1/publickey.d.ts +30 -0
- package/dist/esm/keypairs/secp256k1/publickey.js +80 -0
- package/dist/esm/keypairs/secp256r1/index.d.ts +2 -0
- package/dist/esm/keypairs/secp256r1/index.js +10 -0
- package/dist/esm/keypairs/secp256r1/keypair.d.ts +73 -0
- package/dist/esm/keypairs/secp256r1/keypair.js +143 -0
- package/dist/esm/keypairs/secp256r1/publickey.d.ts +30 -0
- package/dist/esm/keypairs/secp256r1/publickey.js +77 -0
- package/dist/esm/multisig/index.d.ts +2 -0
- package/dist/esm/multisig/index.js +10 -0
- package/dist/esm/multisig/publickey.d.ts +79 -0
- package/dist/esm/multisig/publickey.js +280 -0
- package/dist/esm/multisig/signer.d.ts +20 -0
- package/dist/esm/multisig/signer.js +94 -0
- package/dist/esm/package.json +5 -0
- package/dist/esm/transactions/Arguments.d.ts +57 -0
- package/dist/esm/transactions/Arguments.js +16 -0
- package/dist/esm/transactions/Commands.d.ts +57 -0
- package/dist/esm/transactions/Commands.js +123 -0
- package/dist/esm/transactions/Inputs.d.ts +22 -0
- package/dist/esm/transactions/Inputs.js +67 -0
- package/dist/esm/transactions/ObjectCache.d.ts +83 -0
- package/dist/esm/transactions/ObjectCache.js +231 -0
- package/dist/esm/transactions/Transaction.d.ts +710 -0
- package/dist/esm/transactions/Transaction.js +731 -0
- package/dist/esm/transactions/TransactionData.d.ts +73 -0
- package/dist/esm/transactions/TransactionData.js +453 -0
- package/dist/esm/transactions/__tests__/Transaction.test.d.ts +1 -0
- package/dist/esm/transactions/__tests__/bcs.test.d.ts +1 -0
- package/dist/esm/transactions/data/internal.d.ts +1010 -0
- package/dist/esm/transactions/data/internal.js +232 -0
- package/dist/esm/transactions/data/v1.d.ts +312 -0
- package/dist/esm/transactions/data/v1.js +542 -0
- package/dist/esm/transactions/data/v2.d.ts +153 -0
- package/dist/esm/transactions/data/v2.js +126 -0
- package/dist/esm/transactions/executor/caching.d.ts +31 -0
- package/dist/esm/transactions/executor/caching.js +99 -0
- package/dist/esm/transactions/executor/parallel.d.ts +37 -0
- package/dist/esm/transactions/executor/parallel.js +375 -0
- package/dist/esm/transactions/executor/queue.d.ts +11 -0
- package/dist/esm/transactions/executor/queue.js +68 -0
- package/dist/esm/transactions/executor/serial.d.ts +31 -0
- package/dist/esm/transactions/executor/serial.js +116 -0
- package/dist/esm/transactions/hash.d.ts +7 -0
- package/dist/esm/transactions/hash.js +11 -0
- package/dist/esm/transactions/index.d.ts +21 -0
- package/dist/esm/transactions/index.js +41 -0
- package/dist/esm/transactions/intents/CoinWithBalance.d.ts +9 -0
- package/dist/esm/transactions/intents/CoinWithBalance.js +186 -0
- package/dist/esm/transactions/object.d.ts +24 -0
- package/dist/esm/transactions/object.js +96 -0
- package/dist/esm/transactions/plugins/NamedPackagesPlugin.d.ts +31 -0
- package/dist/esm/transactions/plugins/NamedPackagesPlugin.js +17 -0
- package/dist/esm/transactions/pure.d.ts +20 -0
- package/dist/esm/transactions/pure.js +44 -0
- package/dist/esm/transactions/resolve.d.ts +13 -0
- package/dist/esm/transactions/resolve.js +83 -0
- package/dist/esm/transactions/serializer.d.ts +7 -0
- package/dist/esm/transactions/serializer.js +169 -0
- package/dist/esm/transactions/utils.d.ts +10 -0
- package/dist/esm/transactions/utils.js +123 -0
- package/dist/esm/utils/constants.d.ts +17 -0
- package/dist/esm/utils/constants.js +37 -0
- package/dist/esm/utils/derived-objects.d.ts +5 -0
- package/dist/esm/utils/derived-objects.js +13 -0
- package/dist/esm/utils/dynamic-fields.d.ts +2 -0
- package/dist/esm/utils/dynamic-fields.js +20 -0
- package/dist/esm/utils/format.d.ts +2 -0
- package/dist/esm/utils/format.js +15 -0
- package/dist/esm/utils/index.d.ts +8 -0
- package/dist/esm/utils/index.js +76 -0
- package/dist/esm/utils/move-registry.d.ts +6 -0
- package/dist/esm/utils/move-registry.js +24 -0
- package/dist/esm/utils/sui-types.d.ts +26 -0
- package/dist/esm/utils/sui-types.js +70 -0
- package/dist/esm/utils/suins.d.ts +2 -0
- package/dist/esm/utils/suins.js +36 -0
- package/dist/esm/verify/index.d.ts +1 -0
- package/dist/esm/verify/index.js +14 -0
- package/dist/esm/verify/verify.d.ts +16 -0
- package/dist/esm/verify/verify.js +108 -0
- package/dist/esm/version.d.ts +2 -0
- package/dist/esm/version.js +6 -0
- package/dist/esm/w/call/allocation.d.ts +35 -0
- package/dist/esm/w/call/allocation.js +433 -0
- package/dist/esm/w/call/arb.d.ts +17 -0
- package/dist/esm/w/call/arb.js +138 -0
- package/dist/esm/w/call/arbitration.d.ts +106 -0
- package/dist/esm/w/call/arbitration.js +1620 -0
- package/dist/esm/w/call/base.d.ts +42 -0
- package/dist/esm/w/call/base.js +350 -0
- package/dist/esm/w/call/contact.d.ts +45 -0
- package/dist/esm/w/call/contact.js +474 -0
- package/dist/esm/w/call/demand.d.ts +79 -0
- package/dist/esm/w/call/demand.js +869 -0
- package/dist/esm/w/call/entity.d.ts +33 -0
- package/dist/esm/w/call/entity.js +220 -0
- package/dist/esm/w/call/guard-ins.d.ts +31 -0
- package/dist/esm/w/call/guard-ins.js +4371 -0
- package/dist/esm/w/call/guard.d.ts +254 -0
- package/dist/esm/w/call/guard.js +1202 -0
- package/dist/esm/w/call/index.d.ts +37 -0
- package/dist/esm/w/call/index.js +57 -0
- package/dist/esm/w/call/machine.d.ts +124 -0
- package/dist/esm/w/call/machine.js +1492 -0
- package/dist/esm/w/call/order.d.ts +73 -0
- package/dist/esm/w/call/order.js +481 -0
- package/dist/esm/w/call/passport.d.ts +24 -0
- package/dist/esm/w/call/passport.js +266 -0
- package/dist/esm/w/call/payment.d.ts +27 -0
- package/dist/esm/w/call/payment.js +233 -0
- package/dist/esm/w/call/permission.d.ts +222 -0
- package/dist/esm/w/call/permission.js +1375 -0
- package/dist/esm/w/call/personal.d.ts +51 -0
- package/dist/esm/w/call/personal.js +177 -0
- package/dist/esm/w/call/progress.d.ts +94 -0
- package/dist/esm/w/call/progress.js +827 -0
- package/dist/esm/w/call/proof.d.ts +27 -0
- package/dist/esm/w/call/proof.js +110 -0
- package/dist/esm/w/call/repository.d.ts +97 -0
- package/dist/esm/w/call/repository.js +1325 -0
- package/dist/esm/w/call/resource.d.ts +27 -0
- package/dist/esm/w/call/resource.js +135 -0
- package/dist/esm/w/call/reward.d.ts +52 -0
- package/dist/esm/w/call/reward.js +874 -0
- package/dist/esm/w/call/service.d.ts +184 -0
- package/dist/esm/w/call/service.js +2472 -0
- package/dist/esm/w/call/treasury.d.ts +77 -0
- package/dist/esm/w/call/treasury.js +1186 -0
- package/dist/esm/w/call/util.d.ts +12 -0
- package/dist/esm/w/call/util.js +646 -0
- package/dist/esm/w/common.d.ts +359 -0
- package/dist/esm/w/common.js +605 -0
- package/dist/esm/w/exception.d.ts +82 -0
- package/dist/esm/w/exception.js +585 -0
- package/dist/esm/w/index.d.ts +8 -0
- package/dist/esm/w/index.js +8 -0
- package/dist/esm/w/local/.eslintrc.js +23 -0
- package/dist/esm/w/local/account.d.ts +134 -0
- package/dist/esm/w/local/account.js +746 -0
- package/dist/esm/w/local/cache.d.ts +35 -0
- package/dist/esm/w/local/cache.js +162 -0
- package/dist/esm/w/local/config.d.ts +15 -0
- package/dist/esm/w/local/config.js +64 -0
- package/dist/esm/w/local/index.d.ts +193 -0
- package/dist/esm/w/local/index.js +301 -0
- package/dist/esm/w/local/local.d.ts +93 -0
- package/dist/esm/w/local/local.js +654 -0
- package/dist/esm/w/local/storage.d.ts +61 -0
- package/dist/esm/w/local/storage.js +190 -0
- package/dist/esm/w/local/token.d.ts +22 -0
- package/dist/esm/w/local/token.js +163 -0
- package/dist/esm/w/local/util.d.ts +5 -0
- package/dist/esm/w/local/util.js +27 -0
- package/dist/esm/w/local/wip.d.ts +218 -0
- package/dist/esm/w/local/wip.js +882 -0
- package/dist/esm/w/messenger/.eslintrc.js +23 -0
- package/dist/esm/w/messenger/crypto.d.ts +269 -0
- package/dist/esm/w/messenger/crypto.js +428 -0
- package/dist/esm/w/messenger/index.d.ts +23 -0
- package/dist/esm/w/messenger/index.js +25 -0
- package/dist/esm/w/messenger/messenger-api.d.ts +225 -0
- package/dist/esm/w/messenger/messenger-api.js +1228 -0
- package/dist/esm/w/messenger/messenger-manager.d.ts +80 -0
- package/dist/esm/w/messenger/messenger-manager.js +1118 -0
- package/dist/esm/w/messenger/messenger.d.ts +231 -0
- package/dist/esm/w/messenger/messenger.js +1492 -0
- package/dist/esm/w/messenger/server.d.ts +134 -0
- package/dist/esm/w/messenger/server.js +520 -0
- package/dist/esm/w/messenger/session.d.ts +78 -0
- package/dist/esm/w/messenger/session.js +415 -0
- package/dist/esm/w/messenger/storage.d.ts +192 -0
- package/dist/esm/w/messenger/storage.js +935 -0
- package/dist/esm/w/messenger/types.d.ts +705 -0
- package/dist/esm/w/messenger/types.js +88 -0
- package/dist/esm/w/messenger/utils.d.ts +15 -0
- package/dist/esm/w/messenger/utils.js +17 -0
- package/dist/esm/w/query/bult-in.d.ts +73 -0
- package/dist/esm/w/query/bult-in.js +112 -0
- package/dist/esm/w/query/event.d.ts +82 -0
- package/dist/esm/w/query/event.js +137 -0
- package/dist/esm/w/query/index.d.ts +5 -0
- package/dist/esm/w/query/index.js +5 -0
- package/dist/esm/w/query/object.d.ts +658 -0
- package/dist/esm/w/query/object.js +1648 -0
- package/dist/esm/w/query/received.d.ts +34 -0
- package/dist/esm/w/query/received.js +73 -0
- package/dist/esm/w/query/util.d.ts +5 -0
- package/dist/esm/w/query/util.js +62 -0
- package/dist/esm/w/util.d.ts +19 -0
- package/dist/esm/w/util.js +710 -0
- package/dist/esm/zklogin/address.js +78 -0
- package/dist/esm/zklogin/bcs.js +21 -0
- package/dist/esm/zklogin/index.js +38 -0
- package/dist/esm/zklogin/jwt-decode.js +68 -0
- package/dist/esm/zklogin/jwt-utils.js +108 -0
- package/dist/esm/zklogin/nonce.js +40 -0
- package/dist/esm/zklogin/poseidon.js +61 -0
- package/dist/esm/zklogin/publickey.js +265 -0
- package/dist/esm/zklogin/signature.js +37 -0
- package/dist/esm/zklogin/utils.js +78 -0
- package/dist/tsconfig.esm.tsbuildinfo +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +295 -61
- package/dist/arbitration.d.ts +0 -65
- package/dist/arbitration.d.ts.map +0 -1
- package/dist/arbitration.js +0 -517
- package/dist/arbitration.js.map +0 -1
- package/dist/demand.d.ts +0 -27
- package/dist/demand.d.ts.map +0 -1
- package/dist/demand.js +0 -266
- package/dist/demand.js.map +0 -1
- package/dist/entity.d.ts +0 -46
- package/dist/entity.d.ts.map +0 -1
- package/dist/entity.js +0 -146
- package/dist/entity.js.map +0 -1
- package/dist/exception.d.ts +0 -37
- package/dist/exception.d.ts.map +0 -1
- package/dist/exception.js +0 -41
- package/dist/exception.js.map +0 -1
- package/dist/guard.d.ts +0 -110
- package/dist/guard.d.ts.map +0 -1
- package/dist/guard.js +0 -936
- package/dist/guard.js.map +0 -1
- package/dist/index.d.ts +0 -40
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -28
- package/dist/index.js.map +0 -1
- package/dist/machine.d.ts +0 -68
- package/dist/machine.d.ts.map +0 -1
- package/dist/machine.js +0 -520
- package/dist/machine.js.map +0 -1
- package/dist/passport.d.ts +0 -129
- package/dist/passport.d.ts.map +0 -1
- package/dist/passport.js +0 -1233
- package/dist/passport.js.map +0 -1
- package/dist/payment.d.ts +0 -28
- package/dist/payment.d.ts.map +0 -1
- package/dist/payment.js +0 -60
- package/dist/payment.js.map +0 -1
- package/dist/permission.d.ts +0 -155
- package/dist/permission.d.ts.map +0 -1
- package/dist/permission.js +0 -462
- package/dist/permission.js.map +0 -1
- package/dist/progress.d.ts +0 -66
- package/dist/progress.d.ts.map +0 -1
- package/dist/progress.js +0 -311
- package/dist/progress.js.map +0 -1
- package/dist/protocol.d.ts +0 -247
- package/dist/protocol.d.ts.map +0 -1
- package/dist/protocol.js +0 -726
- package/dist/protocol.js.map +0 -1
- package/dist/repository.d.ts +0 -94
- package/dist/repository.d.ts.map +0 -1
- package/dist/repository.js +0 -783
- package/dist/repository.js.map +0 -1
- package/dist/resource.d.ts +0 -36
- package/dist/resource.d.ts.map +0 -1
- package/dist/resource.js +0 -129
- package/dist/resource.js.map +0 -1
- package/dist/service.d.ts +0 -144
- package/dist/service.d.ts.map +0 -1
- package/dist/service.js +0 -1303
- package/dist/service.js.map +0 -1
- package/dist/treasury.d.ts +0 -55
- package/dist/treasury.d.ts.map +0 -1
- package/dist/treasury.js +0 -393
- package/dist/treasury.js.map +0 -1
- package/dist/utils.d.ts +0 -94
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js +0 -582
- package/dist/utils.js.map +0 -1
- package/dist/wowok.d.ts +0 -15
- package/dist/wowok.d.ts.map +0 -1
- package/dist/wowok.js +0 -66
- package/dist/wowok.js.map +0 -1
|
@@ -0,0 +1,625 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var common_exports = {};
|
|
20
|
+
__export(common_exports, {
|
|
21
|
+
CoinWrapPrefix: () => CoinWrapPrefix,
|
|
22
|
+
ContextType: () => ContextType,
|
|
23
|
+
ENTITY_LINKER_ADDRESS: () => ENTITY_LINKER_ADDRESS,
|
|
24
|
+
ENTITY_REGISTRAR_ADDRESS: () => ENTITY_REGISTRAR_ADDRESS,
|
|
25
|
+
EntityAddress: () => EntityAddress,
|
|
26
|
+
GasCoinType: () => GasCoinType,
|
|
27
|
+
GasTokenType: () => GasTokenType,
|
|
28
|
+
GetObject: () => GetObject,
|
|
29
|
+
GetObjectDescription: () => GetObjectDescription,
|
|
30
|
+
GetObjectExisted: () => GetObjectExisted,
|
|
31
|
+
IsBcsStringLength: () => IsBcsStringLength,
|
|
32
|
+
IsValidArgType: () => IsValidArgType,
|
|
33
|
+
IsValidBalance: () => IsValidBalance,
|
|
34
|
+
IsValidEndpoint: () => IsValidEndpoint,
|
|
35
|
+
MAX_DEPENDED_COUNT: () => MAX_DEPENDED_COUNT,
|
|
36
|
+
MAX_DESCRIPTION_LENGTH: () => MAX_DESCRIPTION_LENGTH,
|
|
37
|
+
MAX_ENV_PERMISSION_GUARD_COUNT: () => MAX_ENV_PERMISSION_GUARD_COUNT,
|
|
38
|
+
MAX_GUARD_TABLE_ITEM_LENGTH: () => MAX_GUARD_TABLE_ITEM_LENGTH,
|
|
39
|
+
MAX_INPUT_SIZE: () => MAX_INPUT_SIZE,
|
|
40
|
+
MAX_LONG_NAME_LENGTH: () => MAX_LONG_NAME_LENGTH,
|
|
41
|
+
MAX_MULTI_OPERANDS: () => MAX_MULTI_OPERANDS,
|
|
42
|
+
MAX_NAME_LENGTH: () => MAX_NAME_LENGTH,
|
|
43
|
+
MAX_PERMISSION_GUARD_COUNT: () => MAX_PERMISSION_GUARD_COUNT,
|
|
44
|
+
MAX_TABLE_SIZE: () => MAX_TABLE_SIZE,
|
|
45
|
+
Modules: () => Modules,
|
|
46
|
+
ObjectType: () => ObjectType,
|
|
47
|
+
OperatorType: () => OperatorType,
|
|
48
|
+
PackageAddress: () => PackageAddress,
|
|
49
|
+
RecipientType: () => RecipientType,
|
|
50
|
+
RegistrarAddress: () => RegistrarAddress,
|
|
51
|
+
ValueType: () => ValueType,
|
|
52
|
+
WitnessType: () => WitnessType,
|
|
53
|
+
arbitrationFn: () => arbitrationFn,
|
|
54
|
+
contactFn: () => contactFn,
|
|
55
|
+
createValueContainer: () => createValueContainer,
|
|
56
|
+
demandFn: () => demandFn,
|
|
57
|
+
isGasTokenType: () => isGasTokenType,
|
|
58
|
+
isThisPackage: () => isThisPackage,
|
|
59
|
+
isValidArray: () => isValidArray,
|
|
60
|
+
isValidDescription: () => isValidDescription,
|
|
61
|
+
isValidHttpUrl: () => isValidHttpUrl,
|
|
62
|
+
isValidLongName: () => isValidLongName,
|
|
63
|
+
isValidName: () => isValidName,
|
|
64
|
+
isValidU128: () => isValidU128,
|
|
65
|
+
isValidU16: () => isValidU16,
|
|
66
|
+
isValidU256: () => isValidU256,
|
|
67
|
+
isValidU32: () => isValidU32,
|
|
68
|
+
isValidU64: () => isValidU64,
|
|
69
|
+
isValidU8: () => isValidU8,
|
|
70
|
+
isValidValueType: () => isValidValueType,
|
|
71
|
+
isValidValueTypeInput: () => isValidValueTypeInput,
|
|
72
|
+
isValueTypeNumber: () => isValueTypeNumber,
|
|
73
|
+
isWitnessType: () => isWitnessType,
|
|
74
|
+
machineFn: () => machineFn,
|
|
75
|
+
object_name_from_type: () => object_name_from_type,
|
|
76
|
+
parseValueType: () => parseValueType,
|
|
77
|
+
repositoryFn: () => repositoryFn,
|
|
78
|
+
rewardFn: () => rewardFn,
|
|
79
|
+
serviceFn: () => serviceFn,
|
|
80
|
+
toTxAddress: () => toTxAddress,
|
|
81
|
+
toTxAddressVec: () => toTxAddressVec,
|
|
82
|
+
toTxObject: () => toTxObject,
|
|
83
|
+
toTxString: () => toTxString,
|
|
84
|
+
toTxU128: () => toTxU128,
|
|
85
|
+
toTxU16: () => toTxU16,
|
|
86
|
+
toTxU16Vec: () => toTxU16Vec,
|
|
87
|
+
toTxU256: () => toTxU256,
|
|
88
|
+
toTxU32: () => toTxU32,
|
|
89
|
+
toTxU64: () => toTxU64,
|
|
90
|
+
toTxU8: () => toTxU8,
|
|
91
|
+
treasuryFn: () => treasuryFn,
|
|
92
|
+
valueTypeToString: () => valueTypeToString
|
|
93
|
+
});
|
|
94
|
+
module.exports = __toCommonJS(common_exports);
|
|
95
|
+
var import_bcs = require("../bcs/index.js");
|
|
96
|
+
var import_exception = require("./exception.js");
|
|
97
|
+
var import_local = require("./local/local.js");
|
|
98
|
+
var ValueType = /* @__PURE__ */ ((ValueType2) => {
|
|
99
|
+
ValueType2[ValueType2["Bool"] = 0] = "Bool";
|
|
100
|
+
ValueType2[ValueType2["Address"] = 1] = "Address";
|
|
101
|
+
ValueType2[ValueType2["String"] = 2] = "String";
|
|
102
|
+
ValueType2[ValueType2["U8"] = 3] = "U8";
|
|
103
|
+
ValueType2[ValueType2["U16"] = 4] = "U16";
|
|
104
|
+
ValueType2[ValueType2["U32"] = 5] = "U32";
|
|
105
|
+
ValueType2[ValueType2["U64"] = 6] = "U64";
|
|
106
|
+
ValueType2[ValueType2["U128"] = 7] = "U128";
|
|
107
|
+
ValueType2[ValueType2["U256"] = 8] = "U256";
|
|
108
|
+
ValueType2[ValueType2["VecBool"] = 9] = "VecBool";
|
|
109
|
+
ValueType2[ValueType2["VecAddress"] = 10] = "VecAddress";
|
|
110
|
+
ValueType2[ValueType2["VecString"] = 11] = "VecString";
|
|
111
|
+
ValueType2[ValueType2["VecU8"] = 12] = "VecU8";
|
|
112
|
+
ValueType2[ValueType2["VecU16"] = 13] = "VecU16";
|
|
113
|
+
ValueType2[ValueType2["VecU32"] = 14] = "VecU32";
|
|
114
|
+
ValueType2[ValueType2["VecU64"] = 15] = "VecU64";
|
|
115
|
+
ValueType2[ValueType2["VecU128"] = 16] = "VecU128";
|
|
116
|
+
ValueType2[ValueType2["VecU256"] = 17] = "VecU256";
|
|
117
|
+
ValueType2[ValueType2["VecVecU8"] = 18] = "VecVecU8";
|
|
118
|
+
ValueType2[ValueType2["Value"] = 19] = "Value";
|
|
119
|
+
return ValueType2;
|
|
120
|
+
})(ValueType || {});
|
|
121
|
+
const createValueContainer = (valueType, value) => {
|
|
122
|
+
return {
|
|
123
|
+
valueType,
|
|
124
|
+
value
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
const parseValueType = (input) => {
|
|
128
|
+
if (typeof input === "number") {
|
|
129
|
+
if (input >= 0 && input <= 19) return input;
|
|
130
|
+
throw new Error(
|
|
131
|
+
`Invalid ValueType number: ${input}. Valid range: 0-19`
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
const validNames = Object.keys(ValueType).filter((k) => isNaN(Number(k)));
|
|
135
|
+
const lowerInput = input.toLowerCase();
|
|
136
|
+
const enumValue = validNames.find(
|
|
137
|
+
(name) => name.toLowerCase() === lowerInput
|
|
138
|
+
);
|
|
139
|
+
if (enumValue === void 0) {
|
|
140
|
+
throw new Error(
|
|
141
|
+
`Invalid ValueType string: "${input}". Valid values: ${validNames.join(", ")}`
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
return ValueType[enumValue];
|
|
145
|
+
};
|
|
146
|
+
const valueTypeToString = (type) => {
|
|
147
|
+
return ValueType[type];
|
|
148
|
+
};
|
|
149
|
+
const isValidValueTypeInput = (input) => {
|
|
150
|
+
if (typeof input === "number") {
|
|
151
|
+
return input >= 0 && input <= 19;
|
|
152
|
+
}
|
|
153
|
+
if (typeof input === "string") {
|
|
154
|
+
const upperKey = input.toUpperCase();
|
|
155
|
+
const enumValue = ValueType[upperKey];
|
|
156
|
+
return typeof enumValue === "number";
|
|
157
|
+
}
|
|
158
|
+
return false;
|
|
159
|
+
};
|
|
160
|
+
var OperatorType = /* @__PURE__ */ ((OperatorType2) => {
|
|
161
|
+
OperatorType2[OperatorType2["TypeQuery"] = 40] = "TypeQuery";
|
|
162
|
+
OperatorType2[OperatorType2["TypeNumberAdd"] = 200] = "TypeNumberAdd";
|
|
163
|
+
OperatorType2[OperatorType2["TypeNumberSubtract"] = 201] = "TypeNumberSubtract";
|
|
164
|
+
OperatorType2[OperatorType2["TypeNumberMultiply"] = 202] = "TypeNumberMultiply";
|
|
165
|
+
OperatorType2[OperatorType2["TypeNumberDivide"] = 203] = "TypeNumberDivide";
|
|
166
|
+
OperatorType2[OperatorType2["TypeNumberMod"] = 204] = "TypeNumberMod";
|
|
167
|
+
OperatorType2[OperatorType2["TypeNumberAddress"] = 205] = "TypeNumberAddress";
|
|
168
|
+
OperatorType2[OperatorType2["TypeNumberString"] = 206] = "TypeNumberString";
|
|
169
|
+
OperatorType2[OperatorType2["TypeAddressNumber"] = 207] = "TypeAddressNumber";
|
|
170
|
+
OperatorType2[OperatorType2["TypeStringNumber"] = 208] = "TypeStringNumber";
|
|
171
|
+
OperatorType2[OperatorType2["TypeSafeU8"] = 220] = "TypeSafeU8";
|
|
172
|
+
OperatorType2[OperatorType2["TypeSafeU16"] = 221] = "TypeSafeU16";
|
|
173
|
+
OperatorType2[OperatorType2["TypeSafeU32"] = 222] = "TypeSafeU32";
|
|
174
|
+
OperatorType2[OperatorType2["TypeSafeU64"] = 223] = "TypeSafeU64";
|
|
175
|
+
OperatorType2[OperatorType2["TypeSafeU128"] = 224] = "TypeSafeU128";
|
|
176
|
+
OperatorType2[OperatorType2["TypeSafeU256"] = 225] = "TypeSafeU256";
|
|
177
|
+
OperatorType2[OperatorType2["TypeStringLength"] = 61] = "TypeStringLength";
|
|
178
|
+
OperatorType2[OperatorType2["TypeStringIndexof"] = 62] = "TypeStringIndexof";
|
|
179
|
+
OperatorType2[OperatorType2["TypeStringNocaseIndexof"] = 63] = "TypeStringNocaseIndexof";
|
|
180
|
+
OperatorType2[OperatorType2["TypeStringContains"] = 64] = "TypeStringContains";
|
|
181
|
+
OperatorType2[OperatorType2["TypeStringNocaseContains"] = 65] = "TypeStringNocaseContains";
|
|
182
|
+
OperatorType2[OperatorType2["TypeStringNocaseEqual"] = 66] = "TypeStringNocaseEqual";
|
|
183
|
+
OperatorType2[OperatorType2["TypedValueType"] = 70] = "TypedValueType";
|
|
184
|
+
OperatorType2[OperatorType2["TypedValueVecLength"] = 71] = "TypedValueVecLength";
|
|
185
|
+
OperatorType2[OperatorType2["TypedValueVecContains_Bool"] = 72] = "TypedValueVecContains_Bool";
|
|
186
|
+
OperatorType2[OperatorType2["TypedValueVecContains_Address"] = 73] = "TypedValueVecContains_Address";
|
|
187
|
+
OperatorType2[OperatorType2["TypedValueVecContains_String"] = 74] = "TypedValueVecContains_String";
|
|
188
|
+
OperatorType2[OperatorType2["TypedValueVecContains_StringNoCase"] = 75] = "TypedValueVecContains_StringNoCase";
|
|
189
|
+
OperatorType2[OperatorType2["TypedValueVecContains_Number"] = 76] = "TypedValueVecContains_Number";
|
|
190
|
+
OperatorType2[OperatorType2["TypedValueVecContains_U8"] = 82] = "TypedValueVecContains_U8";
|
|
191
|
+
OperatorType2[OperatorType2["TypedValueVecContains_U16"] = 83] = "TypedValueVecContains_U16";
|
|
192
|
+
OperatorType2[OperatorType2["TypedValueVecContains_U32"] = 84] = "TypedValueVecContains_U32";
|
|
193
|
+
OperatorType2[OperatorType2["TypedValueVecContains_U64"] = 85] = "TypedValueVecContains_U64";
|
|
194
|
+
OperatorType2[OperatorType2["TypedValueVecContains_U128"] = 86] = "TypedValueVecContains_U128";
|
|
195
|
+
OperatorType2[OperatorType2["TypedValueVecContains_U256"] = 87] = "TypedValueVecContains_U256";
|
|
196
|
+
OperatorType2[OperatorType2["TypedValueVecIndexOf_Bool"] = 77] = "TypedValueVecIndexOf_Bool";
|
|
197
|
+
OperatorType2[OperatorType2["TypedValueVecIndexOf_Address"] = 78] = "TypedValueVecIndexOf_Address";
|
|
198
|
+
OperatorType2[OperatorType2["TypedValueVecIndexOf_String"] = 79] = "TypedValueVecIndexOf_String";
|
|
199
|
+
OperatorType2[OperatorType2["TypedValueVecIndexOf_StringNoCase"] = 80] = "TypedValueVecIndexOf_StringNoCase";
|
|
200
|
+
OperatorType2[OperatorType2["TypedValueVecIndexOf_Number"] = 81] = "TypedValueVecIndexOf_Number";
|
|
201
|
+
OperatorType2[OperatorType2["TypeLogicEqual"] = 90] = "TypeLogicEqual";
|
|
202
|
+
OperatorType2[OperatorType2["TypeLogicAsU256Greater"] = 91] = "TypeLogicAsU256Greater";
|
|
203
|
+
OperatorType2[OperatorType2["TypeLogicAsU256GreaterEqual"] = 92] = "TypeLogicAsU256GreaterEqual";
|
|
204
|
+
OperatorType2[OperatorType2["TypeLogicAsU256Lesser"] = 93] = "TypeLogicAsU256Lesser";
|
|
205
|
+
OperatorType2[OperatorType2["TypeLogicAsU256LesserEqual"] = 94] = "TypeLogicAsU256LesserEqual";
|
|
206
|
+
OperatorType2[OperatorType2["TypeLogicAsU256Equal"] = 95] = "TypeLogicAsU256Equal";
|
|
207
|
+
OperatorType2[OperatorType2["TypeLogicAnd"] = 96] = "TypeLogicAnd";
|
|
208
|
+
OperatorType2[OperatorType2["TypeLogicOr"] = 97] = "TypeLogicOr";
|
|
209
|
+
OperatorType2[OperatorType2["TypeLogicNot"] = 98] = "TypeLogicNot";
|
|
210
|
+
return OperatorType2;
|
|
211
|
+
})(OperatorType || {});
|
|
212
|
+
var WitnessType = /* @__PURE__ */ ((WitnessType2) => {
|
|
213
|
+
WitnessType2[WitnessType2["TypeOrderProgress"] = 100] = "TypeOrderProgress";
|
|
214
|
+
WitnessType2[WitnessType2["TypeOrderMachine"] = 101] = "TypeOrderMachine";
|
|
215
|
+
WitnessType2[WitnessType2["TypeOrderService"] = 102] = "TypeOrderService";
|
|
216
|
+
WitnessType2[WitnessType2["TypeProgressMachine"] = 103] = "TypeProgressMachine";
|
|
217
|
+
WitnessType2[WitnessType2["TypeArbOrder"] = 104] = "TypeArbOrder";
|
|
218
|
+
WitnessType2[WitnessType2["TypeArbArbitration"] = 105] = "TypeArbArbitration";
|
|
219
|
+
WitnessType2[WitnessType2["TypeArbProgress"] = 106] = "TypeArbProgress";
|
|
220
|
+
WitnessType2[WitnessType2["TypeArbMachine"] = 107] = "TypeArbMachine";
|
|
221
|
+
WitnessType2[WitnessType2["TypeArbService"] = 108] = "TypeArbService";
|
|
222
|
+
return WitnessType2;
|
|
223
|
+
})(WitnessType || {});
|
|
224
|
+
const isWitnessType = (type) => {
|
|
225
|
+
return type != null && type >= 100 /* TypeOrderProgress */ && type <= 108 /* TypeArbService */;
|
|
226
|
+
};
|
|
227
|
+
var ContextType = /* @__PURE__ */ ((ContextType2) => {
|
|
228
|
+
ContextType2[ContextType2["TypeSigner"] = 45] = "TypeSigner";
|
|
229
|
+
ContextType2[ContextType2["TypeClock"] = 46] = "TypeClock";
|
|
230
|
+
ContextType2[ContextType2["TypeGuard"] = 47] = "TypeGuard";
|
|
231
|
+
ContextType2[ContextType2["TypeConstant"] = 48] = "TypeConstant";
|
|
232
|
+
return ContextType2;
|
|
233
|
+
})(ContextType || {});
|
|
234
|
+
var Modules = /* @__PURE__ */ ((Modules2) => {
|
|
235
|
+
Modules2["Machine"] = "machine";
|
|
236
|
+
Modules2["Progress"] = "progress";
|
|
237
|
+
Modules2["Repository"] = "repository";
|
|
238
|
+
Modules2["Permission"] = "permission";
|
|
239
|
+
Modules2["Passport"] = "passport";
|
|
240
|
+
Modules2["Guard"] = "guard";
|
|
241
|
+
Modules2["Demand"] = "demand";
|
|
242
|
+
Modules2["Order"] = "order";
|
|
243
|
+
Modules2["Service"] = "service";
|
|
244
|
+
Modules2["Resource"] = "resource";
|
|
245
|
+
Modules2["Entity"] = "entity";
|
|
246
|
+
Modules2["Wowok"] = "wowok";
|
|
247
|
+
Modules2["Treasury"] = "treasury";
|
|
248
|
+
Modules2["Payment"] = "payment";
|
|
249
|
+
Modules2["Arbitration"] = "arbitration";
|
|
250
|
+
Modules2["Arb"] = "arb";
|
|
251
|
+
Modules2["Allocation"] = "allocation";
|
|
252
|
+
return Modules2;
|
|
253
|
+
})(Modules || {});
|
|
254
|
+
const PackageAddress = "0x2";
|
|
255
|
+
const GasTokenType = "0x2::wow::WOW";
|
|
256
|
+
const GasCoinType = "0x2::coin::Coin<0x2::wow::WOW>";
|
|
257
|
+
const RegistrarAddress = "0xaaa";
|
|
258
|
+
const EntityAddress = "0xaab";
|
|
259
|
+
const MAX_ENV_PERMISSION_GUARD_COUNT = 4;
|
|
260
|
+
const isGasTokenType = (token_type) => {
|
|
261
|
+
return token_type === GasTokenType;
|
|
262
|
+
};
|
|
263
|
+
const isValidValueType = (valueType) => {
|
|
264
|
+
return valueType >= 0 /* Bool */ && valueType <= 19 /* Value */;
|
|
265
|
+
};
|
|
266
|
+
const isThisPackage = (type) => {
|
|
267
|
+
return type.startsWith("0x2::");
|
|
268
|
+
};
|
|
269
|
+
const isValidArray = (arr, validator) => {
|
|
270
|
+
if (!Array.isArray(arr)) return false;
|
|
271
|
+
return arr.every((item) => validator(item));
|
|
272
|
+
};
|
|
273
|
+
const isValidU8 = (value) => {
|
|
274
|
+
if (typeof value === "string") {
|
|
275
|
+
const num = parseInt(value, 10);
|
|
276
|
+
return !isNaN(num) && Number.isInteger(num) && num >= 0 && num <= 255;
|
|
277
|
+
}
|
|
278
|
+
if (typeof value === "bigint") {
|
|
279
|
+
return value >= 0n && value <= 255n;
|
|
280
|
+
}
|
|
281
|
+
return Number.isInteger(value) && value >= 0 && value <= 255;
|
|
282
|
+
};
|
|
283
|
+
const isValidU16 = (value) => {
|
|
284
|
+
if (typeof value === "string") {
|
|
285
|
+
const num = parseInt(value, 10);
|
|
286
|
+
return !isNaN(num) && Number.isInteger(num) && num >= 0 && num <= 65535;
|
|
287
|
+
}
|
|
288
|
+
if (typeof value === "bigint") {
|
|
289
|
+
return value >= 0n && value <= 65535n;
|
|
290
|
+
}
|
|
291
|
+
return Number.isInteger(value) && value >= 0 && value <= 65535;
|
|
292
|
+
};
|
|
293
|
+
const isValidU64 = (value) => {
|
|
294
|
+
if (typeof value === "string") {
|
|
295
|
+
if (value.length > 15) {
|
|
296
|
+
try {
|
|
297
|
+
const bigNum = BigInt(value);
|
|
298
|
+
return bigNum >= 0n && bigNum <= 18446744073709551615n;
|
|
299
|
+
} catch {
|
|
300
|
+
return false;
|
|
301
|
+
}
|
|
302
|
+
} else {
|
|
303
|
+
const num = parseInt(value, 10);
|
|
304
|
+
return !isNaN(num) && Number.isInteger(num) && num >= 0 && num <= Number.MAX_SAFE_INTEGER;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
if (typeof value === "bigint") {
|
|
308
|
+
return value >= 0n && value <= 18446744073709551615n;
|
|
309
|
+
}
|
|
310
|
+
return Number.isInteger(value) && value >= 0 && value <= Number.MAX_SAFE_INTEGER;
|
|
311
|
+
};
|
|
312
|
+
const isValidU128 = (value) => {
|
|
313
|
+
if (typeof value === "string") {
|
|
314
|
+
try {
|
|
315
|
+
const bigNum = BigInt(value);
|
|
316
|
+
return bigNum >= 0n && bigNum <= 340282366920938463463374607431768211455n;
|
|
317
|
+
} catch {
|
|
318
|
+
return false;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
if (typeof value === "bigint") {
|
|
322
|
+
return value >= 0n && value <= 340282366920938463463374607431768211455n;
|
|
323
|
+
}
|
|
324
|
+
return Number.isInteger(value) && value >= 0 && value <= Number.MAX_SAFE_INTEGER;
|
|
325
|
+
};
|
|
326
|
+
const isValidU256 = (value) => {
|
|
327
|
+
if (typeof value === "string") {
|
|
328
|
+
try {
|
|
329
|
+
const bigNum = BigInt(value);
|
|
330
|
+
return bigNum >= 0n && bigNum <= 115792089237316195423570985008687907853269984665640564039457584007913129639935n;
|
|
331
|
+
} catch {
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
if (typeof value === "bigint") {
|
|
336
|
+
return value >= 0n && value <= 115792089237316195423570985008687907853269984665640564039457584007913129639935n;
|
|
337
|
+
}
|
|
338
|
+
return Number.isInteger(value) && value >= 0 && value <= Number.MAX_SAFE_INTEGER;
|
|
339
|
+
};
|
|
340
|
+
const isValidU32 = (value) => {
|
|
341
|
+
if (typeof value === "string") {
|
|
342
|
+
const num = parseInt(value, 10);
|
|
343
|
+
return !isNaN(num) && Number.isInteger(num) && num >= 0 && num <= 4294967295;
|
|
344
|
+
}
|
|
345
|
+
if (typeof value === "bigint") {
|
|
346
|
+
return value >= 0n && value <= 4294967295n;
|
|
347
|
+
}
|
|
348
|
+
return Number.isInteger(value) && value >= 0 && value <= 4294967295;
|
|
349
|
+
};
|
|
350
|
+
const IsBcsStringLength = (str, max_len) => {
|
|
351
|
+
return import_bcs.bcs.string().serialize(str).toBytes().length <= max_len;
|
|
352
|
+
};
|
|
353
|
+
const MAX_DESCRIPTION_LENGTH = 4e3;
|
|
354
|
+
const MAX_NAME_LENGTH = 64;
|
|
355
|
+
const MAX_LONG_NAME_LENGTH = 256;
|
|
356
|
+
const MAX_GUARD_TABLE_ITEM_LENGTH = 256;
|
|
357
|
+
const MAX_INPUT_SIZE = 1024;
|
|
358
|
+
const MAX_TABLE_SIZE = 4e4;
|
|
359
|
+
const MAX_DEPENDED_COUNT = 4;
|
|
360
|
+
const MAX_MULTI_OPERANDS = 8;
|
|
361
|
+
const isValidDescription = (description) => {
|
|
362
|
+
return IsBcsStringLength(description, MAX_DESCRIPTION_LENGTH);
|
|
363
|
+
};
|
|
364
|
+
const isValidName = (name) => {
|
|
365
|
+
return IsBcsStringLength(name, MAX_NAME_LENGTH) && !name.toLowerCase().startsWith("0x");
|
|
366
|
+
};
|
|
367
|
+
const isValidLongName = (name) => {
|
|
368
|
+
return IsBcsStringLength(name, MAX_LONG_NAME_LENGTH);
|
|
369
|
+
};
|
|
370
|
+
const isValidHttpUrl = (url) => {
|
|
371
|
+
try {
|
|
372
|
+
const newUrl = new URL(url);
|
|
373
|
+
return newUrl.protocol === "http:" || newUrl.protocol === "https:" || newUrl.protocol === "ipfs:";
|
|
374
|
+
} catch (_) {
|
|
375
|
+
return false;
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
const isValueTypeNumber = (valueType) => {
|
|
379
|
+
return valueType === 3 /* U8 */ || valueType === 4 /* U16 */ || valueType === 5 /* U32 */ || valueType === 6 /* U64 */ || valueType === 7 /* U128 */ || valueType === 8 /* U256 */;
|
|
380
|
+
};
|
|
381
|
+
const toTxObject = (tx, arg) => {
|
|
382
|
+
if (typeof arg === "string") {
|
|
383
|
+
return tx.object(arg);
|
|
384
|
+
}
|
|
385
|
+
return arg;
|
|
386
|
+
};
|
|
387
|
+
const toTxString = (tx, arg) => {
|
|
388
|
+
if (arg === void 0 || arg === null) {
|
|
389
|
+
return tx.pure.string("");
|
|
390
|
+
}
|
|
391
|
+
if (typeof arg === "string") {
|
|
392
|
+
return tx.pure.string(arg);
|
|
393
|
+
}
|
|
394
|
+
return arg;
|
|
395
|
+
};
|
|
396
|
+
const toTxU8 = (tx, arg) => {
|
|
397
|
+
if (typeof arg === "string" || typeof arg === "number" || typeof arg === "bigint") {
|
|
398
|
+
if (!isValidU8(arg)) {
|
|
399
|
+
(0, import_exception.W_ERROR)(import_exception.WErrors.IsValidU8, `Invalid U8 value: ${arg}`);
|
|
400
|
+
}
|
|
401
|
+
return tx.pure.u8(Number(arg));
|
|
402
|
+
}
|
|
403
|
+
return arg;
|
|
404
|
+
};
|
|
405
|
+
const toTxU16 = (tx, arg) => {
|
|
406
|
+
if (typeof arg === "string" || typeof arg === "number" || typeof arg === "bigint") {
|
|
407
|
+
if (!isValidU16(arg)) {
|
|
408
|
+
(0, import_exception.W_ERROR)(import_exception.WErrors.IsValidU16, `Invalid U16 value: ${arg}`);
|
|
409
|
+
}
|
|
410
|
+
return tx.pure.u16(Number(arg));
|
|
411
|
+
}
|
|
412
|
+
return arg;
|
|
413
|
+
};
|
|
414
|
+
const toTxU32 = (tx, arg) => {
|
|
415
|
+
if (typeof arg === "string" || typeof arg === "number" || typeof arg === "bigint") {
|
|
416
|
+
if (!isValidU32(arg)) {
|
|
417
|
+
(0, import_exception.W_ERROR)(import_exception.WErrors.IsValidU32, `Invalid U32 value: ${arg}`);
|
|
418
|
+
}
|
|
419
|
+
return tx.pure.u32(Number(arg));
|
|
420
|
+
}
|
|
421
|
+
return arg;
|
|
422
|
+
};
|
|
423
|
+
const toTxU128 = (tx, arg) => {
|
|
424
|
+
if (typeof arg === "string" || typeof arg === "number" || typeof arg === "bigint") {
|
|
425
|
+
if (!isValidU128(arg)) {
|
|
426
|
+
(0, import_exception.W_ERROR)(import_exception.WErrors.IsValidU128, `Invalid U128 value: ${arg}`);
|
|
427
|
+
}
|
|
428
|
+
return tx.pure.u128(arg);
|
|
429
|
+
}
|
|
430
|
+
return arg;
|
|
431
|
+
};
|
|
432
|
+
const toTxU256 = (tx, arg) => {
|
|
433
|
+
if (typeof arg === "string" || typeof arg === "number" || typeof arg === "bigint") {
|
|
434
|
+
if (!isValidU256(arg)) {
|
|
435
|
+
(0, import_exception.W_ERROR)(import_exception.WErrors.IsValidU256, `Invalid U256 value: ${arg}`);
|
|
436
|
+
}
|
|
437
|
+
return tx.pure.u256(arg);
|
|
438
|
+
}
|
|
439
|
+
return arg;
|
|
440
|
+
};
|
|
441
|
+
const toTxU64 = (tx, arg) => {
|
|
442
|
+
if (typeof arg === "string" || typeof arg === "number" || typeof arg === "bigint") {
|
|
443
|
+
if (!isValidU64(arg)) {
|
|
444
|
+
(0, import_exception.W_ERROR)(import_exception.WErrors.IsValidU64, `Invalid U64 value: ${arg}`);
|
|
445
|
+
}
|
|
446
|
+
return tx.pure.u64(arg);
|
|
447
|
+
}
|
|
448
|
+
return arg;
|
|
449
|
+
};
|
|
450
|
+
const toTxAddress = (tx, arg) => {
|
|
451
|
+
if (typeof arg === "string") {
|
|
452
|
+
return tx.pure.address(arg);
|
|
453
|
+
}
|
|
454
|
+
return arg;
|
|
455
|
+
};
|
|
456
|
+
const toTxAddressVec = (tx, arg, max_len) => {
|
|
457
|
+
if (Array.isArray(arg)) {
|
|
458
|
+
if (arg.length > max_len) {
|
|
459
|
+
(0, import_exception.W_ERROR)(
|
|
460
|
+
import_exception.WErrors.AddressCountExceeded,
|
|
461
|
+
`Invalid AddressVec length: ${arg.length}`
|
|
462
|
+
);
|
|
463
|
+
}
|
|
464
|
+
return tx.pure.vector(
|
|
465
|
+
"address",
|
|
466
|
+
arg
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
return arg;
|
|
470
|
+
};
|
|
471
|
+
const toTxU16Vec = (tx, arg, max_len) => {
|
|
472
|
+
if (Array.isArray(arg)) {
|
|
473
|
+
if (arg.length > max_len) {
|
|
474
|
+
(0, import_exception.W_ERROR)(
|
|
475
|
+
import_exception.WErrors.NumberCountExceeded,
|
|
476
|
+
`Invalid U16Vec length: ${arg.length}`
|
|
477
|
+
);
|
|
478
|
+
}
|
|
479
|
+
return tx.pure.vector(
|
|
480
|
+
"u16",
|
|
481
|
+
arg.map((e) => {
|
|
482
|
+
if (!isValidU16(e)) {
|
|
483
|
+
(0, import_exception.W_ERROR)(import_exception.WErrors.IsValidU16, `Invalid U16 value: ${e}`);
|
|
484
|
+
}
|
|
485
|
+
return Number(e);
|
|
486
|
+
})
|
|
487
|
+
);
|
|
488
|
+
}
|
|
489
|
+
return arg;
|
|
490
|
+
};
|
|
491
|
+
const object_name_from_type = (type_repr) => {
|
|
492
|
+
if (!type_repr) return void 0;
|
|
493
|
+
let i = type_repr.indexOf("::");
|
|
494
|
+
if (i > 0 && type_repr.slice(0, i) === "0x2") {
|
|
495
|
+
i = type_repr.indexOf("<");
|
|
496
|
+
if (i > 0) {
|
|
497
|
+
type_repr = type_repr.slice(0, i);
|
|
498
|
+
}
|
|
499
|
+
const n = type_repr.lastIndexOf("::");
|
|
500
|
+
if (n > 0) {
|
|
501
|
+
return type_repr.slice(n + 2);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
return void 0;
|
|
505
|
+
};
|
|
506
|
+
function isTypeNamedObjectWithPermission(obj) {
|
|
507
|
+
return obj != null && typeof obj === "object" && "type_parameter" in obj && typeof obj.type_parameter === "string";
|
|
508
|
+
}
|
|
509
|
+
function isNamedObjectWithPermission(obj) {
|
|
510
|
+
return obj != null && typeof obj === "object" && "permission" in obj;
|
|
511
|
+
}
|
|
512
|
+
function isNamedObject(obj) {
|
|
513
|
+
return obj != null && typeof obj === "object";
|
|
514
|
+
}
|
|
515
|
+
function isNamedObjectWithDescription(obj) {
|
|
516
|
+
return obj != null && typeof obj === "object" && "description" in obj;
|
|
517
|
+
}
|
|
518
|
+
function isTypeNamedObjectWithDescription(obj) {
|
|
519
|
+
return obj != null && typeof obj === "object" && "type_parameter" in obj && typeof obj.type_parameter === "string";
|
|
520
|
+
}
|
|
521
|
+
const GetObjectExisted = async (object) => {
|
|
522
|
+
if (typeof object === "string") {
|
|
523
|
+
return await import_local.LocalMark.Instance().get_address(object);
|
|
524
|
+
}
|
|
525
|
+
return void 0;
|
|
526
|
+
};
|
|
527
|
+
const GetObjectDescription = (object) => {
|
|
528
|
+
return isNamedObjectWithDescription(object) ? object.description : void 0;
|
|
529
|
+
};
|
|
530
|
+
const GetObject = (object) => {
|
|
531
|
+
if (isTypeNamedObjectWithPermission(object)) {
|
|
532
|
+
return object;
|
|
533
|
+
} else if (isTypeNamedObjectWithDescription(object)) {
|
|
534
|
+
return object;
|
|
535
|
+
} else if (isNamedObjectWithPermission(object)) {
|
|
536
|
+
return object;
|
|
537
|
+
} else if (isNamedObject(object)) {
|
|
538
|
+
return object;
|
|
539
|
+
}
|
|
540
|
+
return void 0;
|
|
541
|
+
};
|
|
542
|
+
const MAX_PERMISSION_GUARD_COUNT = 4;
|
|
543
|
+
const CoinWrapPrefix = `${PackageAddress}::payment::CoinWrapper`;
|
|
544
|
+
const IsValidBalance = (balance) => {
|
|
545
|
+
return isValidU64(balance);
|
|
546
|
+
};
|
|
547
|
+
const IsValidEndpoint = (endpoint) => {
|
|
548
|
+
return endpoint && IsBcsStringLength(endpoint, 1024);
|
|
549
|
+
};
|
|
550
|
+
const IsValidArgType = (arg_type) => {
|
|
551
|
+
if (arg_type) {
|
|
552
|
+
const arr = arg_type.split("::");
|
|
553
|
+
if (arr.length >= 3) {
|
|
554
|
+
return true;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
return false;
|
|
558
|
+
};
|
|
559
|
+
var RecipientType = /* @__PURE__ */ ((RecipientType2) => {
|
|
560
|
+
RecipientType2[RecipientType2["GuardIdentifier"] = 0] = "GuardIdentifier";
|
|
561
|
+
RecipientType2[RecipientType2["Entity"] = 1] = "Entity";
|
|
562
|
+
RecipientType2[RecipientType2["Signer"] = 2] = "Signer";
|
|
563
|
+
return RecipientType2;
|
|
564
|
+
})(RecipientType || {});
|
|
565
|
+
function serviceFn(name) {
|
|
566
|
+
return `${PackageAddress}::service::${name}`;
|
|
567
|
+
}
|
|
568
|
+
function demandFn(name) {
|
|
569
|
+
return `${PackageAddress}::demand::${name}`;
|
|
570
|
+
}
|
|
571
|
+
function machineFn(name) {
|
|
572
|
+
return `${PackageAddress}::machine::${name}`;
|
|
573
|
+
}
|
|
574
|
+
function contactFn(name) {
|
|
575
|
+
return `${PackageAddress}::contact::${name}`;
|
|
576
|
+
}
|
|
577
|
+
function treasuryFn(name) {
|
|
578
|
+
return `${PackageAddress}::treasury::${name}`;
|
|
579
|
+
}
|
|
580
|
+
function arbitrationFn(name) {
|
|
581
|
+
return `${PackageAddress}::arbitration::${name}`;
|
|
582
|
+
}
|
|
583
|
+
function repositoryFn(name) {
|
|
584
|
+
return `${PackageAddress}::repository::${name}`;
|
|
585
|
+
}
|
|
586
|
+
function rewardFn(name) {
|
|
587
|
+
return `${PackageAddress}::reward::${name}`;
|
|
588
|
+
}
|
|
589
|
+
var ObjectType = /* @__PURE__ */ ((ObjectType2) => {
|
|
590
|
+
ObjectType2["Permission"] = "Permission";
|
|
591
|
+
ObjectType2["Repository"] = "Repository";
|
|
592
|
+
ObjectType2["Arb"] = "Arb";
|
|
593
|
+
ObjectType2["Arbitration"] = "Arbitration";
|
|
594
|
+
ObjectType2["Service"] = "Service";
|
|
595
|
+
ObjectType2["Machine"] = "Machine";
|
|
596
|
+
ObjectType2["Order"] = "Order";
|
|
597
|
+
ObjectType2["Progress"] = "Progress";
|
|
598
|
+
ObjectType2["Payment"] = "Payment";
|
|
599
|
+
ObjectType2["Treasury"] = "Treasury";
|
|
600
|
+
ObjectType2["Guard"] = "Guard";
|
|
601
|
+
ObjectType2["Demand"] = "Demand";
|
|
602
|
+
ObjectType2["Passport"] = "Passport";
|
|
603
|
+
ObjectType2["Allocation"] = "Allocation";
|
|
604
|
+
ObjectType2["Resource"] = "Resource";
|
|
605
|
+
ObjectType2["Reward"] = "Reward";
|
|
606
|
+
ObjectType2["Discount"] = "Discount";
|
|
607
|
+
ObjectType2["EntityRegistrar"] = "EntityRegistrar";
|
|
608
|
+
ObjectType2["EntityLinker"] = "EntityLinker";
|
|
609
|
+
ObjectType2["Proof"] = "Proof";
|
|
610
|
+
ObjectType2["Contact"] = "Contact";
|
|
611
|
+
ObjectType2["WReceivedObject"] = "WReceivedObject";
|
|
612
|
+
ObjectType2["TableItem_ProgressHistory"] = "TableItem_ProgressHistory";
|
|
613
|
+
ObjectType2["TableItem_PermissionPerm"] = "TableItem_PermissionPerm";
|
|
614
|
+
ObjectType2["TableItem_DemandPresenter"] = "TableItem_DemandPresenter";
|
|
615
|
+
ObjectType2["TableItem_MachineNode"] = "TableItem_MachineNode";
|
|
616
|
+
ObjectType2["TableItem_TreasuryHistory"] = "TableItem_TreasuryHistory";
|
|
617
|
+
ObjectType2["TableItem_RepositoryData"] = "TableItem_RepositoryData";
|
|
618
|
+
ObjectType2["TableItem_RewardRecord"] = "TableItem_RewardRecord";
|
|
619
|
+
ObjectType2["TableItem_EntityLinker"] = "TableItem_EntityLinker";
|
|
620
|
+
ObjectType2["TableItem_AddressMark"] = "TableItem_AddressMark";
|
|
621
|
+
ObjectType2["TableItem_EntityRegistrar"] = "TableItem_EntityRegistrar";
|
|
622
|
+
return ObjectType2;
|
|
623
|
+
})(ObjectType || {});
|
|
624
|
+
const ENTITY_LINKER_ADDRESS = "0xaaa";
|
|
625
|
+
const ENTITY_REGISTRAR_ADDRESS = "0xaab";
|