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,147 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
import { secp256k1 } from "@noble/curves/secp256k1";
|
|
5
|
+
import { blake2b } from "@noble/hashes/blake2b";
|
|
6
|
+
import { sha256 } from "@noble/hashes/sha256";
|
|
7
|
+
import { bytesToHex } from "@noble/hashes/utils";
|
|
8
|
+
import { HDKey } from "@scure/bip32";
|
|
9
|
+
import {
|
|
10
|
+
decodeWowPrivateKey,
|
|
11
|
+
encodeWowPrivateKey,
|
|
12
|
+
Keypair
|
|
13
|
+
} from "../../cryptography/keypair.js";
|
|
14
|
+
import {
|
|
15
|
+
isValidBIP32Path,
|
|
16
|
+
mnemonicToSeed
|
|
17
|
+
} from "../../cryptography/mnemonics.js";
|
|
18
|
+
import { Secp256k1PublicKey } from "./publickey.js";
|
|
19
|
+
const DEFAULT_SECP256K1_DERIVATION_PATH = "m/54'/784'/0'/0/0";
|
|
20
|
+
class Secp256k1Keypair extends Keypair {
|
|
21
|
+
/**
|
|
22
|
+
* Create a new keypair instance.
|
|
23
|
+
* Generate random keypair if no {@link Secp256k1Keypair} is provided.
|
|
24
|
+
*
|
|
25
|
+
* @param keypair secp256k1 keypair
|
|
26
|
+
*/
|
|
27
|
+
constructor(keypair) {
|
|
28
|
+
super();
|
|
29
|
+
__publicField(this, "keypair");
|
|
30
|
+
if (keypair) {
|
|
31
|
+
this.keypair = keypair;
|
|
32
|
+
} else {
|
|
33
|
+
const secretKey = secp256k1.utils.randomPrivateKey();
|
|
34
|
+
const publicKey = secp256k1.getPublicKey(
|
|
35
|
+
secretKey,
|
|
36
|
+
true
|
|
37
|
+
);
|
|
38
|
+
this.keypair = { publicKey, secretKey };
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Get the key scheme of the keypair Secp256k1
|
|
43
|
+
*/
|
|
44
|
+
getKeyScheme() {
|
|
45
|
+
return "Secp256k1";
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Generate a new random keypair
|
|
49
|
+
*/
|
|
50
|
+
static generate() {
|
|
51
|
+
return new Secp256k1Keypair();
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Create a keypair from a raw secret key byte array.
|
|
55
|
+
*
|
|
56
|
+
* This method should only be used to recreate a keypair from a previously
|
|
57
|
+
* generated secret key. Generating keypairs from a random seed should be done
|
|
58
|
+
* with the {@link Keypair.fromSeed} method.
|
|
59
|
+
*
|
|
60
|
+
* @throws error if the provided secret key is invalid and validation is not skipped.
|
|
61
|
+
*
|
|
62
|
+
* @param secretKey secret key byte array or Bech32 secret key string
|
|
63
|
+
* @param options: skip secret key validation
|
|
64
|
+
*/
|
|
65
|
+
static fromSecretKey(secretKey, options) {
|
|
66
|
+
if (typeof secretKey === "string") {
|
|
67
|
+
const decoded = decodeWowPrivateKey(secretKey);
|
|
68
|
+
if (decoded.scheme !== "Secp256k1") {
|
|
69
|
+
throw new Error(
|
|
70
|
+
`Expected a Secp256k1 keypair, got ${decoded.scheme}`
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
return this.fromSecretKey(decoded.secretKey, options);
|
|
74
|
+
}
|
|
75
|
+
const publicKey = secp256k1.getPublicKey(secretKey, true);
|
|
76
|
+
if (!options || !options.skipValidation) {
|
|
77
|
+
const encoder = new TextEncoder();
|
|
78
|
+
const signData = encoder.encode("sui validation");
|
|
79
|
+
const msgHash = bytesToHex(blake2b(signData, { dkLen: 32 }));
|
|
80
|
+
const signature = secp256k1.sign(msgHash, secretKey);
|
|
81
|
+
if (!secp256k1.verify(signature, msgHash, publicKey, { lowS: true })) {
|
|
82
|
+
throw new Error("Provided secretKey is invalid");
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return new Secp256k1Keypair({ publicKey, secretKey });
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Generate a keypair from a 32 byte seed.
|
|
89
|
+
*
|
|
90
|
+
* @param seed seed byte array
|
|
91
|
+
*/
|
|
92
|
+
static fromSeed(seed) {
|
|
93
|
+
const publicKey = secp256k1.getPublicKey(seed, true);
|
|
94
|
+
return new Secp256k1Keypair({ publicKey, secretKey: seed });
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The public key for this keypair
|
|
98
|
+
*/
|
|
99
|
+
getPublicKey() {
|
|
100
|
+
return new Secp256k1PublicKey(this.keypair.publicKey);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* The Bech32 secret key string for this Secp256k1 keypair
|
|
104
|
+
*/
|
|
105
|
+
getSecretKey() {
|
|
106
|
+
return encodeWowPrivateKey(this.keypair.secretKey, this.getKeyScheme());
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Return the signature for the provided data.
|
|
110
|
+
*/
|
|
111
|
+
async sign(data) {
|
|
112
|
+
const msgHash = sha256(data);
|
|
113
|
+
const sig = secp256k1.sign(msgHash, this.keypair.secretKey, {
|
|
114
|
+
lowS: true
|
|
115
|
+
});
|
|
116
|
+
return sig.toCompactRawBytes();
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Derive Secp256k1 keypair from mnemonics and path. The mnemonics must be normalized
|
|
120
|
+
* and validated against the english wordlist.
|
|
121
|
+
*
|
|
122
|
+
* If path is none, it will default to m/54'/784'/0'/0/0, otherwise the path must
|
|
123
|
+
* be compliant to BIP-32 in form m/54'/784'/{account_index}'/{change_index}/{address_index}.
|
|
124
|
+
*/
|
|
125
|
+
static deriveKeypair(mnemonics, path) {
|
|
126
|
+
if (path == null) {
|
|
127
|
+
path = DEFAULT_SECP256K1_DERIVATION_PATH;
|
|
128
|
+
}
|
|
129
|
+
if (!isValidBIP32Path(path)) {
|
|
130
|
+
throw new Error("Invalid derivation path");
|
|
131
|
+
}
|
|
132
|
+
const key = HDKey.fromMasterSeed(mnemonicToSeed(mnemonics)).derive(
|
|
133
|
+
path
|
|
134
|
+
);
|
|
135
|
+
if (key.publicKey == null || key.privateKey == null) {
|
|
136
|
+
throw new Error("Invalid key");
|
|
137
|
+
}
|
|
138
|
+
return new Secp256k1Keypair({
|
|
139
|
+
publicKey: key.publicKey,
|
|
140
|
+
secretKey: key.privateKey
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
export {
|
|
145
|
+
DEFAULT_SECP256K1_DERIVATION_PATH,
|
|
146
|
+
Secp256k1Keypair
|
|
147
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PublicKey } from "../../cryptography/publickey.js";
|
|
2
|
+
import type { PublicKeyInitData } from "../../cryptography/publickey.js";
|
|
3
|
+
/**
|
|
4
|
+
* A Secp256k1 public key
|
|
5
|
+
*/
|
|
6
|
+
export declare class Secp256k1PublicKey extends PublicKey {
|
|
7
|
+
static SIZE: number;
|
|
8
|
+
private data;
|
|
9
|
+
/**
|
|
10
|
+
* Create a new Secp256k1PublicKey object
|
|
11
|
+
* @param value secp256k1 public key as buffer or base-64 encoded string
|
|
12
|
+
*/
|
|
13
|
+
constructor(value: PublicKeyInitData);
|
|
14
|
+
/**
|
|
15
|
+
* Checks if two Secp256k1 public keys are equal
|
|
16
|
+
*/
|
|
17
|
+
equals(publicKey: Secp256k1PublicKey): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Return the byte array representation of the Secp256k1 public key
|
|
20
|
+
*/
|
|
21
|
+
toRawBytes(): Uint8Array<ArrayBuffer>;
|
|
22
|
+
/**
|
|
23
|
+
* Return the Sui address associated with this Secp256k1 public key
|
|
24
|
+
*/
|
|
25
|
+
flag(): number;
|
|
26
|
+
/**
|
|
27
|
+
* Verifies that the signature is valid for for the provided message
|
|
28
|
+
*/
|
|
29
|
+
verify(message: Uint8Array, signature: Uint8Array | string): Promise<boolean>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
import { fromBase64 } from "@mysten/bcs";
|
|
5
|
+
import { secp256k1 } from "@noble/curves/secp256k1";
|
|
6
|
+
import { sha256 } from "@noble/hashes/sha256";
|
|
7
|
+
import {
|
|
8
|
+
bytesEqual,
|
|
9
|
+
parseSerializedKeypairSignature,
|
|
10
|
+
PublicKey
|
|
11
|
+
} from "../../cryptography/publickey.js";
|
|
12
|
+
import { SIGNATURE_SCHEME_TO_FLAG } from "../../cryptography/signature-scheme.js";
|
|
13
|
+
const SECP256K1_PUBLIC_KEY_SIZE = 33;
|
|
14
|
+
class Secp256k1PublicKey extends PublicKey {
|
|
15
|
+
/**
|
|
16
|
+
* Create a new Secp256k1PublicKey object
|
|
17
|
+
* @param value secp256k1 public key as buffer or base-64 encoded string
|
|
18
|
+
*/
|
|
19
|
+
constructor(value) {
|
|
20
|
+
super();
|
|
21
|
+
__publicField(this, "data");
|
|
22
|
+
if (typeof value === "string") {
|
|
23
|
+
this.data = fromBase64(value);
|
|
24
|
+
} else if (value instanceof Uint8Array) {
|
|
25
|
+
this.data = value;
|
|
26
|
+
} else {
|
|
27
|
+
this.data = Uint8Array.from(value);
|
|
28
|
+
}
|
|
29
|
+
if (this.data.length !== SECP256K1_PUBLIC_KEY_SIZE) {
|
|
30
|
+
throw new Error(
|
|
31
|
+
`Invalid public key input. Expected ${SECP256K1_PUBLIC_KEY_SIZE} bytes, got ${this.data.length}`
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Checks if two Secp256k1 public keys are equal
|
|
37
|
+
*/
|
|
38
|
+
equals(publicKey) {
|
|
39
|
+
return super.equals(publicKey);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Return the byte array representation of the Secp256k1 public key
|
|
43
|
+
*/
|
|
44
|
+
toRawBytes() {
|
|
45
|
+
return this.data;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Return the Sui address associated with this Secp256k1 public key
|
|
49
|
+
*/
|
|
50
|
+
flag() {
|
|
51
|
+
return SIGNATURE_SCHEME_TO_FLAG["Secp256k1"];
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Verifies that the signature is valid for for the provided message
|
|
55
|
+
*/
|
|
56
|
+
async verify(message, signature) {
|
|
57
|
+
let bytes;
|
|
58
|
+
if (typeof signature === "string") {
|
|
59
|
+
const parsed = parseSerializedKeypairSignature(signature);
|
|
60
|
+
if (parsed.signatureScheme !== "Secp256k1") {
|
|
61
|
+
throw new Error("Invalid signature scheme");
|
|
62
|
+
}
|
|
63
|
+
if (!bytesEqual(this.toRawBytes(), parsed.publicKey)) {
|
|
64
|
+
throw new Error("Signature does not match public key");
|
|
65
|
+
}
|
|
66
|
+
bytes = parsed.signature;
|
|
67
|
+
} else {
|
|
68
|
+
bytes = signature;
|
|
69
|
+
}
|
|
70
|
+
return secp256k1.verify(
|
|
71
|
+
secp256k1.Signature.fromCompact(bytes),
|
|
72
|
+
sha256(message),
|
|
73
|
+
this.toRawBytes()
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
__publicField(Secp256k1PublicKey, "SIZE", SECP256K1_PUBLIC_KEY_SIZE);
|
|
78
|
+
export {
|
|
79
|
+
Secp256k1PublicKey
|
|
80
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Keypair } from "../../cryptography/keypair.js";
|
|
2
|
+
import type { PublicKey } from "../../cryptography/publickey.js";
|
|
3
|
+
import type { SignatureScheme } from "../../cryptography/signature-scheme.js";
|
|
4
|
+
export declare const DEFAULT_SECP256R1_DERIVATION_PATH = "m/74'/784'/0'/0/0";
|
|
5
|
+
/**
|
|
6
|
+
* Secp256r1 Keypair data
|
|
7
|
+
*/
|
|
8
|
+
export interface Secp256r1KeypairData {
|
|
9
|
+
publicKey: Uint8Array;
|
|
10
|
+
secretKey: Uint8Array;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* An Secp256r1 Keypair used for signing transactions.
|
|
14
|
+
*/
|
|
15
|
+
export declare class Secp256r1Keypair extends Keypair {
|
|
16
|
+
private keypair;
|
|
17
|
+
/**
|
|
18
|
+
* Create a new keypair instance.
|
|
19
|
+
* Generate random keypair if no {@link Secp256r1Keypair} is provided.
|
|
20
|
+
*
|
|
21
|
+
* @param keypair Secp256r1 keypair
|
|
22
|
+
*/
|
|
23
|
+
constructor(keypair?: Secp256r1KeypairData);
|
|
24
|
+
/**
|
|
25
|
+
* Get the key scheme of the keypair Secp256r1
|
|
26
|
+
*/
|
|
27
|
+
getKeyScheme(): SignatureScheme;
|
|
28
|
+
/**
|
|
29
|
+
* Generate a new random keypair
|
|
30
|
+
*/
|
|
31
|
+
static generate(): Secp256r1Keypair;
|
|
32
|
+
/**
|
|
33
|
+
* Create a keypair from a raw secret key byte array.
|
|
34
|
+
*
|
|
35
|
+
* This method should only be used to recreate a keypair from a previously
|
|
36
|
+
* generated secret key. Generating keypairs from a random seed should be done
|
|
37
|
+
* with the {@link Keypair.fromSeed} method.
|
|
38
|
+
*
|
|
39
|
+
* @throws error if the provided secret key is invalid and validation is not skipped.
|
|
40
|
+
*
|
|
41
|
+
* @param secretKey secret key byte array or Bech32 secret key string
|
|
42
|
+
* @param options: skip secret key validation
|
|
43
|
+
*/
|
|
44
|
+
static fromSecretKey(secretKey: Uint8Array | string, options?: {
|
|
45
|
+
skipValidation?: boolean;
|
|
46
|
+
}): Secp256r1Keypair;
|
|
47
|
+
/**
|
|
48
|
+
* Generate a keypair from a 32 byte seed.
|
|
49
|
+
*
|
|
50
|
+
* @param seed seed byte array
|
|
51
|
+
*/
|
|
52
|
+
static fromSeed(seed: Uint8Array): Secp256r1Keypair;
|
|
53
|
+
/**
|
|
54
|
+
* The public key for this keypair
|
|
55
|
+
*/
|
|
56
|
+
getPublicKey(): PublicKey;
|
|
57
|
+
/**
|
|
58
|
+
* The Bech32 secret key string for this Secp256r1 keypair
|
|
59
|
+
*/
|
|
60
|
+
getSecretKey(): string;
|
|
61
|
+
/**
|
|
62
|
+
* Return the signature for the provided data.
|
|
63
|
+
*/
|
|
64
|
+
sign(data: Uint8Array): Promise<Uint8Array<ArrayBuffer>>;
|
|
65
|
+
/**
|
|
66
|
+
* Derive Secp256r1 keypair from mnemonics and path. The mnemonics must be normalized
|
|
67
|
+
* and validated against the english wordlist.
|
|
68
|
+
*
|
|
69
|
+
* If path is none, it will default to m/74'/784'/0'/0/0, otherwise the path must
|
|
70
|
+
* be compliant to BIP-32 in form m/74'/784'/{account_index}'/{change_index}/{address_index}.
|
|
71
|
+
*/
|
|
72
|
+
static deriveKeypair(mnemonics: string, path?: string): Secp256r1Keypair;
|
|
73
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
import { secp256r1 } from "@noble/curves/p256";
|
|
5
|
+
import { blake2b } from "@noble/hashes/blake2b";
|
|
6
|
+
import { sha256 } from "@noble/hashes/sha256";
|
|
7
|
+
import { bytesToHex } from "@noble/hashes/utils";
|
|
8
|
+
import { HDKey } from "@scure/bip32";
|
|
9
|
+
import {
|
|
10
|
+
decodeWowPrivateKey,
|
|
11
|
+
encodeWowPrivateKey,
|
|
12
|
+
Keypair
|
|
13
|
+
} from "../../cryptography/keypair.js";
|
|
14
|
+
import {
|
|
15
|
+
isValidBIP32Path,
|
|
16
|
+
mnemonicToSeed
|
|
17
|
+
} from "../../cryptography/mnemonics.js";
|
|
18
|
+
import { Secp256r1PublicKey } from "./publickey.js";
|
|
19
|
+
const DEFAULT_SECP256R1_DERIVATION_PATH = "m/74'/784'/0'/0/0";
|
|
20
|
+
class Secp256r1Keypair extends Keypair {
|
|
21
|
+
/**
|
|
22
|
+
* Create a new keypair instance.
|
|
23
|
+
* Generate random keypair if no {@link Secp256r1Keypair} is provided.
|
|
24
|
+
*
|
|
25
|
+
* @param keypair Secp256r1 keypair
|
|
26
|
+
*/
|
|
27
|
+
constructor(keypair) {
|
|
28
|
+
super();
|
|
29
|
+
__publicField(this, "keypair");
|
|
30
|
+
if (keypair) {
|
|
31
|
+
this.keypair = keypair;
|
|
32
|
+
} else {
|
|
33
|
+
const secretKey = secp256r1.utils.randomPrivateKey();
|
|
34
|
+
const publicKey = secp256r1.getPublicKey(
|
|
35
|
+
secretKey,
|
|
36
|
+
true
|
|
37
|
+
);
|
|
38
|
+
this.keypair = { publicKey, secretKey };
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Get the key scheme of the keypair Secp256r1
|
|
43
|
+
*/
|
|
44
|
+
getKeyScheme() {
|
|
45
|
+
return "Secp256r1";
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Generate a new random keypair
|
|
49
|
+
*/
|
|
50
|
+
static generate() {
|
|
51
|
+
return new Secp256r1Keypair();
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Create a keypair from a raw secret key byte array.
|
|
55
|
+
*
|
|
56
|
+
* This method should only be used to recreate a keypair from a previously
|
|
57
|
+
* generated secret key. Generating keypairs from a random seed should be done
|
|
58
|
+
* with the {@link Keypair.fromSeed} method.
|
|
59
|
+
*
|
|
60
|
+
* @throws error if the provided secret key is invalid and validation is not skipped.
|
|
61
|
+
*
|
|
62
|
+
* @param secretKey secret key byte array or Bech32 secret key string
|
|
63
|
+
* @param options: skip secret key validation
|
|
64
|
+
*/
|
|
65
|
+
static fromSecretKey(secretKey, options) {
|
|
66
|
+
if (typeof secretKey === "string") {
|
|
67
|
+
const decoded = decodeWowPrivateKey(secretKey);
|
|
68
|
+
if (decoded.scheme !== "Secp256r1") {
|
|
69
|
+
throw new Error(
|
|
70
|
+
`Expected a Secp256r1 keypair, got ${decoded.scheme}`
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
return this.fromSecretKey(decoded.secretKey, options);
|
|
74
|
+
}
|
|
75
|
+
const publicKey = secp256r1.getPublicKey(secretKey, true);
|
|
76
|
+
if (!options || !options.skipValidation) {
|
|
77
|
+
const encoder = new TextEncoder();
|
|
78
|
+
const signData = encoder.encode("sui validation");
|
|
79
|
+
const msgHash = bytesToHex(blake2b(signData, { dkLen: 32 }));
|
|
80
|
+
const signature = secp256r1.sign(msgHash, secretKey, {
|
|
81
|
+
lowS: true
|
|
82
|
+
});
|
|
83
|
+
if (!secp256r1.verify(signature, msgHash, publicKey, { lowS: true })) {
|
|
84
|
+
throw new Error("Provided secretKey is invalid");
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return new Secp256r1Keypair({ publicKey, secretKey });
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Generate a keypair from a 32 byte seed.
|
|
91
|
+
*
|
|
92
|
+
* @param seed seed byte array
|
|
93
|
+
*/
|
|
94
|
+
static fromSeed(seed) {
|
|
95
|
+
const publicKey = secp256r1.getPublicKey(seed, true);
|
|
96
|
+
return new Secp256r1Keypair({ publicKey, secretKey: seed });
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* The public key for this keypair
|
|
100
|
+
*/
|
|
101
|
+
getPublicKey() {
|
|
102
|
+
return new Secp256r1PublicKey(this.keypair.publicKey);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* The Bech32 secret key string for this Secp256r1 keypair
|
|
106
|
+
*/
|
|
107
|
+
getSecretKey() {
|
|
108
|
+
return encodeWowPrivateKey(this.keypair.secretKey, this.getKeyScheme());
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Return the signature for the provided data.
|
|
112
|
+
*/
|
|
113
|
+
async sign(data) {
|
|
114
|
+
const msgHash = sha256(data);
|
|
115
|
+
const sig = secp256r1.sign(msgHash, this.keypair.secretKey, {
|
|
116
|
+
lowS: true
|
|
117
|
+
});
|
|
118
|
+
return sig.toCompactRawBytes();
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Derive Secp256r1 keypair from mnemonics and path. The mnemonics must be normalized
|
|
122
|
+
* and validated against the english wordlist.
|
|
123
|
+
*
|
|
124
|
+
* If path is none, it will default to m/74'/784'/0'/0/0, otherwise the path must
|
|
125
|
+
* be compliant to BIP-32 in form m/74'/784'/{account_index}'/{change_index}/{address_index}.
|
|
126
|
+
*/
|
|
127
|
+
static deriveKeypair(mnemonics, path) {
|
|
128
|
+
if (path == null) {
|
|
129
|
+
path = DEFAULT_SECP256R1_DERIVATION_PATH;
|
|
130
|
+
}
|
|
131
|
+
if (!isValidBIP32Path(path)) {
|
|
132
|
+
throw new Error("Invalid derivation path");
|
|
133
|
+
}
|
|
134
|
+
const privateKey = HDKey.fromMasterSeed(
|
|
135
|
+
mnemonicToSeed(mnemonics)
|
|
136
|
+
).derive(path).privateKey;
|
|
137
|
+
return Secp256r1Keypair.fromSecretKey(privateKey);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
export {
|
|
141
|
+
DEFAULT_SECP256R1_DERIVATION_PATH,
|
|
142
|
+
Secp256r1Keypair
|
|
143
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PublicKey } from "../../cryptography/publickey.js";
|
|
2
|
+
import type { PublicKeyInitData } from "../../cryptography/publickey.js";
|
|
3
|
+
/**
|
|
4
|
+
* A Secp256r1 public key
|
|
5
|
+
*/
|
|
6
|
+
export declare class Secp256r1PublicKey extends PublicKey {
|
|
7
|
+
static SIZE: number;
|
|
8
|
+
private data;
|
|
9
|
+
/**
|
|
10
|
+
* Create a new Secp256r1PublicKey object
|
|
11
|
+
* @param value secp256r1 public key as buffer or base-64 encoded string
|
|
12
|
+
*/
|
|
13
|
+
constructor(value: PublicKeyInitData);
|
|
14
|
+
/**
|
|
15
|
+
* Checks if two Secp256r1 public keys are equal
|
|
16
|
+
*/
|
|
17
|
+
equals(publicKey: Secp256r1PublicKey): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Return the byte array representation of the Secp256r1 public key
|
|
20
|
+
*/
|
|
21
|
+
toRawBytes(): Uint8Array<ArrayBuffer>;
|
|
22
|
+
/**
|
|
23
|
+
* Return the Sui address associated with this Secp256r1 public key
|
|
24
|
+
*/
|
|
25
|
+
flag(): number;
|
|
26
|
+
/**
|
|
27
|
+
* Verifies that the signature is valid for for the provided message
|
|
28
|
+
*/
|
|
29
|
+
verify(message: Uint8Array, signature: Uint8Array | string): Promise<boolean>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
import { fromBase64 } from "@mysten/bcs";
|
|
5
|
+
import { secp256r1 } from "@noble/curves/p256";
|
|
6
|
+
import { sha256 } from "@noble/hashes/sha256";
|
|
7
|
+
import { bytesEqual, PublicKey } from "../../cryptography/publickey.js";
|
|
8
|
+
import { SIGNATURE_SCHEME_TO_FLAG } from "../../cryptography/signature-scheme.js";
|
|
9
|
+
import { parseSerializedSignature } from "../../cryptography/signature.js";
|
|
10
|
+
const SECP256R1_PUBLIC_KEY_SIZE = 33;
|
|
11
|
+
class Secp256r1PublicKey extends PublicKey {
|
|
12
|
+
/**
|
|
13
|
+
* Create a new Secp256r1PublicKey object
|
|
14
|
+
* @param value secp256r1 public key as buffer or base-64 encoded string
|
|
15
|
+
*/
|
|
16
|
+
constructor(value) {
|
|
17
|
+
super();
|
|
18
|
+
__publicField(this, "data");
|
|
19
|
+
if (typeof value === "string") {
|
|
20
|
+
this.data = fromBase64(value);
|
|
21
|
+
} else if (value instanceof Uint8Array) {
|
|
22
|
+
this.data = value;
|
|
23
|
+
} else {
|
|
24
|
+
this.data = Uint8Array.from(value);
|
|
25
|
+
}
|
|
26
|
+
if (this.data.length !== SECP256R1_PUBLIC_KEY_SIZE) {
|
|
27
|
+
throw new Error(
|
|
28
|
+
`Invalid public key input. Expected ${SECP256R1_PUBLIC_KEY_SIZE} bytes, got ${this.data.length}`
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Checks if two Secp256r1 public keys are equal
|
|
34
|
+
*/
|
|
35
|
+
equals(publicKey) {
|
|
36
|
+
return super.equals(publicKey);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Return the byte array representation of the Secp256r1 public key
|
|
40
|
+
*/
|
|
41
|
+
toRawBytes() {
|
|
42
|
+
return this.data;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Return the Sui address associated with this Secp256r1 public key
|
|
46
|
+
*/
|
|
47
|
+
flag() {
|
|
48
|
+
return SIGNATURE_SCHEME_TO_FLAG["Secp256r1"];
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Verifies that the signature is valid for for the provided message
|
|
52
|
+
*/
|
|
53
|
+
async verify(message, signature) {
|
|
54
|
+
let bytes;
|
|
55
|
+
if (typeof signature === "string") {
|
|
56
|
+
const parsed = parseSerializedSignature(signature);
|
|
57
|
+
if (parsed.signatureScheme !== "Secp256r1") {
|
|
58
|
+
throw new Error("Invalid signature scheme");
|
|
59
|
+
}
|
|
60
|
+
if (!bytesEqual(this.toRawBytes(), parsed.publicKey)) {
|
|
61
|
+
throw new Error("Signature does not match public key");
|
|
62
|
+
}
|
|
63
|
+
bytes = parsed.signature;
|
|
64
|
+
} else {
|
|
65
|
+
bytes = signature;
|
|
66
|
+
}
|
|
67
|
+
return secp256r1.verify(
|
|
68
|
+
secp256r1.Signature.fromCompact(bytes),
|
|
69
|
+
sha256(message),
|
|
70
|
+
this.toRawBytes()
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
__publicField(Secp256r1PublicKey, "SIZE", SECP256R1_PUBLIC_KEY_SIZE);
|
|
75
|
+
export {
|
|
76
|
+
Secp256r1PublicKey
|
|
77
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { bcs } from "../bcs/index.js";
|
|
2
|
+
import type { Signer } from "../cryptography/keypair.js";
|
|
3
|
+
import { PublicKey } from "../cryptography/publickey.js";
|
|
4
|
+
import type { SignatureScheme } from "../cryptography/signature-scheme.js";
|
|
5
|
+
import { MultiSigSigner } from "./signer.js";
|
|
6
|
+
type ParsedPartialMultiSigSignature = {
|
|
7
|
+
signatureScheme: SignatureScheme;
|
|
8
|
+
signature: Uint8Array;
|
|
9
|
+
publicKey: PublicKey;
|
|
10
|
+
weight: number;
|
|
11
|
+
};
|
|
12
|
+
export declare const MAX_SIGNER_IN_MULTISIG = 10;
|
|
13
|
+
export declare const MIN_SIGNER_IN_MULTISIG = 1;
|
|
14
|
+
export type MultiSigPublicKeyStruct = ReturnType<typeof bcs.MultiSigPublicKey.parse>;
|
|
15
|
+
export type MultiSigStruct = ReturnType<typeof bcs.MultiSig.parse>;
|
|
16
|
+
export type CompressedSignature = ReturnType<typeof bcs.CompressedSignature.parse>;
|
|
17
|
+
export type PublicKeyEnum = ReturnType<typeof bcs.PublicKey.parse>;
|
|
18
|
+
/**
|
|
19
|
+
* A MultiSig public key
|
|
20
|
+
*/
|
|
21
|
+
export declare class MultiSigPublicKey extends PublicKey {
|
|
22
|
+
private rawBytes;
|
|
23
|
+
private multisigPublicKey;
|
|
24
|
+
private publicKeys;
|
|
25
|
+
/**
|
|
26
|
+
* Create a new MultiSigPublicKey object
|
|
27
|
+
*/
|
|
28
|
+
constructor(
|
|
29
|
+
/**
|
|
30
|
+
* MultiSig public key as buffer or base-64 encoded string
|
|
31
|
+
*/
|
|
32
|
+
value: string | Uint8Array | MultiSigPublicKeyStruct);
|
|
33
|
+
/**
|
|
34
|
+
* A static method to create a new MultiSig publickey instance from a set of public keys and their associated weights pairs and threshold.
|
|
35
|
+
*/
|
|
36
|
+
static fromPublicKeys({ threshold, publicKeys, }: {
|
|
37
|
+
threshold: number;
|
|
38
|
+
publicKeys: {
|
|
39
|
+
publicKey: PublicKey;
|
|
40
|
+
weight: number;
|
|
41
|
+
}[];
|
|
42
|
+
}): MultiSigPublicKey;
|
|
43
|
+
/**
|
|
44
|
+
* Checks if two MultiSig public keys are equal
|
|
45
|
+
*/
|
|
46
|
+
equals(publicKey: MultiSigPublicKey): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Return the byte array representation of the MultiSig public key
|
|
49
|
+
*/
|
|
50
|
+
toRawBytes(): Uint8Array<ArrayBuffer>;
|
|
51
|
+
getPublicKeys(): {
|
|
52
|
+
weight: number;
|
|
53
|
+
publicKey: PublicKey;
|
|
54
|
+
}[];
|
|
55
|
+
getThreshold(): number;
|
|
56
|
+
getSigner(...signers: [signer: Signer]): MultiSigSigner;
|
|
57
|
+
/**
|
|
58
|
+
* Return the Sui address associated with this MultiSig public key
|
|
59
|
+
*/
|
|
60
|
+
toWAddress(): string;
|
|
61
|
+
/**
|
|
62
|
+
* Return the Sui address associated with this MultiSig public key
|
|
63
|
+
*/
|
|
64
|
+
flag(): number;
|
|
65
|
+
/**
|
|
66
|
+
* Verifies that the signature is valid for for the provided message
|
|
67
|
+
*/
|
|
68
|
+
verify(message: Uint8Array, multisigSignature: string): Promise<boolean>;
|
|
69
|
+
/**
|
|
70
|
+
* Combines multiple partial signatures into a single multisig, ensuring that each public key signs only once
|
|
71
|
+
* and that all the public keys involved are known and valid, and then serializes multisig into the standard format
|
|
72
|
+
*/
|
|
73
|
+
combinePartialSignatures(signatures: string[]): string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Parse multisig structure into an array of individual signatures: signature scheme, the actual individual signature, public key and its weight.
|
|
77
|
+
*/
|
|
78
|
+
export declare function parsePartialSignatures(multisig: MultiSigStruct): ParsedPartialMultiSigSignature[];
|
|
79
|
+
export {};
|