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
package/dist/protocol.js
DELETED
|
@@ -1,726 +0,0 @@
|
|
|
1
|
-
import { SuiClient } from '@mysten/sui/client';
|
|
2
|
-
import { Ed25519Keypair } from '@mysten/sui/keypairs/ed25519';
|
|
3
|
-
import { Transaction as TransactionBlock } from '@mysten/sui/transactions';
|
|
4
|
-
import { capitalize, IsValidAddress, IsValidArray, IsValidU128, IsValidU16, IsValidU256, IsValidU64, IsValidU8 } from './utils.js';
|
|
5
|
-
import { isValidSuiObjectId } from '@mysten/sui/utils';
|
|
6
|
-
import { ERROR, Errors } from './exception.js';
|
|
7
|
-
export var MODULES;
|
|
8
|
-
(function (MODULES) {
|
|
9
|
-
MODULES["machine"] = "machine";
|
|
10
|
-
MODULES["progress"] = "progress";
|
|
11
|
-
MODULES["repository"] = "repository";
|
|
12
|
-
MODULES["permission"] = "permission";
|
|
13
|
-
MODULES["passport"] = "passport";
|
|
14
|
-
MODULES["guard"] = "guard";
|
|
15
|
-
MODULES["demand"] = "demand";
|
|
16
|
-
MODULES["order"] = "order";
|
|
17
|
-
MODULES["service"] = "service";
|
|
18
|
-
MODULES["resource"] = "resource";
|
|
19
|
-
MODULES["entity"] = "entity";
|
|
20
|
-
MODULES["wowok"] = "wowok";
|
|
21
|
-
MODULES["treasury"] = "treasury";
|
|
22
|
-
MODULES["payment"] = "payment";
|
|
23
|
-
MODULES["arbitration"] = "arbitration";
|
|
24
|
-
MODULES["arb"] = "arb";
|
|
25
|
-
})(MODULES || (MODULES = {}));
|
|
26
|
-
export var OperatorType;
|
|
27
|
-
(function (OperatorType) {
|
|
28
|
-
OperatorType[OperatorType["TYPE_QUERY"] = 1] = "TYPE_QUERY";
|
|
29
|
-
OperatorType[OperatorType["TYPE_NUMBER_ADD"] = 2] = "TYPE_NUMBER_ADD";
|
|
30
|
-
OperatorType[OperatorType["TYPE_NUMBER_SUBTRACT"] = 3] = "TYPE_NUMBER_SUBTRACT";
|
|
31
|
-
OperatorType[OperatorType["TYPE_NUMBER_MULTIPLY"] = 4] = "TYPE_NUMBER_MULTIPLY";
|
|
32
|
-
OperatorType[OperatorType["TYPE_NUMBER_DEVIDE"] = 5] = "TYPE_NUMBER_DEVIDE";
|
|
33
|
-
OperatorType[OperatorType["TYPE_NUMBER_MOD"] = 6] = "TYPE_NUMBER_MOD";
|
|
34
|
-
OperatorType[OperatorType["TYPE_NUMBER_ADDRESS"] = 7] = "TYPE_NUMBER_ADDRESS";
|
|
35
|
-
OperatorType[OperatorType["TYPE_STRING_LOWERCASE"] = 8] = "TYPE_STRING_LOWERCASE";
|
|
36
|
-
OperatorType[OperatorType["TYPE_LOGIC_AS_U256_GREATER"] = 11] = "TYPE_LOGIC_AS_U256_GREATER";
|
|
37
|
-
OperatorType[OperatorType["TYPE_LOGIC_AS_U256_GREATER_EQUAL"] = 12] = "TYPE_LOGIC_AS_U256_GREATER_EQUAL";
|
|
38
|
-
OperatorType[OperatorType["TYPE_LOGIC_AS_U256_LESSER"] = 13] = "TYPE_LOGIC_AS_U256_LESSER";
|
|
39
|
-
OperatorType[OperatorType["TYPE_LOGIC_AS_U256_LESSER_EQUAL"] = 14] = "TYPE_LOGIC_AS_U256_LESSER_EQUAL";
|
|
40
|
-
OperatorType[OperatorType["TYPE_LOGIC_AS_U256_EQUAL"] = 15] = "TYPE_LOGIC_AS_U256_EQUAL";
|
|
41
|
-
OperatorType[OperatorType["TYPE_LOGIC_EQUAL"] = 16] = "TYPE_LOGIC_EQUAL";
|
|
42
|
-
OperatorType[OperatorType["TYPE_LOGIC_HAS_SUBSTRING"] = 17] = "TYPE_LOGIC_HAS_SUBSTRING";
|
|
43
|
-
OperatorType[OperatorType["TYPE_LOGIC_NOT"] = 18] = "TYPE_LOGIC_NOT";
|
|
44
|
-
OperatorType[OperatorType["TYPE_LOGIC_AND"] = 19] = "TYPE_LOGIC_AND";
|
|
45
|
-
OperatorType[OperatorType["TYPE_LOGIC_OR"] = 20] = "TYPE_LOGIC_OR";
|
|
46
|
-
OperatorType[OperatorType["TYPE_SAFE_U8"] = 21] = "TYPE_SAFE_U8";
|
|
47
|
-
OperatorType[OperatorType["TYPE_SAFE_U16"] = 22] = "TYPE_SAFE_U16";
|
|
48
|
-
OperatorType[OperatorType["TYPE_SAFE_U64"] = 23] = "TYPE_SAFE_U64";
|
|
49
|
-
})(OperatorType || (OperatorType = {}));
|
|
50
|
-
export const LogicsInfo = [
|
|
51
|
-
[OperatorType.TYPE_LOGIC_AS_U256_GREATER, 'Unsigned Integer >', 'The first item > anything that follows'],
|
|
52
|
-
[OperatorType.TYPE_LOGIC_AS_U256_GREATER_EQUAL, 'Unsigned Integer >=', 'The first item >= anything that follows'],
|
|
53
|
-
[OperatorType.TYPE_LOGIC_AS_U256_LESSER, 'Unsigned Integer <', 'The first item < anything that follows'],
|
|
54
|
-
[OperatorType.TYPE_LOGIC_AS_U256_LESSER_EQUAL, 'Unsigned Integer <=', 'The first item <= anything that follows'],
|
|
55
|
-
[OperatorType.TYPE_LOGIC_AS_U256_EQUAL, 'Unsigned Integer =', 'The first item = anything that follows'],
|
|
56
|
-
[OperatorType.TYPE_LOGIC_EQUAL, 'Equal', 'Data and type are exactly equal for all items'],
|
|
57
|
-
[OperatorType.TYPE_LOGIC_HAS_SUBSTRING, 'Has Sub String', 'The first string contains anything that follows'],
|
|
58
|
-
[OperatorType.TYPE_LOGIC_NOT, 'Not', 'Not operation'],
|
|
59
|
-
[OperatorType.TYPE_LOGIC_AND, 'And', 'All Items And operations'],
|
|
60
|
-
[OperatorType.TYPE_LOGIC_OR, 'Or', 'All Items Or operations'],
|
|
61
|
-
];
|
|
62
|
-
export var ValueType;
|
|
63
|
-
(function (ValueType) {
|
|
64
|
-
ValueType[ValueType["TYPE_BOOL"] = 100] = "TYPE_BOOL";
|
|
65
|
-
ValueType[ValueType["TYPE_ADDRESS"] = 101] = "TYPE_ADDRESS";
|
|
66
|
-
ValueType[ValueType["TYPE_STRING"] = 102] = "TYPE_STRING";
|
|
67
|
-
ValueType[ValueType["TYPE_U8"] = 103] = "TYPE_U8";
|
|
68
|
-
ValueType[ValueType["TYPE_U16"] = 104] = "TYPE_U16";
|
|
69
|
-
ValueType[ValueType["TYPE_U64"] = 105] = "TYPE_U64";
|
|
70
|
-
ValueType[ValueType["TYPE_U128"] = 106] = "TYPE_U128";
|
|
71
|
-
ValueType[ValueType["TYPE_U256"] = 107] = "TYPE_U256";
|
|
72
|
-
ValueType[ValueType["TYPE_VEC_BOOL"] = 108] = "TYPE_VEC_BOOL";
|
|
73
|
-
ValueType[ValueType["TYPE_VEC_ADDRESS"] = 109] = "TYPE_VEC_ADDRESS";
|
|
74
|
-
ValueType[ValueType["TYPE_VEC_STRING"] = 110] = "TYPE_VEC_STRING";
|
|
75
|
-
ValueType[ValueType["TYPE_VEC_U8"] = 111] = "TYPE_VEC_U8";
|
|
76
|
-
ValueType[ValueType["TYPE_VEC_U16"] = 112] = "TYPE_VEC_U16";
|
|
77
|
-
ValueType[ValueType["TYPE_VEC_U64"] = 113] = "TYPE_VEC_U64";
|
|
78
|
-
ValueType[ValueType["TYPE_VEC_U128"] = 114] = "TYPE_VEC_U128";
|
|
79
|
-
ValueType[ValueType["TYPE_VEC_U256"] = 115] = "TYPE_VEC_U256";
|
|
80
|
-
ValueType[ValueType["TYPE_VEC_VEC_U8"] = 116] = "TYPE_VEC_VEC_U8";
|
|
81
|
-
})(ValueType || (ValueType = {}));
|
|
82
|
-
export var RepositoryValueType;
|
|
83
|
-
(function (RepositoryValueType) {
|
|
84
|
-
RepositoryValueType[RepositoryValueType["Address"] = 200] = "Address";
|
|
85
|
-
RepositoryValueType[RepositoryValueType["Address_Vec"] = 201] = "Address_Vec";
|
|
86
|
-
RepositoryValueType[RepositoryValueType["PositiveNumber"] = 202] = "PositiveNumber";
|
|
87
|
-
RepositoryValueType[RepositoryValueType["PositiveNumber_Vec"] = 203] = "PositiveNumber_Vec";
|
|
88
|
-
RepositoryValueType[RepositoryValueType["String"] = 204] = "String";
|
|
89
|
-
RepositoryValueType[RepositoryValueType["String_Vec"] = 205] = "String_Vec";
|
|
90
|
-
RepositoryValueType[RepositoryValueType["Bool"] = 206] = "Bool";
|
|
91
|
-
})(RepositoryValueType || (RepositoryValueType = {}));
|
|
92
|
-
export const RepositoryValueTypeInfo = [
|
|
93
|
-
{ type: RepositoryValueType.String, name: 'string', description: 'String.', info: 'String' },
|
|
94
|
-
{ type: RepositoryValueType.Address, name: 'address', description: 'Object id or Personal address.', info: 'Address' },
|
|
95
|
-
{ type: RepositoryValueType.PositiveNumber, name: 'unsigned integer', description: 'Including u8, u16 ,..., u256', info: 'Unsigned Integer' },
|
|
96
|
-
{ type: RepositoryValueType.String_Vec, name: 'string vector', description: 'Vector of string.', info: 'String' },
|
|
97
|
-
{ type: RepositoryValueType.Address_Vec, name: 'address vector', description: 'Vector of address.', info: 'Address' },
|
|
98
|
-
{ type: RepositoryValueType.PositiveNumber_Vec, name: 'unsigned integer vector', description: 'Vector of unsigned integer', info: 'Unsigned Integer' },
|
|
99
|
-
{ type: RepositoryValueType.Bool, name: 'bool', description: 'True or False.', info: 'Bool' },
|
|
100
|
-
];
|
|
101
|
-
export const OperatorTypeArray = Object.values(OperatorType).filter((v) => typeof (v) === 'number');
|
|
102
|
-
export const ValueTypeArray = Object.values(ValueType).filter((v) => typeof (v) === 'number');
|
|
103
|
-
export const IsValidOperatorType = (type) => { return OperatorTypeArray.includes(type); };
|
|
104
|
-
export const IsValidValueType = (type) => { return ValueTypeArray.includes(type); };
|
|
105
|
-
export const IsNumberType = (type) => {
|
|
106
|
-
return type === ValueType.TYPE_U128 || type === ValueType.TYPE_U256 ||
|
|
107
|
-
type === ValueType.TYPE_U64 || type === ValueType.TYPE_U8;
|
|
108
|
-
};
|
|
109
|
-
export var ContextType;
|
|
110
|
-
(function (ContextType) {
|
|
111
|
-
ContextType[ContextType["TYPE_SIGNER"] = 60] = "TYPE_SIGNER";
|
|
112
|
-
ContextType[ContextType["TYPE_CLOCK"] = 61] = "TYPE_CLOCK";
|
|
113
|
-
ContextType[ContextType["TYPE_GUARD"] = 62] = "TYPE_GUARD";
|
|
114
|
-
ContextType[ContextType["TYPE_CONSTANT"] = 80] = "TYPE_CONSTANT";
|
|
115
|
-
ContextType[ContextType["TYPE_ORDER_PROGRESS"] = 30] = "TYPE_ORDER_PROGRESS";
|
|
116
|
-
ContextType[ContextType["TYPE_ORDER_MACHINE"] = 31] = "TYPE_ORDER_MACHINE";
|
|
117
|
-
ContextType[ContextType["TYPE_ORDER_SERVICE"] = 32] = "TYPE_ORDER_SERVICE";
|
|
118
|
-
ContextType[ContextType["TYPE_PROGRESS_MACHINE"] = 33] = "TYPE_PROGRESS_MACHINE";
|
|
119
|
-
ContextType[ContextType["TYPE_ARB_ORDER"] = 34] = "TYPE_ARB_ORDER";
|
|
120
|
-
ContextType[ContextType["TYPE_ARB_ARBITRATION"] = 35] = "TYPE_ARB_ARBITRATION";
|
|
121
|
-
ContextType[ContextType["TYPE_ARB_PROGRESS"] = 36] = "TYPE_ARB_PROGRESS";
|
|
122
|
-
ContextType[ContextType["TYPE_ARB_MACHINE"] = 37] = "TYPE_ARB_MACHINE";
|
|
123
|
-
ContextType[ContextType["TYPE_ARB_SERVICE"] = 38] = "TYPE_ARB_SERVICE";
|
|
124
|
-
})(ContextType || (ContextType = {}));
|
|
125
|
-
export const IsContextWitness = (type) => {
|
|
126
|
-
return typeof (type) === 'number' && type >= ContextType.TYPE_ORDER_PROGRESS && type <= ContextType.TYPE_ARB_SERVICE;
|
|
127
|
-
};
|
|
128
|
-
export const ContextWitnessRetType = (type) => {
|
|
129
|
-
if (IsContextWitness(type))
|
|
130
|
-
return ValueType.TYPE_ADDRESS;
|
|
131
|
-
};
|
|
132
|
-
export const WitnessObjectModule = (type) => {
|
|
133
|
-
switch (type) {
|
|
134
|
-
case ContextType.TYPE_ARB_ARBITRATION:
|
|
135
|
-
case ContextType.TYPE_ARB_ORDER:
|
|
136
|
-
case ContextType.TYPE_ARB_SERVICE:
|
|
137
|
-
case ContextType.TYPE_ARB_PROGRESS:
|
|
138
|
-
case ContextType.TYPE_ARB_MACHINE:
|
|
139
|
-
return MODULES.arb;
|
|
140
|
-
case ContextType.TYPE_ORDER_MACHINE:
|
|
141
|
-
case ContextType.TYPE_ORDER_SERVICE:
|
|
142
|
-
case ContextType.TYPE_ORDER_PROGRESS:
|
|
143
|
-
return MODULES.order;
|
|
144
|
-
case ContextType.TYPE_PROGRESS_MACHINE:
|
|
145
|
-
return MODULES.progress;
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
export const WitnessForModule = (type) => {
|
|
149
|
-
switch (type) {
|
|
150
|
-
case ContextType.TYPE_ARB_ARBITRATION:
|
|
151
|
-
return MODULES.arbitration;
|
|
152
|
-
case ContextType.TYPE_ORDER_MACHINE:
|
|
153
|
-
case ContextType.TYPE_ARB_MACHINE:
|
|
154
|
-
case ContextType.TYPE_PROGRESS_MACHINE:
|
|
155
|
-
return MODULES.machine;
|
|
156
|
-
case ContextType.TYPE_ORDER_SERVICE:
|
|
157
|
-
case ContextType.TYPE_ARB_SERVICE:
|
|
158
|
-
return MODULES.service;
|
|
159
|
-
case ContextType.TYPE_ORDER_PROGRESS:
|
|
160
|
-
case ContextType.TYPE_ARB_PROGRESS:
|
|
161
|
-
return MODULES.progress;
|
|
162
|
-
case ContextType.TYPE_ARB_ORDER:
|
|
163
|
-
return MODULES.order;
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
export const SER_VALUE = [
|
|
167
|
-
{ type: ValueType.TYPE_BOOL, name: 'bool', description: 'boolean', validator: (value) => { return (value === true || value === false); } },
|
|
168
|
-
{ type: ValueType.TYPE_ADDRESS, name: 'address', description: 'address or object-id', validator: IsValidAddress },
|
|
169
|
-
{ type: ContextType.TYPE_SIGNER, name: 'txn signer', description: "signer address of the transaction" },
|
|
170
|
-
{ type: ContextType.TYPE_GUARD, name: 'guard address', description: "current guard address" },
|
|
171
|
-
{ type: ContextType.TYPE_CLOCK, name: 'txn time', description: "u64 number for the transaction time" },
|
|
172
|
-
{ type: ContextType.TYPE_ARB_ARBITRATION, name: `address`, description: "witness Arb's Arbitration address" },
|
|
173
|
-
{ type: ContextType.TYPE_ARB_MACHINE, name: `address`, description: "witness Arb's Machine address" },
|
|
174
|
-
{ type: ContextType.TYPE_ARB_ORDER, name: `address`, description: "witness Arb's Order address" },
|
|
175
|
-
{ type: ContextType.TYPE_ARB_PROGRESS, name: `address`, description: "witness Arb's Progress address" },
|
|
176
|
-
{ type: ContextType.TYPE_ARB_SERVICE, name: `address`, description: "witness Arb's Service address" },
|
|
177
|
-
{ type: ContextType.TYPE_ORDER_MACHINE, name: `address`, description: "witness Order's Machine address" },
|
|
178
|
-
{ type: ContextType.TYPE_ORDER_PROGRESS, name: `address`, description: "witness Order's Progress address" },
|
|
179
|
-
{ type: ContextType.TYPE_ORDER_SERVICE, name: `address`, description: "witness Order's Service address" },
|
|
180
|
-
{ type: ContextType.TYPE_PROGRESS_MACHINE, name: `address`, description: "witness Progress's Machine address" },
|
|
181
|
-
{ type: ValueType.TYPE_U64, name: 'number', description: 'u64 number', validator: IsValidU64 },
|
|
182
|
-
{ type: ValueType.TYPE_U8, name: 'number', description: 'u8 number', validator: IsValidU8 },
|
|
183
|
-
{ type: ValueType.TYPE_U16, name: 'number', description: 'u16 number', validator: IsValidU16 },
|
|
184
|
-
{ type: ValueType.TYPE_VEC_U8, name: '[number]', description: 'u8 number array' },
|
|
185
|
-
{ type: ValueType.TYPE_U128, name: 'number', description: 'u128 number', validator: IsValidU128 },
|
|
186
|
-
{ type: ValueType.TYPE_VEC_ADDRESS, name: '[address]', description: 'address array' },
|
|
187
|
-
{ type: ValueType.TYPE_VEC_BOOL, name: '[bool]', description: 'boolean array' },
|
|
188
|
-
{ type: ValueType.TYPE_VEC_VEC_U8, name: '[[number]]', description: 'array of u8 number array' },
|
|
189
|
-
{ type: ValueType.TYPE_VEC_U64, name: '[number]', description: 'u64 number array' },
|
|
190
|
-
{ type: ValueType.TYPE_VEC_U16, name: '[number]', description: 'u16 number array' },
|
|
191
|
-
{ type: ValueType.TYPE_VEC_U128, name: '[number]', description: 'u128 number array' },
|
|
192
|
-
{ type: ValueType.TYPE_VEC_U256, name: '[number]', description: 'u256 number array' },
|
|
193
|
-
{ type: ValueType.TYPE_VEC_STRING, name: '[string]', description: 'utf8 string array' },
|
|
194
|
-
{ type: ValueType.TYPE_STRING, name: 'string', description: 'utf8 string', },
|
|
195
|
-
{ type: ValueType.TYPE_U256, name: 'number', description: 'u256 number', validator: IsValidU256 },
|
|
196
|
-
];
|
|
197
|
-
export var ENTRYPOINT;
|
|
198
|
-
(function (ENTRYPOINT) {
|
|
199
|
-
ENTRYPOINT["suimain"] = "sui mainnet";
|
|
200
|
-
ENTRYPOINT["suitest"] = "sui testnet";
|
|
201
|
-
ENTRYPOINT["wowokmain"] = "wowok mainnet";
|
|
202
|
-
ENTRYPOINT["wowoktest"] = "wowok testnet"; // wowok testnet
|
|
203
|
-
})(ENTRYPOINT || (ENTRYPOINT = {}));
|
|
204
|
-
const SUI_TEST_URL = 'https://fullnode.testnet.sui.io:443';
|
|
205
|
-
const SUI_MAIN_URL = 'https://fullnode.mainnet.sui.io:443';
|
|
206
|
-
const W_TEST_URL = 'https://fullnode.testnet.wowok.net:443';
|
|
207
|
-
const W_MAIN_URL = 'https://fullnode.mainnet.wowok.net:443';
|
|
208
|
-
const TESTNET = {
|
|
209
|
-
wowok: "0x6916ad0279d740e2c5187ab32acceef3b74df2717846f7c78cc4ae53e854ad9b",
|
|
210
|
-
wowok_origin: '0x6916ad0279d740e2c5187ab32acceef3b74df2717846f7c78cc4ae53e854ad9b',
|
|
211
|
-
base: '0xfd50c149ebb3309eb4e1d9c5e8a85ada9d9271d657981a67da68cd30b6a23c3d',
|
|
212
|
-
base_origin: '0xfd50c149ebb3309eb4e1d9c5e8a85ada9d9271d657981a67da68cd30b6a23c3d',
|
|
213
|
-
wowok_object: '0xfb67d811801f8c37e54b1dce3100ff2a419d646666b3feba4cdc4fdd8ac7dd08',
|
|
214
|
-
entity_object: '0xd013df0b1c8deb00fac0415c643c1f40902844702c03a0f3bbb48d292e35a229',
|
|
215
|
-
treasury_cap: '0x271a4442a2d2a8420f4ffdfa1834b298ac89803e52a7403c8f622cec3168fd64',
|
|
216
|
-
oracle_object: '0x8814376e89d2482c8701e3f32e48bf7a7e41f0fc5b10aa48d9e8148ce5565306',
|
|
217
|
-
coin_meta: '0x00636b37bafa1aa1152d4bf7a8344f243433b041284c550f21e7ce150fdf82f1',
|
|
218
|
-
};
|
|
219
|
-
const MAINNET = {
|
|
220
|
-
wowok: "0xb8e5c4de9c3e291e56f6293d26a062f95ab7fece9f5d1840ced3970735ec9636",
|
|
221
|
-
wowok_origin: "0xb8e5c4de9c3e291e56f6293d26a062f95ab7fece9f5d1840ced3970735ec9636",
|
|
222
|
-
base: "0xc20a07cf9f9a20d1880ea8bbb83cd0f97a9fe3ebff8e9c74cb2ba7929f9bf85d",
|
|
223
|
-
base_origin: "0xc20a07cf9f9a20d1880ea8bbb83cd0f97a9fe3ebff8e9c74cb2ba7929f9bf85d",
|
|
224
|
-
wowok_object: '0xd1ad1195fed7700d969d92a971882bf93f4c21356cc99a65e5765a66dcfca908',
|
|
225
|
-
entity_object: '0xd5a4c8597739877249539ebd2d1546f6ffc37d06f5e70a3d80a2721966155251',
|
|
226
|
-
treasury_cap: '0xe4a3f81fdafe87e455fafae58047dffe69d583b2a886fe2a35e799b46ff6f019',
|
|
227
|
-
oracle_object: '0x88892691df3f10f5a5489ca118a075dd1b0f128794d6e52c67bf680717aa0d32',
|
|
228
|
-
coin_meta: '0xf31d89f4786e6d00b01b8a481abae9d095c4661bc12b3989488b9a68b4005488',
|
|
229
|
-
};
|
|
230
|
-
export class Protocol {
|
|
231
|
-
constructor() {
|
|
232
|
-
this.packages = new Map();
|
|
233
|
-
this.signer = '';
|
|
234
|
-
this.wowok_object = '';
|
|
235
|
-
this.entity_object = '';
|
|
236
|
-
this.treasury_cap = '';
|
|
237
|
-
this.oracle_object = '';
|
|
238
|
-
this.machineFn = (fn) => { return `${this.packages.get('wowok')}::${MODULES.machine}::${fn}`; };
|
|
239
|
-
this.baseMachineFn = (fn) => { return `${this.packages.get('base')}::${MODULES.machine}::${fn}`; };
|
|
240
|
-
this.progressFn = (fn) => { return `${this.packages.get('wowok')}::${MODULES.progress}::${fn}`; };
|
|
241
|
-
this.baseRepositoryFn = (fn) => { return `${this.packages.get('base')}::${MODULES.repository}::${fn}`; };
|
|
242
|
-
this.repositoryFn = (fn) => { return `${this.packages.get('wowok')}::${MODULES.repository}::${fn}`; };
|
|
243
|
-
this.permissionFn = (fn) => { return `${this.packages.get('wowok')}::${MODULES.permission}::${fn}`; };
|
|
244
|
-
this.passportFn = (fn) => { return `${this.packages.get('wowok')}::${MODULES.passport}::${fn}`; };
|
|
245
|
-
this.demandFn = (fn) => { return `${this.packages.get('wowok')}::${MODULES.demand}::${fn}`; };
|
|
246
|
-
this.orderFn = (fn) => { return `${this.packages.get('wowok')}::${MODULES.order}::${fn}`; };
|
|
247
|
-
this.serviceFn = (fn) => { return `${this.packages.get('wowok')}::${MODULES.service}::${fn}`; };
|
|
248
|
-
this.resourceFn = (fn) => { return `${this.packages.get('wowok')}::${MODULES.resource}::${fn}`; };
|
|
249
|
-
this.entityFn = (fn) => { return `${this.packages.get('wowok')}::${MODULES.entity}::${fn}`; };
|
|
250
|
-
this.wowokFn = (fn) => { return `${this.packages.get('wowok')}::${MODULES.wowok}::${fn}`; };
|
|
251
|
-
this.treasuryFn = (fn) => { return `${this.packages.get('wowok')}::${MODULES.treasury}::${fn}`; };
|
|
252
|
-
this.paymentFn = (fn) => { return `${this.packages.get('wowok')}::${MODULES.payment}::${fn}`; };
|
|
253
|
-
this.guardFn = (fn) => { return `${this.packages.get('base')}::${MODULES.guard}::${fn}`; };
|
|
254
|
-
this.baseWowokFn = (fn) => { return `${this.packages.get('base')}::${MODULES.wowok}::${fn}`; };
|
|
255
|
-
this.arbitrationFn = (fn) => { return `${this.packages.get('wowok')}::${MODULES.arbitration}::${fn}`; };
|
|
256
|
-
this.arbFn = (fn) => { return `${this.packages.get('wowok')}::${MODULES.arb}::${fn}`; };
|
|
257
|
-
this.query = async (objects, options = { showContent: true }, network) => {
|
|
258
|
-
const ids = objects.map((value) => value.objectid);
|
|
259
|
-
const res = await Protocol.Client(network).call('sui_multiGetObjects', [ids, options]);
|
|
260
|
-
let ret = [];
|
|
261
|
-
for (let i = 0; i < res.length; i++) {
|
|
262
|
-
objects.forEach((object) => {
|
|
263
|
-
object.callback(this, res[i], object, options);
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
return res;
|
|
267
|
-
};
|
|
268
|
-
this.query_raw = async (objects, options = { showContent: true }, network) => {
|
|
269
|
-
return await Protocol.Client(network).call('sui_multiGetObjects', [objects, options]);
|
|
270
|
-
};
|
|
271
|
-
this.new_session = () => {
|
|
272
|
-
this.txb = new TransactionBlock();
|
|
273
|
-
return this.txb;
|
|
274
|
-
};
|
|
275
|
-
this.sessionCurrent = () => { return this.txb ? this.txb : this.new_session(); };
|
|
276
|
-
this.sign_excute = async (exes, priv_key, param, options = { showObjectChanges: true }, network) => {
|
|
277
|
-
exes.forEach((e) => { e(this, param); });
|
|
278
|
-
const keypair = Ed25519Keypair.fromSecretKey(priv_key);
|
|
279
|
-
const response = await Protocol.Client(network).signAndExecuteTransaction({
|
|
280
|
-
transaction: this.sessionCurrent(),
|
|
281
|
-
signer: keypair,
|
|
282
|
-
options,
|
|
283
|
-
});
|
|
284
|
-
this.txb = undefined; // reset the txb to undefine
|
|
285
|
-
return response;
|
|
286
|
-
};
|
|
287
|
-
this.WOWOK_TOKEN_TYPE = () => { return this.packages.get('base') + '::wowok::WOWOK'; };
|
|
288
|
-
this.WOWOK_COIN_TYPE = () => { return '0x2::coin::Coin<' + this.packages.get('base') + '::wowok::WOWOK>'; };
|
|
289
|
-
this.COINS_TYPE = () => {
|
|
290
|
-
switch (this.network) {
|
|
291
|
-
case ENTRYPOINT.suitest:
|
|
292
|
-
return this.CoinTypes_Testnet;
|
|
293
|
-
case ENTRYPOINT.suimain:
|
|
294
|
-
return this.CoinTypes_Mainnet;
|
|
295
|
-
}
|
|
296
|
-
;
|
|
297
|
-
return [];
|
|
298
|
-
};
|
|
299
|
-
this.update_coinType = (coinType, network) => {
|
|
300
|
-
if (!network)
|
|
301
|
-
network = this.network;
|
|
302
|
-
switch (network) {
|
|
303
|
-
case ENTRYPOINT.suitest:
|
|
304
|
-
var r = this.CoinTypes_Testnet.filter((v) => v?.type !== coinType.type);
|
|
305
|
-
r.push({ ...coinType });
|
|
306
|
-
this.CoinTypes_Testnet = r;
|
|
307
|
-
break;
|
|
308
|
-
case ENTRYPOINT.suimain:
|
|
309
|
-
var r = this.CoinTypes_Mainnet.filter((v) => v?.type !== coinType.type);
|
|
310
|
-
r.push({ ...coinType });
|
|
311
|
-
this.CoinTypes_Mainnet = r;
|
|
312
|
-
break;
|
|
313
|
-
}
|
|
314
|
-
;
|
|
315
|
-
};
|
|
316
|
-
this.explorerUrl = (objectid, type = 'object') => {
|
|
317
|
-
if (this.network === ENTRYPOINT.suitest) {
|
|
318
|
-
return 'https://testnet.suivision.xyz/' + type + '/' + objectid;
|
|
319
|
-
}
|
|
320
|
-
else if (this.network === ENTRYPOINT.suimain) {
|
|
321
|
-
return 'https://suivision.xyz/' + type + '/' + objectid;
|
|
322
|
-
}
|
|
323
|
-
;
|
|
324
|
-
return '';
|
|
325
|
-
};
|
|
326
|
-
this.CoinTypes_Testnet = [
|
|
327
|
-
{
|
|
328
|
-
type: TESTNET.base + '::wowok::WOWOK',
|
|
329
|
-
decimals: 9,
|
|
330
|
-
name: 'WoWok',
|
|
331
|
-
symbol: 'WOW',
|
|
332
|
-
description: 'https://wowok.net',
|
|
333
|
-
iconUrl: 'https://wowok.net/icon/logo.png',
|
|
334
|
-
id: TESTNET.coin_meta,
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
type: '0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI',
|
|
338
|
-
decimals: 9,
|
|
339
|
-
name: 'Sui',
|
|
340
|
-
symbol: 'SUI',
|
|
341
|
-
description: '',
|
|
342
|
-
iconUrl: null,
|
|
343
|
-
id: '0x587c29de216efd4219573e08a1f6964d4fa7cb714518c2c8a0f29abfa264327d'
|
|
344
|
-
}
|
|
345
|
-
];
|
|
346
|
-
this.CoinTypes_Mainnet = [
|
|
347
|
-
{
|
|
348
|
-
type: MAINNET.base + '::wowok::WOWOK',
|
|
349
|
-
decimals: 9,
|
|
350
|
-
name: 'WoWok',
|
|
351
|
-
symbol: 'WOW',
|
|
352
|
-
description: 'https://wowok.net',
|
|
353
|
-
iconUrl: "https://wowok.net/icon/logo.png",
|
|
354
|
-
id: MAINNET.coin_meta,
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
type: '0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI',
|
|
358
|
-
decimals: 9,
|
|
359
|
-
name: 'Sui',
|
|
360
|
-
symbol: 'SUI',
|
|
361
|
-
description: '',
|
|
362
|
-
iconUrl: null,
|
|
363
|
-
id: '0x9258181f5ceac8dbffb7030890243caed69a9599d2886d957a9cb7656af3bdb3'
|
|
364
|
-
},
|
|
365
|
-
{
|
|
366
|
-
type: '0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37::coin::COIN',
|
|
367
|
-
decimals: 8,
|
|
368
|
-
name: 'Aptos Coin',
|
|
369
|
-
symbol: 'APT',
|
|
370
|
-
description: '',
|
|
371
|
-
iconUrl: null,
|
|
372
|
-
id: '0xc969c5251f372c0f34c32759f1d315cf1ea0ee5e4454b52aea08778eacfdd0a8'
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
type: '0x356a26eb9e012a68958082340d4c4116e7f55615cf27affcff209cf0ae544f59::wal::WAL',
|
|
376
|
-
decimals: 9,
|
|
377
|
-
name: 'WAL Token',
|
|
378
|
-
symbol: 'WAL',
|
|
379
|
-
description: 'The native token for the Walrus Protocol.',
|
|
380
|
-
iconUrl: 'https://www.walrus.xyz/wal-icon.svg',
|
|
381
|
-
id: '0xcf8a31804ae40cb3e7183fe57320f87467a7750d4fa701bca1ffbb1edd37781e'
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
type: '0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP',
|
|
385
|
-
decimals: 6,
|
|
386
|
-
name: 'DeepBook Token',
|
|
387
|
-
symbol: 'DEEP',
|
|
388
|
-
description: 'The DEEP token secures the DeepBook protocol, the premier wholesale liquidity venue for on-chain trading.',
|
|
389
|
-
iconUrl: 'https://images.deepbook.tech/icon.svg',
|
|
390
|
-
id: '0x6e60b051a08fa836f5a7acd7c464c8d9825bc29c44657fe170fe9b8e1e4770c0'
|
|
391
|
-
},
|
|
392
|
-
{
|
|
393
|
-
type: '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC',
|
|
394
|
-
decimals: 6,
|
|
395
|
-
name: 'USDC',
|
|
396
|
-
symbol: 'USDC',
|
|
397
|
-
description: 'USDC is a US dollar-backed stablecoin issued by Circle. USDC is designed to provide a faster, safer, and more efficient way to send, spend, and exchange money around the world.',
|
|
398
|
-
iconUrl: 'https://circle.com/usdc-icon',
|
|
399
|
-
id: '0x69b7a7c3c200439c1b5f3b19d7d495d5966d5f08de66c69276152f8db3992ec6'
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
type: '0x7262fb2f7a3a14c888c438a3cd9b912469a58cf60f367352c46584262e8299aa::ika::IKA',
|
|
403
|
-
decimals: 9,
|
|
404
|
-
name: 'IKA Token',
|
|
405
|
-
symbol: 'IKA',
|
|
406
|
-
description: 'Ika Protocol.',
|
|
407
|
-
iconUrl: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAwIiBoZWlnaHQ9IjEwMDAiIHZpZXdCb3g9IjAgMCAxMDAwIDEwMDAiIGZpbGw9Im5vbmUiPiA8cmVjdCB3aWR0aD0iMTAwMCIgaGVpZ2h0PSIxMDAwIiBmaWxsPSIjRUUyQjVCIi8+IDxwYXRoIGQ9Ik02NzguNzQyIDU4OC45MzRWNDEwLjQ2N0M2NzguNzQyIDMxMS45MDIgNTk4Ljg0IDIzMiA1MDAuMjc1IDIzMlYyMzJDNDAxLjcxIDIzMiAzMjEuODA4IDMxMS45MDIgMzIxLjgwOCA0MTAuNDY3VjU4OC45MzQiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iNTcuMzIyOCIvPiA8cGF0aCBkPSJNNjc4Ljc0OCA1MjkuNDQxTDY3OC43NDggNTk4Ljg0NUM2NzguNzQ4IDYzNy4xNzYgNzA5LjgyMiA2NjguMjQ5IDc0OC4xNTIgNjY4LjI0OVY2NjguMjQ5Qzc4Ni40ODMgNjY4LjI0OSA4MTcuNTU2IDYzNy4xNzYgODE3LjU1NiA1OTguODQ1TDgxNy41NTYgNTI5LjQ0MSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSI1Ny4zMjI4Ii8+IDxwYXRoIGQ9Ik01NzMuNDkxIDc2OC45MThMNTczLjQ5MSA2NjMuMTU5QzU3My40OTEgNjIyLjcyMyA1NDAuNzExIDU4OS45NDIgNTAwLjI3NCA1ODkuOTQyVjU4OS45NDJDNDU5LjgzNyA1ODkuOTQyIDQyNy4wNTYgNjIyLjcyMyA0MjcuMDU2IDY2My4xNTlMNDI3LjA1NiA3NjguOTE4IiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjU3LjMyMjgiLz4gPHBhdGggZD0iTTE4MyA1MjkuNDQxTDE4MyA1OTguODQ1QzE4MyA2MzcuMTc2IDIxNC4wNzMgNjY4LjI0OSAyNTIuNDA0IDY2OC4yNDlWNjY4LjI0OUMyOTAuNzM1IDY2OC4yNDkgMzIxLjgwOCA2MzcuMTc2IDMyMS44MDggNTk4Ljg0NUwzMjEuODA4IDUyOS40NDEiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iNTcuMzIyOCIvPiA8cGF0aCBkPSJNNTAwLjI3MiAzNzAuNzk4QzUzMy4xMjcgMzcwLjc5OCA1NTkuNzYxIDM5Ny40MzMgNTU5Ljc2MSA0MzAuMjg4QzU1OS43NjEgNDYzLjE0MiA1MzMuMTI3IDQ4OS43NzcgNTAwLjI3MiA0ODkuNzc3QzQ5NC4xNzQgNDg5Ljc3NyA0ODguMjkgNDg4Ljg1OCA0ODIuNzUxIDQ4Ny4xNTNDNDkzLjA4MiA0ODIuNDkgNTAwLjI3MiA0NzIuMSA1MDAuMjcyIDQ2MC4wMjlDNTAwLjI3MiA0NDMuNjAyIDQ4Ni45NTUgNDMwLjI4NSA0NzAuNTI4IDQzMC4yODVDNDU4LjQ1OCA0MzAuMjg1IDQ0OC4wNjcgNDM3LjQ3MyA0NDMuNDA0IDQ0Ny44MDJDNDQxLjcwMSA0NDIuMjY1IDQ0MC43ODMgNDM2LjM4MyA0NDAuNzgzIDQzMC4yODhDNDQwLjc4MyAzOTcuNDMzIDQ2Ny40MTcgMzcwLjc5OCA1MDAuMjcyIDM3MC43OThaIiBmaWxsPSJ3aGl0ZSIvPiA8L3N2Zz4=',
|
|
408
|
-
id: '0xe9ea4723d69d1f399e88b8d890e128813eb30dc40bc012a9aca7f300332c0347'
|
|
409
|
-
},
|
|
410
|
-
{
|
|
411
|
-
type: '0x83556891f4a0f233ce7b05cfe7f957d4020492a34f5405b2cb9377d060bef4bf::spring_sui::SPRING_SUI',
|
|
412
|
-
decimals: 9,
|
|
413
|
-
name: 'Spring SUI',
|
|
414
|
-
symbol: 'sSUI',
|
|
415
|
-
description: 'Infinitely liquid staking on Sui',
|
|
416
|
-
iconUrl: 'https://suilend-assets.s3.us-east-2.amazonaws.com/lst.png',
|
|
417
|
-
id: '0x06e4724ae397623b3024ed80641b57cb80397c8a8c54552241fb994be4087d9a'
|
|
418
|
-
},
|
|
419
|
-
{
|
|
420
|
-
type: '0xbde4ba4c2e274a60ce15c1cfff9e5c42e41654ac8b6d906a57efa4bd3c29f47d::hasui::HASUI',
|
|
421
|
-
decimals: 9,
|
|
422
|
-
name: 'haSUI',
|
|
423
|
-
symbol: 'haSUI',
|
|
424
|
-
description: 'haSUI is a staking token of SUI',
|
|
425
|
-
iconUrl: 'https://assets.haedal.xyz/logos/hasui.svg',
|
|
426
|
-
id: '0x2c5f33af93f6511df699aaaa5822d823aac6ed99d4a0de2a4a50b3afa0172e24'
|
|
427
|
-
},
|
|
428
|
-
{
|
|
429
|
-
type: '0xaafb102dd0902f5055cadecd687fb5b71ca82ef0e0285d90afde828ec58ca96b::btc::BTC',
|
|
430
|
-
decimals: 8,
|
|
431
|
-
name: 'Wrapped Bitcoin',
|
|
432
|
-
symbol: 'wBTC',
|
|
433
|
-
description: 'wBTC by Sui Bridge',
|
|
434
|
-
iconUrl: 'https://bridge-assets.sui.io/suiWBTC.png',
|
|
435
|
-
id: '0x53e1cae1ad70a778d0b450d36c7c2553314ca029919005aad26945d65a8fb784'
|
|
436
|
-
},
|
|
437
|
-
{
|
|
438
|
-
type: '0x3a304c7feba2d819ea57c3542d68439ca2c386ba02159c740f7b406e592c62ea::haedal::HAEDAL',
|
|
439
|
-
decimals: 9,
|
|
440
|
-
name: 'Haedal',
|
|
441
|
-
symbol: 'HAEDAL',
|
|
442
|
-
description: '',
|
|
443
|
-
iconUrl: 'https://node1.irys.xyz/Rp80fmqZS3qBDnfyxyKEvc65nVdTunjOG3NY8T6AjpI',
|
|
444
|
-
id: '0xcc89fcc22f0d13de3688b94fa16d64a22079186a941914280c67101ff754263c'
|
|
445
|
-
},
|
|
446
|
-
{
|
|
447
|
-
type: '0x375f70cf2ae4c00bf37117d0c85a2c71545e6ee05c4a5c7d282cd66a4504b068::usdt::USDT',
|
|
448
|
-
decimals: 6,
|
|
449
|
-
name: 'Tether',
|
|
450
|
-
symbol: 'USDT',
|
|
451
|
-
description: 'Bridged Tether token',
|
|
452
|
-
iconUrl: 'https://bridge-assets.sui.io/usdt.png',
|
|
453
|
-
id: '0xda61b33ac61ed4c084bbda65a2229459ed4eb2185729e70498538f0688bec3cc'
|
|
454
|
-
},
|
|
455
|
-
{
|
|
456
|
-
type: '0xd1b72982e40348d069bb1ff701e634c117bb5f741f44dff91e472d3b01461e55::stsui::STSUI',
|
|
457
|
-
decimals: 9,
|
|
458
|
-
name: 'AlphaFi Staked SUI',
|
|
459
|
-
symbol: 'stSUI',
|
|
460
|
-
description: 'Instantly unstakable liquid staking token by AlphaFi',
|
|
461
|
-
iconUrl: 'https://images.alphafi.xyz/stSUI.png',
|
|
462
|
-
id: '0x99235d8d9f508bed2799e1eef59a7622405bc74c50f32cefdc9ec19344ad2cec'
|
|
463
|
-
},
|
|
464
|
-
{
|
|
465
|
-
type: '0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29::eth::ETH',
|
|
466
|
-
decimals: 8,
|
|
467
|
-
name: 'ETH by Sui Bridge',
|
|
468
|
-
symbol: 'ETH',
|
|
469
|
-
description: 'Bridged Ether by Sui Bridge',
|
|
470
|
-
iconUrl: 'https://bridge-assets.sui.io/eth.png',
|
|
471
|
-
id: '0x89b04ba87f8832d4d76e17a1c9dce72eb3e64d372cf02012b8d2de5384faeef0'
|
|
472
|
-
},
|
|
473
|
-
{
|
|
474
|
-
type: '0x2053d08c1e2bd02791056171aab0fd12bd7cd7efad2ab8f6b9c8902f14df2ff2::ausd::AUSD',
|
|
475
|
-
decimals: 6,
|
|
476
|
-
name: 'AUSD',
|
|
477
|
-
symbol: 'AUSD',
|
|
478
|
-
description: 'AUSD is a digital dollar issued by Agora',
|
|
479
|
-
iconUrl: 'https://static.agora.finance/ausd-token-icon.svg',
|
|
480
|
-
id: '0xc72215e72d16005840180ca3b26f20c9ca3c59d6516c8eea9846e8aa8ce9d6b5'
|
|
481
|
-
}
|
|
482
|
-
];
|
|
483
|
-
this.coinTypeInfo = (token_type, handler, network) => {
|
|
484
|
-
if (!token_type)
|
|
485
|
-
return 'loading';
|
|
486
|
-
let r = this.COINS_TYPE().find((v) => v?.type === token_type);
|
|
487
|
-
if (!r) {
|
|
488
|
-
Protocol.Client(network).getCoinMetadata({ coinType: token_type }).then((res) => {
|
|
489
|
-
if (res?.decimals && res?.symbol) {
|
|
490
|
-
const obj = { type: token_type, ...res };
|
|
491
|
-
this.update_coinType(obj, network);
|
|
492
|
-
handler(obj);
|
|
493
|
-
}
|
|
494
|
-
}).catch((e) => {
|
|
495
|
-
console.log(e);
|
|
496
|
-
});
|
|
497
|
-
}
|
|
498
|
-
else {
|
|
499
|
-
return r;
|
|
500
|
-
}
|
|
501
|
-
;
|
|
502
|
-
return 'loading';
|
|
503
|
-
};
|
|
504
|
-
this.WOWOK_OBJECTS_TYPE = () => Object.keys(MODULES).map((key) => { let i = (key === MODULES.guard ? this.packages.get('base') : this.packages.get('wowok')) + '::' + key + '::'; return i + capitalize(key); });
|
|
505
|
-
this.WOWOK_OBJECTS_PREFIX_TYPE = () => Object.keys(MODULES).map((key) => { return (key === MODULES.guard ? this.packages.get('base') : this.packages.get('wowok')) + '::' + key + '::'; });
|
|
506
|
-
this.object_name_from_type_repr = (type_repr) => {
|
|
507
|
-
if (!type_repr)
|
|
508
|
-
return '';
|
|
509
|
-
let i = type_repr.indexOf('::');
|
|
510
|
-
if (i > 0 && this.hasPackage(type_repr.slice(0, i))) {
|
|
511
|
-
i = type_repr.indexOf('<');
|
|
512
|
-
if (i > 0) {
|
|
513
|
-
type_repr = type_repr.slice(0, i);
|
|
514
|
-
}
|
|
515
|
-
let n = type_repr.lastIndexOf('::');
|
|
516
|
-
if (n > 0) {
|
|
517
|
-
return type_repr.slice(n + 2);
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
return '';
|
|
521
|
-
};
|
|
522
|
-
this.module_object_name_from_type_repr = (type_repr) => {
|
|
523
|
-
if (!type_repr)
|
|
524
|
-
return '';
|
|
525
|
-
let i = type_repr.indexOf('::');
|
|
526
|
-
if (i > 0 && this.hasPackage(type_repr.slice(0, i))) {
|
|
527
|
-
i = type_repr.indexOf('<');
|
|
528
|
-
if (i > 0) {
|
|
529
|
-
type_repr = type_repr.slice(0, i);
|
|
530
|
-
}
|
|
531
|
-
let n = type_repr.indexOf('::');
|
|
532
|
-
if (n > 0) {
|
|
533
|
-
return type_repr.slice(n + 2);
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
return '';
|
|
537
|
-
};
|
|
538
|
-
this.new_session();
|
|
539
|
-
}
|
|
540
|
-
static Instance(network, def = ENTRYPOINT.suitest) {
|
|
541
|
-
if (!Protocol._instance) {
|
|
542
|
-
Protocol._instance = new Protocol();
|
|
543
|
-
}
|
|
544
|
-
;
|
|
545
|
-
if (network) {
|
|
546
|
-
Protocol._instance.use_network(network);
|
|
547
|
-
}
|
|
548
|
-
else if (Protocol._instance.network === undefined) {
|
|
549
|
-
Protocol._instance.use_network(def);
|
|
550
|
-
}
|
|
551
|
-
return Protocol._instance;
|
|
552
|
-
}
|
|
553
|
-
static Client(network) {
|
|
554
|
-
const instance = Protocol.Instance();
|
|
555
|
-
const networkInfo = instance.networkUrl(network);
|
|
556
|
-
if (!networkInfo) {
|
|
557
|
-
ERROR(Errors.networkInvalid, Object.entries(ENTRYPOINT));
|
|
558
|
-
}
|
|
559
|
-
const url = networkInfo.url;
|
|
560
|
-
return new SuiClient({ url: url });
|
|
561
|
-
}
|
|
562
|
-
use_network(network) {
|
|
563
|
-
// 如果网络发生变化,清除客户端缓存
|
|
564
|
-
this.network = network;
|
|
565
|
-
switch (network) {
|
|
566
|
-
case ENTRYPOINT.wowoktest:
|
|
567
|
-
break;
|
|
568
|
-
case ENTRYPOINT.wowokmain:
|
|
569
|
-
break;
|
|
570
|
-
case ENTRYPOINT.suitest:
|
|
571
|
-
this.packages.set('wowok', TESTNET.wowok);
|
|
572
|
-
this.packages.set('base', TESTNET.base);
|
|
573
|
-
this.packages.set('wowok_origin', TESTNET.wowok_origin); //@ orgin package!!!
|
|
574
|
-
this.packages.set('base_origin', TESTNET.base_origin);
|
|
575
|
-
this.wowok_object = TESTNET.wowok_object;
|
|
576
|
-
this.entity_object = TESTNET.entity_object;
|
|
577
|
-
this.treasury_cap = TESTNET.treasury_cap;
|
|
578
|
-
//this.graphql = 'https://sui-testnet.mystenlabs.com/graphql';
|
|
579
|
-
this.oracle_object = TESTNET.oracle_object;
|
|
580
|
-
break;
|
|
581
|
-
case ENTRYPOINT.suimain:
|
|
582
|
-
this.packages.set('wowok', MAINNET.wowok);
|
|
583
|
-
this.packages.set('base', MAINNET.base);
|
|
584
|
-
this.packages.set('wowok_origin', MAINNET.wowok_origin); //@ orgin package!!!
|
|
585
|
-
this.packages.set('base_origin', MAINNET.base_origin);
|
|
586
|
-
this.wowok_object = MAINNET.wowok_object;
|
|
587
|
-
this.entity_object = MAINNET.entity_object;
|
|
588
|
-
this.treasury_cap = MAINNET.treasury_cap;
|
|
589
|
-
//this.graphql = 'https://sui-mainnet.mystenlabs.com/graphql';
|
|
590
|
-
this.oracle_object = MAINNET.oracle_object;
|
|
591
|
-
break;
|
|
592
|
-
}
|
|
593
|
-
;
|
|
594
|
-
}
|
|
595
|
-
package(type) {
|
|
596
|
-
return this.packages.get(type) ?? '';
|
|
597
|
-
}
|
|
598
|
-
objectWowok() { return this.wowok_object; }
|
|
599
|
-
objectEntity() { return this.entity_object; }
|
|
600
|
-
objectOracle() { return this.oracle_object; }
|
|
601
|
-
objectTreasuryCap() { return this.treasury_cap; }
|
|
602
|
-
IsNetworkValid() { return this.network !== undefined; }
|
|
603
|
-
networkEntrypoint() { return this.network; }
|
|
604
|
-
networkUrl(network) {
|
|
605
|
-
if (!network) {
|
|
606
|
-
if (!this.IsNetworkValid()) {
|
|
607
|
-
return;
|
|
608
|
-
}
|
|
609
|
-
network = this.network;
|
|
610
|
-
}
|
|
611
|
-
switch (network) {
|
|
612
|
-
case ENTRYPOINT.wowoktest:
|
|
613
|
-
return { url: "http://127.0.0.1:9000", network: network };
|
|
614
|
-
case ENTRYPOINT.wowokmain:
|
|
615
|
-
return { url: "", network: this.network };
|
|
616
|
-
case ENTRYPOINT.suitest:
|
|
617
|
-
return { url: "https://fullnode.testnet.sui.io:443", network: network };
|
|
618
|
-
case ENTRYPOINT.suimain:
|
|
619
|
-
return { url: "https://fullnode.mainnet.sui.io:443", network: network };
|
|
620
|
-
}
|
|
621
|
-
;
|
|
622
|
-
}
|
|
623
|
-
;
|
|
624
|
-
IsPlatformToken(token, network) {
|
|
625
|
-
if (!network) {
|
|
626
|
-
if (!this.IsNetworkValid()) {
|
|
627
|
-
ERROR(Errors.networkInvalid, Object.entries(ENTRYPOINT));
|
|
628
|
-
}
|
|
629
|
-
network = this.network;
|
|
630
|
-
}
|
|
631
|
-
switch (network) {
|
|
632
|
-
case ENTRYPOINT.wowoktest:
|
|
633
|
-
case ENTRYPOINT.wowokmain:
|
|
634
|
-
return token == '0x2::wow::WOW' ||
|
|
635
|
-
token == '0x0000000000000000000000000000000000000000000000000000000000000002::wow::WOW';
|
|
636
|
-
case ENTRYPOINT.suitest:
|
|
637
|
-
case ENTRYPOINT.suimain:
|
|
638
|
-
return token == '0x2::sui::SUI' ||
|
|
639
|
-
token == '0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI';
|
|
640
|
-
}
|
|
641
|
-
return false;
|
|
642
|
-
}
|
|
643
|
-
platformToken(network) {
|
|
644
|
-
if (!network) {
|
|
645
|
-
if (!this.IsNetworkValid()) {
|
|
646
|
-
ERROR(Errors.networkInvalid, Object.entries(ENTRYPOINT));
|
|
647
|
-
}
|
|
648
|
-
network = this.network;
|
|
649
|
-
}
|
|
650
|
-
switch (network) {
|
|
651
|
-
case ENTRYPOINT.wowoktest:
|
|
652
|
-
case ENTRYPOINT.wowokmain:
|
|
653
|
-
return '0x2::wow::WOW';
|
|
654
|
-
case ENTRYPOINT.suitest:
|
|
655
|
-
case ENTRYPOINT.suimain:
|
|
656
|
-
return '0x2::sui::SUI';
|
|
657
|
-
}
|
|
658
|
-
ERROR(Errors.networkInvalid, Object.entries(ENTRYPOINT));
|
|
659
|
-
return '';
|
|
660
|
-
}
|
|
661
|
-
static TXB_OBJECT(txb, arg) {
|
|
662
|
-
if (typeof (arg) == 'string')
|
|
663
|
-
return txb.object(arg);
|
|
664
|
-
return arg;
|
|
665
|
-
}
|
|
666
|
-
hasPackage(pack) {
|
|
667
|
-
for (let value of this.packages.values()) {
|
|
668
|
-
if (pack.includes(value)) {
|
|
669
|
-
return true;
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
return false;
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
// used in service, discount, order, because service has COIN wrapper for TOKEN
|
|
676
|
-
Protocol.SUI_TOKEN_TYPE = '0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI'; // TOKEN_TYPE
|
|
677
|
-
// used in demand, reward, ...
|
|
678
|
-
Protocol.SUI_COIN_TYPE = '0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0x2::sui::SUI>'; // COIN TYPE
|
|
679
|
-
Protocol.CLOCK_OBJECT = { objectId: '0x6', mutable: false, initialSharedVersion: 1 };
|
|
680
|
-
Protocol.IsValidObjects = (arr) => {
|
|
681
|
-
return IsValidArray(arr, (v) => {
|
|
682
|
-
if (!v)
|
|
683
|
-
return false;
|
|
684
|
-
if (typeof (v) === 'string' && !isValidSuiObjectId(v)) {
|
|
685
|
-
return false;
|
|
686
|
-
}
|
|
687
|
-
return true;
|
|
688
|
-
});
|
|
689
|
-
};
|
|
690
|
-
export class RpcResultParser {
|
|
691
|
-
}
|
|
692
|
-
RpcResultParser.Object_Type_Extra = () => {
|
|
693
|
-
let names = Object.keys(MODULES).map((key) => { return key + '::' + capitalize(key); });
|
|
694
|
-
names.push('order::Discount');
|
|
695
|
-
return names;
|
|
696
|
-
};
|
|
697
|
-
RpcResultParser.objectids_from_response = (protocol, response, concat_result) => {
|
|
698
|
-
//console.log(response)
|
|
699
|
-
let ret = new Map();
|
|
700
|
-
if (response?.objectChanges) {
|
|
701
|
-
response.objectChanges.forEach((change) => {
|
|
702
|
-
RpcResultParser.Object_Type_Extra().forEach((name) => {
|
|
703
|
-
if (change.type == 'created' && protocol.module_object_name_from_type_repr(change.objectType) === name) {
|
|
704
|
-
if (ret.has(name)) {
|
|
705
|
-
ret.get(name)?.push(change.objectId);
|
|
706
|
-
}
|
|
707
|
-
else {
|
|
708
|
-
ret.set(name, [change.objectId]);
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
});
|
|
712
|
-
});
|
|
713
|
-
}
|
|
714
|
-
if (concat_result) {
|
|
715
|
-
ret.forEach((value, key) => {
|
|
716
|
-
if (concat_result.has(key)) {
|
|
717
|
-
concat_result.set(key, concat_result.get(key).concat(value));
|
|
718
|
-
}
|
|
719
|
-
else {
|
|
720
|
-
concat_result.set(key, value);
|
|
721
|
-
}
|
|
722
|
-
});
|
|
723
|
-
}
|
|
724
|
-
return ret;
|
|
725
|
-
};
|
|
726
|
-
//# sourceMappingURL=protocol.js.map
|