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,73 @@
|
|
|
1
|
+
import type { Transaction } from "../../transactions/index.js";
|
|
2
|
+
import type { CallEnv, OrderAddress, OrderObject, PassportObject } from "../common.js";
|
|
3
|
+
import type { AccountOrMark_Address, ManyAccountOrMark_Address } from "../local/index.js";
|
|
4
|
+
import type { ObjectService } from "../query/object.js";
|
|
5
|
+
import type { ReceivedObjects, ReceivedObjectsOrRecently } from "../query/received.js";
|
|
6
|
+
import type { CallResult } from "./base.js";
|
|
7
|
+
import { CallBase } from "./base.js";
|
|
8
|
+
import type { GuardSubmissionToFill } from "./guard.js";
|
|
9
|
+
import type { ProgressNext } from "./progress.js";
|
|
10
|
+
import type { CompensationClaim } from "./service.js";
|
|
11
|
+
export interface CallOrder_Data {
|
|
12
|
+
object: string;
|
|
13
|
+
agent?: ManyAccountOrMark_Address;
|
|
14
|
+
required_info?: string | null;
|
|
15
|
+
progress?: {
|
|
16
|
+
operation: ProgressNext;
|
|
17
|
+
hold: boolean;
|
|
18
|
+
adminUnhold?: boolean;
|
|
19
|
+
message?: string;
|
|
20
|
+
} | {
|
|
21
|
+
operation: ProgressNext;
|
|
22
|
+
message?: string;
|
|
23
|
+
};
|
|
24
|
+
arb_confirm?: {
|
|
25
|
+
arb: string;
|
|
26
|
+
confirm: boolean;
|
|
27
|
+
description?: string;
|
|
28
|
+
proposition?: string[];
|
|
29
|
+
};
|
|
30
|
+
arb_objection?: {
|
|
31
|
+
arb: string;
|
|
32
|
+
objection: string;
|
|
33
|
+
};
|
|
34
|
+
arb_claim_compensation?: {
|
|
35
|
+
arb: string;
|
|
36
|
+
};
|
|
37
|
+
receive?: ReceivedObjectsOrRecently;
|
|
38
|
+
transfer_to?: AccountOrMark_Address;
|
|
39
|
+
}
|
|
40
|
+
interface ServiceInfo {
|
|
41
|
+
object: ObjectService;
|
|
42
|
+
type: string;
|
|
43
|
+
}
|
|
44
|
+
export declare class CallOrder extends CallBase {
|
|
45
|
+
data: CallOrder_Data;
|
|
46
|
+
object_address: string | undefined;
|
|
47
|
+
service: ServiceInfo | undefined;
|
|
48
|
+
constructor(data: CallOrder_Data);
|
|
49
|
+
protected prepare(env: CallEnv): Promise<void>;
|
|
50
|
+
call(env: CallEnv): Promise<CallResult>;
|
|
51
|
+
private get_service;
|
|
52
|
+
operate(env: CallEnv, tx: Transaction, _passport?: PassportObject, _submission?: GuardSubmissionToFill[]): Promise<void>;
|
|
53
|
+
private get_arb;
|
|
54
|
+
private check_arb;
|
|
55
|
+
}
|
|
56
|
+
export declare function orderFn(name: string): string;
|
|
57
|
+
export declare const MAX_AGENT_COUNT = 10;
|
|
58
|
+
export declare const MAX_DISPUTE_COUNT = 10;
|
|
59
|
+
export interface OwnerChange {
|
|
60
|
+
order: OrderObject;
|
|
61
|
+
new_owner: AccountOrMark_Address;
|
|
62
|
+
}
|
|
63
|
+
export interface AgentSet {
|
|
64
|
+
order: OrderObject;
|
|
65
|
+
agents: string[];
|
|
66
|
+
}
|
|
67
|
+
export declare function create(tx: Transaction, order: OrderObject): OrderAddress;
|
|
68
|
+
export declare function owner_change(tx: Transaction, param: OwnerChange): Promise<void>;
|
|
69
|
+
export declare function agent_set(tx: Transaction, param: AgentSet): void;
|
|
70
|
+
export declare function owner_receive(tx: Transaction, order: OrderObject, param: ReceivedObjects): Promise<void | number>;
|
|
71
|
+
export declare function order_required_info_update(tx: Transaction, order: OrderObject, im_or_proof: string | null | undefined): Promise<void>;
|
|
72
|
+
export declare function compensation_claim(tx: Transaction, param: CompensationClaim): void;
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,485 @@
|
|
|
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 __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21
|
+
var order_exports = {};
|
|
22
|
+
__export(order_exports, {
|
|
23
|
+
CallOrder: () => CallOrder,
|
|
24
|
+
MAX_AGENT_COUNT: () => MAX_AGENT_COUNT,
|
|
25
|
+
MAX_DISPUTE_COUNT: () => MAX_DISPUTE_COUNT,
|
|
26
|
+
agent_set: () => agent_set,
|
|
27
|
+
compensation_claim: () => compensation_claim,
|
|
28
|
+
create: () => create,
|
|
29
|
+
orderFn: () => orderFn,
|
|
30
|
+
order_required_info_update: () => order_required_info_update,
|
|
31
|
+
owner_change: () => owner_change,
|
|
32
|
+
owner_receive: () => owner_receive
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(order_exports);
|
|
35
|
+
var import_common = require("../common.js");
|
|
36
|
+
var import_exception = require("../exception.js");
|
|
37
|
+
var import_local = require("../local/index.js");
|
|
38
|
+
var import_local2 = require("../local/local.js");
|
|
39
|
+
var import_object = require("../query/object.js");
|
|
40
|
+
var import_received = require("../query/received.js");
|
|
41
|
+
var import_util = require("../query/util.js");
|
|
42
|
+
var import_util2 = require("../util.js");
|
|
43
|
+
var import_arb = require("./arb.js");
|
|
44
|
+
var import_base = require("./base.js");
|
|
45
|
+
var import_progress = require("./progress.js");
|
|
46
|
+
class CallOrder extends import_base.CallBase {
|
|
47
|
+
constructor(data) {
|
|
48
|
+
super();
|
|
49
|
+
__publicField(this, "data");
|
|
50
|
+
__publicField(this, "object_address");
|
|
51
|
+
__publicField(this, "service");
|
|
52
|
+
this.data = data;
|
|
53
|
+
}
|
|
54
|
+
async prepare(env) {
|
|
55
|
+
await super.prepare(env);
|
|
56
|
+
if (!this.object_address) {
|
|
57
|
+
this.object_address = await (0, import_common.GetObjectExisted)(this.data?.object);
|
|
58
|
+
}
|
|
59
|
+
if (this.object_address) {
|
|
60
|
+
await this.update_content(
|
|
61
|
+
env,
|
|
62
|
+
import_object.ObjectType.Order,
|
|
63
|
+
this.object_address
|
|
64
|
+
);
|
|
65
|
+
if (!this.content) {
|
|
66
|
+
(0, import_exception.W_ERROR)(
|
|
67
|
+
import_exception.WErrors.InvalidParam,
|
|
68
|
+
"CallOrder_Data.data.object:" + this.object_address
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
} else {
|
|
72
|
+
(0, import_exception.W_ERROR)(
|
|
73
|
+
import_exception.WErrors.InvalidParam,
|
|
74
|
+
"CallOrder_Data.data.object:" + this.data?.object
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
async call(env) {
|
|
79
|
+
await this.prepare(env);
|
|
80
|
+
const guards = [];
|
|
81
|
+
const add_guard = (guard) => {
|
|
82
|
+
if (!guards.includes(guard)) {
|
|
83
|
+
guards.push(guard);
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
const orderObj = this.content;
|
|
87
|
+
if (this.data.progress != null) {
|
|
88
|
+
if (!orderObj.machine || !orderObj.progress) {
|
|
89
|
+
(0, import_exception.W_ERROR)(
|
|
90
|
+
import_exception.WErrors.InvalidParam,
|
|
91
|
+
"CallOrder_Data.data.progress error on progress not set"
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
const r = await (0, import_object.query_objects)({
|
|
95
|
+
objects: [orderObj.progress],
|
|
96
|
+
no_cache: env.no_cache,
|
|
97
|
+
network: env.network
|
|
98
|
+
});
|
|
99
|
+
if (!r.objects || r.objects.length !== 1 || r.objects[0].type !== import_object.ObjectType.Progress) {
|
|
100
|
+
(0, import_exception.W_ERROR)(
|
|
101
|
+
import_exception.WErrors.InvalidParam,
|
|
102
|
+
"CallOrder_Data.data.progress fetch error"
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
const progressObj = r.objects[0];
|
|
106
|
+
const f = await (0, import_progress.getMachineNodeForward)(
|
|
107
|
+
env,
|
|
108
|
+
progressObj.machine,
|
|
109
|
+
progressObj.current,
|
|
110
|
+
this.data.progress.operation.next_node_name,
|
|
111
|
+
this.data.progress.operation.forward
|
|
112
|
+
);
|
|
113
|
+
if (f) {
|
|
114
|
+
if (f.guard) {
|
|
115
|
+
add_guard(f.guard.guard);
|
|
116
|
+
}
|
|
117
|
+
} else {
|
|
118
|
+
(0, import_exception.W_ERROR)(
|
|
119
|
+
import_exception.WErrors.InvalidParam,
|
|
120
|
+
`CallOrder_Data.data.progress.operation.forward:${this.data?.progress.operation.forward} not found`
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (guards.length > 0) {
|
|
125
|
+
return await this.check_guard_and_call(env, guards);
|
|
126
|
+
}
|
|
127
|
+
return await this.exec(env);
|
|
128
|
+
}
|
|
129
|
+
async get_service(env) {
|
|
130
|
+
if (!this.service && this.content) {
|
|
131
|
+
const s = await (0, import_util.queryObjectWithType)(
|
|
132
|
+
env,
|
|
133
|
+
this.content.service,
|
|
134
|
+
import_object.ObjectType.Service,
|
|
135
|
+
"service::Service"
|
|
136
|
+
);
|
|
137
|
+
if (s) {
|
|
138
|
+
this.service = {
|
|
139
|
+
object: s,
|
|
140
|
+
type: (0, import_util2.parseObjectType)(
|
|
141
|
+
s.type_raw,
|
|
142
|
+
"service::Service"
|
|
143
|
+
)
|
|
144
|
+
};
|
|
145
|
+
if (!this.service.type) {
|
|
146
|
+
(0, import_exception.W_ERROR)(
|
|
147
|
+
import_exception.WErrors.IsValidArgType,
|
|
148
|
+
`CallOrder_Data.data.order_required_info error on service ${JSON.stringify(this.service.object)} type`
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
if (!this.service) {
|
|
154
|
+
(0, import_exception.W_ERROR)(
|
|
155
|
+
import_exception.WErrors.InvalidParam,
|
|
156
|
+
`CallOrder_Data.data.order_required_info error on service ${this.content.service}`
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
return this.service;
|
|
160
|
+
}
|
|
161
|
+
async operate(env, tx, _passport, _submission) {
|
|
162
|
+
const content = this.content;
|
|
163
|
+
if (this.data.agent != null) {
|
|
164
|
+
agent_set(tx, {
|
|
165
|
+
order: (0, import_common.toTxObject)(tx, this.object_address),
|
|
166
|
+
agents: await (0, import_local.GetManyAccountOrMark_Address)(this.data.agent)
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
if (this.data.required_info !== void 0) {
|
|
170
|
+
await order_required_info_update(
|
|
171
|
+
tx,
|
|
172
|
+
(0, import_common.toTxObject)(tx, this.object_address),
|
|
173
|
+
this.data.required_info
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
if (this.data.progress != null) {
|
|
177
|
+
if (!content.machine) {
|
|
178
|
+
(0, import_exception.W_ERROR)(
|
|
179
|
+
import_exception.WErrors.InvalidParam,
|
|
180
|
+
"CallOrder_Data.data.progress fail with machine invalid for this order"
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
const r = await (0, import_object.query_objects)({
|
|
184
|
+
objects: [content.machine],
|
|
185
|
+
no_cache: env.no_cache,
|
|
186
|
+
network: env.network
|
|
187
|
+
});
|
|
188
|
+
if (r.objects && r.objects.length === 1 && r.objects[0].type === import_object.ObjectType.Machine) {
|
|
189
|
+
const machine = r.objects[0];
|
|
190
|
+
if ("hold" in this.data.progress) {
|
|
191
|
+
(0, import_progress.hold)(
|
|
192
|
+
tx,
|
|
193
|
+
this.object_address,
|
|
194
|
+
machine.object,
|
|
195
|
+
machine.permission,
|
|
196
|
+
this.data.progress.operation.next_node_name,
|
|
197
|
+
this.data.progress.operation.forward,
|
|
198
|
+
this.data.progress.message ?? "",
|
|
199
|
+
this.data.progress.hold,
|
|
200
|
+
this.object_address,
|
|
201
|
+
_passport
|
|
202
|
+
);
|
|
203
|
+
} else {
|
|
204
|
+
(0, import_progress.accomplish)(
|
|
205
|
+
tx,
|
|
206
|
+
this.object_address,
|
|
207
|
+
machine.object,
|
|
208
|
+
machine.permission,
|
|
209
|
+
this.data.progress.operation.next_node_name,
|
|
210
|
+
this.data.progress.operation.forward,
|
|
211
|
+
this.data.progress.message ?? "",
|
|
212
|
+
this.object_address,
|
|
213
|
+
_passport
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
} else {
|
|
217
|
+
(0, import_exception.W_ERROR)(
|
|
218
|
+
import_exception.WErrors.InvalidParam,
|
|
219
|
+
"CallOrder_Data.data.progress fail with machine invalid for this order"
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
if (this.data.arb_confirm != null) {
|
|
224
|
+
const arb = await this.get_arb(env, this.data.arb_confirm.arb);
|
|
225
|
+
this.check_arb(content, arb, import_object.ArbStatus.Principal_confirming);
|
|
226
|
+
if (this.data.arb_confirm.proposition !== void 0) {
|
|
227
|
+
if (this.data.arb_confirm.proposition.length > import_arb.MAX_PROPOSITION_COUNT) {
|
|
228
|
+
(0, import_exception.W_ERROR)(
|
|
229
|
+
import_exception.WErrors.InvalidParam,
|
|
230
|
+
"CallOrder_Data.data.arb_confirm.proposition length must be less than or equal to " + import_arb.MAX_PROPOSITION_COUNT
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
(0, import_arb.proposition_change)(
|
|
234
|
+
tx,
|
|
235
|
+
arb.object.object,
|
|
236
|
+
arb.type,
|
|
237
|
+
(0, import_common.toTxObject)(tx, this.object_address),
|
|
238
|
+
this.data.arb_confirm.proposition,
|
|
239
|
+
this.data.arb_confirm.description,
|
|
240
|
+
this.data.arb_confirm.confirm
|
|
241
|
+
);
|
|
242
|
+
} else if (this.data.arb_confirm.description !== void 0) {
|
|
243
|
+
(0, import_arb.description_change)(
|
|
244
|
+
tx,
|
|
245
|
+
arb.object.object,
|
|
246
|
+
arb.type,
|
|
247
|
+
(0, import_common.toTxObject)(tx, this.object_address),
|
|
248
|
+
this.data.arb_confirm.description,
|
|
249
|
+
this.data.arb_confirm.confirm
|
|
250
|
+
);
|
|
251
|
+
} else {
|
|
252
|
+
(0, import_arb.principal_confirm)(
|
|
253
|
+
tx,
|
|
254
|
+
arb.object.object,
|
|
255
|
+
arb.type,
|
|
256
|
+
(0, import_common.toTxObject)(tx, this.object_address),
|
|
257
|
+
this.data.arb_confirm.confirm
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
if (this.data.arb_objection != null) {
|
|
262
|
+
const arb = await this.get_arb(env, this.data.arb_objection.arb);
|
|
263
|
+
this.check_arb(content, arb, import_object.ArbStatus.Arbitrated);
|
|
264
|
+
(0, import_arb.objection)(
|
|
265
|
+
tx,
|
|
266
|
+
arb.object.object,
|
|
267
|
+
arb.type,
|
|
268
|
+
(0, import_common.toTxObject)(tx, this.object_address),
|
|
269
|
+
this.data.arb_objection.objection
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
if (this.data.arb_claim_compensation) {
|
|
273
|
+
const arb = await this.get_arb(
|
|
274
|
+
env,
|
|
275
|
+
this.data.arb_claim_compensation.arb
|
|
276
|
+
);
|
|
277
|
+
this.check_arb(content, arb, import_object.ArbStatus.Arbitrated);
|
|
278
|
+
const service = await this.get_service(env);
|
|
279
|
+
compensation_claim(tx, {
|
|
280
|
+
service: service.object.object,
|
|
281
|
+
service_type: service.type,
|
|
282
|
+
arbitration_object: arb.object.arbitration,
|
|
283
|
+
arbitration_type: arb.type,
|
|
284
|
+
order: (0, import_common.toTxObject)(tx, this.object_address),
|
|
285
|
+
arb: arb.object.object
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
if (this.data.receive != null && this.object_address) {
|
|
289
|
+
if (this.data.receive === "recently") {
|
|
290
|
+
this.data.receive = await (0, import_received.query_received)({
|
|
291
|
+
object: this.object_address,
|
|
292
|
+
all_type: true,
|
|
293
|
+
no_cache: env.no_cache,
|
|
294
|
+
network: env.network
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
await owner_receive(
|
|
298
|
+
tx,
|
|
299
|
+
(0, import_common.toTxObject)(tx, this.object_address),
|
|
300
|
+
this.data.receive
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
if (this.data.transfer_to != null) {
|
|
304
|
+
await owner_change(tx, {
|
|
305
|
+
order: (0, import_common.toTxObject)(tx, this.object_address),
|
|
306
|
+
new_owner: this.data.transfer_to
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
async get_arb(env, arb_address) {
|
|
311
|
+
const arb = await (0, import_util.queryObjectWithType)(
|
|
312
|
+
env,
|
|
313
|
+
arb_address,
|
|
314
|
+
import_object.ObjectType.Arb,
|
|
315
|
+
"arb::Arb"
|
|
316
|
+
);
|
|
317
|
+
if (!arb) {
|
|
318
|
+
(0, import_exception.W_ERROR)(import_exception.WErrors.InvalidParam, `Arb ${arb_address} not found`);
|
|
319
|
+
}
|
|
320
|
+
const arb_data = arb;
|
|
321
|
+
const ty = (0, import_util2.parseObjectType)(arb_data.type_raw, "arb::Arb");
|
|
322
|
+
if (!ty) {
|
|
323
|
+
(0, import_exception.W_ERROR)(
|
|
324
|
+
import_exception.WErrors.IsValidArgType,
|
|
325
|
+
`Arb ${arb_address} type ${arb_data.type_raw} is not valid`
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
return { object: arb_data, type: ty };
|
|
329
|
+
}
|
|
330
|
+
check_arb(order, arb, status) {
|
|
331
|
+
if (arb.object.status !== status) {
|
|
332
|
+
(0, import_exception.W_ERROR)(
|
|
333
|
+
import_exception.WErrors.InvalidParam,
|
|
334
|
+
`arb ${arb.object.object} status ${arb.object.status} not ${status}`
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
if (arb.object.order !== this.object_address) {
|
|
338
|
+
(0, import_exception.W_ERROR)(
|
|
339
|
+
import_exception.WErrors.InvalidParam,
|
|
340
|
+
`arb ${arb.object.object} order ${arb.object.order} not ${this.object_address}`
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
if (order.claimed_by) {
|
|
344
|
+
(0, import_exception.W_ERROR)(
|
|
345
|
+
import_exception.WErrors.InvalidParam,
|
|
346
|
+
`arb ${arb.object.object} error on order ${this.object_address} already disputed by ${order.claimed_by}`
|
|
347
|
+
);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
function orderFn(name) {
|
|
352
|
+
return `${import_common.PackageAddress}::order::${name}`;
|
|
353
|
+
}
|
|
354
|
+
const MAX_AGENT_COUNT = 10;
|
|
355
|
+
const MAX_DISPUTE_COUNT = 10;
|
|
356
|
+
function create(tx, order) {
|
|
357
|
+
(0, import_util2.validObjects)([order]);
|
|
358
|
+
return tx.moveCall({
|
|
359
|
+
target: orderFn("create"),
|
|
360
|
+
arguments: [(0, import_common.toTxObject)(tx, order)]
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
async function owner_change(tx, param) {
|
|
364
|
+
const new_owner = await (0, import_local.GetAccountOrMark_Address)(param.new_owner);
|
|
365
|
+
if (!new_owner) {
|
|
366
|
+
(0, import_exception.W_ERROR)(
|
|
367
|
+
import_exception.WErrors.InvalidParam,
|
|
368
|
+
`CallOrder_Data.data.new_owner:${param.new_owner}`
|
|
369
|
+
);
|
|
370
|
+
}
|
|
371
|
+
(0, import_util2.validObjects)([param.order]);
|
|
372
|
+
tx.moveCall({
|
|
373
|
+
target: orderFn("owner_change"),
|
|
374
|
+
arguments: [(0, import_common.toTxObject)(tx, param.order), tx.pure.address(new_owner)]
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
function agent_set(tx, param) {
|
|
378
|
+
(0, import_util2.validObjects)([param.order, ...param.agents]);
|
|
379
|
+
tx.moveCall({
|
|
380
|
+
target: orderFn("agent_set"),
|
|
381
|
+
arguments: [
|
|
382
|
+
(0, import_common.toTxObject)(tx, param.order),
|
|
383
|
+
tx.pure.vector("address", param.agents)
|
|
384
|
+
]
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
async function owner_receive(tx, order, param) {
|
|
388
|
+
(0, import_util2.validObjects)([order]);
|
|
389
|
+
if (Array.isArray(param)) {
|
|
390
|
+
for (const item of param) {
|
|
391
|
+
if (!item.type || !(0, import_common.IsValidArgType)(item.type)) {
|
|
392
|
+
(0, import_exception.W_ERROR)(import_exception.WErrors.IsValidArgType, `type ${item.type} is invalid`);
|
|
393
|
+
}
|
|
394
|
+
(0, import_util2.validObjects)([item.id]);
|
|
395
|
+
tx.moveCall({
|
|
396
|
+
target: orderFn("owner_receive_object"),
|
|
397
|
+
arguments: [(0, import_common.toTxObject)(tx, order), (0, import_common.toTxObject)(tx, item.id)],
|
|
398
|
+
typeArguments: [item.type]
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
} else {
|
|
402
|
+
const match = param.token_type.match(/CoinWrapper<([^>]+)>/);
|
|
403
|
+
if (!match) {
|
|
404
|
+
(0, import_exception.W_ERROR)(
|
|
405
|
+
import_exception.WErrors.IsValidArgType,
|
|
406
|
+
`Invalid CoinWrapper type: ${param.token_type}`
|
|
407
|
+
);
|
|
408
|
+
}
|
|
409
|
+
const t = match[1];
|
|
410
|
+
if (!(0, import_common.IsValidArgType)(t)) {
|
|
411
|
+
(0, import_exception.W_ERROR)(import_exception.WErrors.IsValidArgType, `Invalid CoinWrapper type: ${t}`);
|
|
412
|
+
}
|
|
413
|
+
for (const item of param.received) {
|
|
414
|
+
const [r, p] = await Promise.all([
|
|
415
|
+
import_local2.LocalMark.Instance().get_address(item.id),
|
|
416
|
+
import_local2.LocalMark.Instance().get_address(item.payment)
|
|
417
|
+
]);
|
|
418
|
+
if (!r || !p) {
|
|
419
|
+
(0, import_exception.W_ERROR)(
|
|
420
|
+
import_exception.WErrors.IsValidArgType,
|
|
421
|
+
`Received ${item.id} or Payment ${item.payment} is invalid`
|
|
422
|
+
);
|
|
423
|
+
}
|
|
424
|
+
tx.moveCall({
|
|
425
|
+
target: orderFn("owner_receive"),
|
|
426
|
+
arguments: [
|
|
427
|
+
(0, import_common.toTxObject)(tx, order),
|
|
428
|
+
(0, import_common.toTxObject)(tx, r),
|
|
429
|
+
(0, import_common.toTxObject)(tx, p)
|
|
430
|
+
],
|
|
431
|
+
typeArguments: [t]
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
async function order_required_info_update(tx, order, im_or_proof) {
|
|
437
|
+
(0, import_util2.validObjects)([order]);
|
|
438
|
+
if (im_or_proof !== void 0) {
|
|
439
|
+
im_or_proof = await import_local2.LocalMark.Instance().get_address(im_or_proof) ?? null;
|
|
440
|
+
if (!im_or_proof) {
|
|
441
|
+
(0, import_exception.W_ERROR)(
|
|
442
|
+
import_exception.WErrors.InvalidParam,
|
|
443
|
+
`CallOrder_Data.data.required_info ${im_or_proof} not found`
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
tx.moveCall({
|
|
448
|
+
target: orderFn("required_info_update"),
|
|
449
|
+
arguments: [
|
|
450
|
+
(0, import_common.toTxObject)(tx, order),
|
|
451
|
+
tx.pure.option("address", im_or_proof)
|
|
452
|
+
]
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
function compensation_claim(tx, param) {
|
|
456
|
+
if (!(0, import_common.IsValidArgType)(param.service_type)) {
|
|
457
|
+
(0, import_exception.W_ERROR)(
|
|
458
|
+
import_exception.WErrors.InvalidParam,
|
|
459
|
+
`Compensation claim service type ${param.service_type} is not valid`
|
|
460
|
+
);
|
|
461
|
+
}
|
|
462
|
+
if (!(0, import_common.IsValidArgType)(param.arbitration_type)) {
|
|
463
|
+
(0, import_exception.W_ERROR)(
|
|
464
|
+
import_exception.WErrors.InvalidParam,
|
|
465
|
+
`Compensation claim arbitration type ${param.arbitration_type} is not valid`
|
|
466
|
+
);
|
|
467
|
+
}
|
|
468
|
+
(0, import_util2.validObjects)([
|
|
469
|
+
param.service,
|
|
470
|
+
param.arbitration_object,
|
|
471
|
+
param.order,
|
|
472
|
+
param.arb
|
|
473
|
+
]);
|
|
474
|
+
tx.moveCall({
|
|
475
|
+
target: (0, import_common.serviceFn)("compensation_claim"),
|
|
476
|
+
arguments: [
|
|
477
|
+
(0, import_common.toTxObject)(tx, param.service),
|
|
478
|
+
(0, import_common.toTxObject)(tx, param.arbitration_object),
|
|
479
|
+
(0, import_common.toTxObject)(tx, param.order),
|
|
480
|
+
(0, import_common.toTxObject)(tx, param.arb),
|
|
481
|
+
tx.object.clock()
|
|
482
|
+
],
|
|
483
|
+
typeArguments: [param.service_type, param.arbitration_type]
|
|
484
|
+
});
|
|
485
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { SuiTransactionBlockResponse } from "../../client/index.js";
|
|
2
|
+
import type { TransactionResult } from "../../transactions/index.js";
|
|
3
|
+
import { Transaction } from "../../transactions/index.js";
|
|
4
|
+
import type { PassportObject, GuardObject, CallEnv } from "../common.js";
|
|
5
|
+
import type { GuardSubmissionToFill, GuardTableItem } from "./guard.js";
|
|
6
|
+
export declare const MAX_GUARD_COUNT_ONCE = 20;
|
|
7
|
+
export interface SubmissionCall {
|
|
8
|
+
type: "submission";
|
|
9
|
+
guard: {
|
|
10
|
+
object: string;
|
|
11
|
+
impack: boolean;
|
|
12
|
+
}[];
|
|
13
|
+
submission: GuardSubmissionToFill[];
|
|
14
|
+
}
|
|
15
|
+
export declare const verify_guard: (env: CallEnv, guard_info: SubmissionCall) => Promise<SuiTransactionBlockResponse>;
|
|
16
|
+
export declare const get_guardSubmissions: (env: CallEnv, guards: string[]) => Promise<SubmissionCall>;
|
|
17
|
+
export declare function passportFn(name: string): string;
|
|
18
|
+
export declare const MAX_GUARD_COUNT = 20;
|
|
19
|
+
export declare function newPassport(tx: Transaction): PassportObject;
|
|
20
|
+
export declare function freeze(tx: Transaction, passport: PassportObject): void;
|
|
21
|
+
export declare function destroy(tx: Transaction, passport: PassportObject): void;
|
|
22
|
+
export declare const guardAdd: (tx: Transaction, passport: PassportObject, guard: GuardObject, submission: GuardTableItem[], impack: boolean) => Promise<void>;
|
|
23
|
+
export declare function guardClear(tx: Transaction, passport: PassportObject): void;
|
|
24
|
+
export declare function verify(tx: Transaction, passport: PassportObject): TransactionResult;
|