@haneullabs/haneul 2.5.2 → 2.13.0
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/CHANGELOG.md +129 -0
- package/README.md +36 -36
- package/dist/bcs/bcs.d.mts +6 -7
- package/dist/bcs/bcs.d.mts.map +1 -1
- package/dist/bcs/bcs.mjs.map +1 -1
- package/dist/bcs/effects.mjs.map +1 -1
- package/dist/bcs/index.d.mts +2 -2
- package/dist/bcs/index.d.mts.map +1 -1
- package/dist/bcs/index.mjs +2 -2
- package/dist/bcs/index.mjs.map +1 -1
- package/dist/bcs/pure.d.mts.map +1 -1
- package/dist/bcs/type-tag-serializer.d.mts.map +1 -1
- package/dist/bcs/types.d.mts +0 -1
- package/dist/bcs/types.d.mts.map +1 -1
- package/dist/client/cache.d.mts.map +1 -1
- package/dist/client/client.d.mts.map +1 -1
- package/dist/client/core-resolver.d.mts.map +1 -1
- package/dist/client/core-resolver.mjs +87 -68
- package/dist/client/core-resolver.mjs.map +1 -1
- package/dist/client/core.d.mts +9 -8
- package/dist/client/core.d.mts.map +1 -1
- package/dist/client/core.mjs +29 -10
- package/dist/client/core.mjs.map +1 -1
- package/dist/client/errors.d.mts.map +1 -1
- package/dist/client/mvr.d.mts +0 -1
- package/dist/client/mvr.d.mts.map +1 -1
- package/dist/client/types.d.mts +110 -24
- package/dist/client/types.d.mts.map +1 -1
- package/dist/client/utils.d.mts.map +1 -1
- package/dist/client/utils.mjs +7 -7
- package/dist/client/utils.mjs.map +1 -1
- package/dist/cryptography/index.d.mts +2 -2
- package/dist/cryptography/index.mjs +2 -2
- package/dist/cryptography/intent.d.mts +2 -2
- package/dist/cryptography/intent.d.mts.map +1 -1
- package/dist/cryptography/intent.mjs +2 -2
- package/dist/cryptography/intent.mjs.map +1 -1
- package/dist/cryptography/keypair.d.mts +3 -3
- package/dist/cryptography/keypair.d.mts.map +1 -1
- package/dist/cryptography/keypair.mjs +3 -3
- package/dist/cryptography/keypair.mjs.map +1 -1
- package/dist/cryptography/mnemonics.d.mts +5 -5
- package/dist/cryptography/mnemonics.d.mts.map +1 -1
- package/dist/cryptography/mnemonics.mjs +7 -7
- package/dist/cryptography/mnemonics.mjs.map +1 -1
- package/dist/cryptography/publickey.d.mts +1 -2
- package/dist/cryptography/publickey.d.mts.map +1 -1
- package/dist/cryptography/publickey.mjs +7 -7
- package/dist/cryptography/publickey.mjs.map +1 -1
- package/dist/cryptography/signature-scheme.d.mts.map +1 -1
- package/dist/cryptography/signature.d.mts +10 -13
- package/dist/cryptography/signature.d.mts.map +1 -1
- package/dist/cryptography/signature.mjs +2 -2
- package/dist/cryptography/signature.mjs.map +1 -1
- package/dist/faucet/faucet.d.mts +2 -2
- package/dist/faucet/faucet.d.mts.map +1 -1
- package/dist/faucet/faucet.mjs +2 -2
- package/dist/faucet/faucet.mjs.map +1 -1
- package/dist/faucet/index.d.mts +2 -2
- package/dist/faucet/index.mjs +2 -2
- package/dist/graphql/client.d.mts +20 -5
- package/dist/graphql/client.d.mts.map +1 -1
- package/dist/graphql/client.mjs +55 -7
- package/dist/graphql/client.mjs.map +1 -1
- package/dist/graphql/core.d.mts +6 -5
- package/dist/graphql/core.d.mts.map +1 -1
- package/dist/graphql/core.mjs +43 -47
- package/dist/graphql/core.mjs.map +1 -1
- package/dist/graphql/generated/queries.d.mts +0 -1
- package/dist/graphql/generated/queries.d.mts.map +1 -1
- package/dist/graphql/generated/queries.mjs +46 -10
- package/dist/graphql/generated/queries.mjs.map +1 -1
- package/dist/graphql/generated/tada-env.d.mts +706 -98
- package/dist/graphql/generated/tada-env.d.mts.map +1 -1
- package/dist/graphql/index.d.mts +2 -2
- package/dist/graphql/index.mjs +2 -2
- package/dist/graphql/schema/index.d.mts +0 -1
- package/dist/graphql/schema/index.d.mts.map +1 -1
- package/dist/graphql/types.d.mts.map +1 -1
- package/dist/grpc/client.d.mts +20 -5
- package/dist/grpc/client.d.mts.map +1 -1
- package/dist/grpc/client.mjs +47 -7
- package/dist/grpc/client.mjs.map +1 -1
- package/dist/grpc/core.d.mts +6 -5
- package/dist/grpc/core.d.mts.map +1 -1
- package/dist/grpc/core.mjs +35 -34
- package/dist/grpc/core.mjs.map +1 -1
- package/dist/grpc/index.d.mts +2 -2
- package/dist/grpc/index.mjs +2 -2
- package/dist/grpc/proto/google/protobuf/any.d.mts +0 -1
- package/dist/grpc/proto/google/protobuf/any.d.mts.map +1 -1
- package/dist/grpc/proto/google/protobuf/duration.d.mts +0 -1
- package/dist/grpc/proto/google/protobuf/duration.d.mts.map +1 -1
- package/dist/grpc/proto/google/protobuf/field_mask.d.mts +0 -1
- package/dist/grpc/proto/google/protobuf/field_mask.d.mts.map +1 -1
- package/dist/grpc/proto/google/protobuf/struct.d.mts +1 -2
- package/dist/grpc/proto/google/protobuf/struct.d.mts.map +1 -1
- package/dist/grpc/proto/google/protobuf/timestamp.d.mts +0 -1
- package/dist/grpc/proto/google/protobuf/timestamp.d.mts.map +1 -1
- package/dist/grpc/proto/google/rpc/status.d.mts +0 -1
- package/dist/grpc/proto/google/rpc/status.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/argument.d.mts +1 -2
- package/dist/grpc/proto/haneul/rpc/v2/argument.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/balance_change.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/balance_change.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/bcs.d.mts +1 -2
- package/dist/grpc/proto/haneul/rpc/v2/bcs.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/bcs.mjs.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/checkpoint.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/checkpoint.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/checkpoint_contents.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/checkpoint_contents.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/checkpoint_summary.d.mts +1 -2
- package/dist/grpc/proto/haneul/rpc/v2/checkpoint_summary.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/effects.d.mts +5 -6
- package/dist/grpc/proto/haneul/rpc/v2/effects.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/epoch.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/epoch.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/error_reason.d.mts +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/error_reason.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/event.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/event.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/executed_transaction.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/executed_transaction.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/execution_status.d.mts +8 -9
- package/dist/grpc/proto/haneul/rpc/v2/execution_status.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/execution_status.mjs +4 -4
- package/dist/grpc/proto/haneul/rpc/v2/execution_status.mjs.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/gas_cost_summary.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/gas_cost_summary.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/input.d.mts +3 -4
- package/dist/grpc/proto/haneul/rpc/v2/input.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/jwk.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/jwk.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/ledger_service.client.d.mts +4 -5
- package/dist/grpc/proto/haneul/rpc/v2/ledger_service.client.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/ledger_service.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/ledger_service.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/move_package.d.mts +5 -6
- package/dist/grpc/proto/haneul/rpc/v2/move_package.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/move_package_service.client.d.mts +4 -5
- package/dist/grpc/proto/haneul/rpc/v2/move_package_service.client.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/move_package_service.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/move_package_service.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/name_service.client.d.mts +4 -5
- package/dist/grpc/proto/haneul/rpc/v2/name_service.client.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/name_service.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/name_service.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/object.d.mts +38 -2
- package/dist/grpc/proto/haneul/rpc/v2/object.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/object.mjs +26 -1
- package/dist/grpc/proto/haneul/rpc/v2/object.mjs.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/object_reference.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/object_reference.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/owner.d.mts +1 -2
- package/dist/grpc/proto/haneul/rpc/v2/owner.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/protocol_config.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/protocol_config.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/signature.d.mts +1 -2
- package/dist/grpc/proto/haneul/rpc/v2/signature.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/signature.mjs.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/signature_scheme.d.mts +2 -2
- package/dist/grpc/proto/haneul/rpc/v2/signature_scheme.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/signature_scheme.mjs +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/signature_scheme.mjs.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/signature_verification_service.client.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/signature_verification_service.client.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/signature_verification_service.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/signature_verification_service.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/state_service.client.d.mts +4 -5
- package/dist/grpc/proto/haneul/rpc/v2/state_service.client.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/state_service.d.mts +4 -5
- package/dist/grpc/proto/haneul/rpc/v2/state_service.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/subscription_service.client.d.mts +4 -5
- package/dist/grpc/proto/haneul/rpc/v2/subscription_service.client.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/subscription_service.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/subscription_service.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/system_state.d.mts +3 -4
- package/dist/grpc/proto/haneul/rpc/v2/system_state.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/system_state.mjs +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/system_state.mjs.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/transaction.d.mts +4 -5
- package/dist/grpc/proto/haneul/rpc/v2/transaction.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/transaction_execution_service.client.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/transaction_execution_service.client.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/transaction_execution_service.d.mts +9 -2
- package/dist/grpc/proto/haneul/rpc/v2/transaction_execution_service.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/transaction_execution_service.mjs +23 -12
- package/dist/grpc/proto/haneul/rpc/v2/transaction_execution_service.mjs.map +1 -1
- package/dist/grpc/proto/types.d.mts +2 -2
- package/dist/grpc/proto/types.d.mts.map +1 -1
- package/dist/grpc/proto/types.mjs +2 -1
- package/dist/jsonRpc/client.d.mts +4 -7
- package/dist/jsonRpc/client.d.mts.map +1 -1
- package/dist/jsonRpc/client.mjs +4 -33
- package/dist/jsonRpc/client.mjs.map +1 -1
- package/dist/jsonRpc/core.d.mts +8 -15
- package/dist/jsonRpc/core.d.mts.map +1 -1
- package/dist/jsonRpc/core.mjs +81 -34
- package/dist/jsonRpc/core.mjs.map +1 -1
- package/dist/jsonRpc/errors.d.mts.map +1 -1
- package/dist/jsonRpc/http-transport.d.mts +1 -17
- package/dist/jsonRpc/http-transport.d.mts.map +1 -1
- package/dist/jsonRpc/http-transport.mjs +0 -23
- package/dist/jsonRpc/http-transport.mjs.map +1 -1
- package/dist/jsonRpc/index.d.mts +3 -3
- package/dist/jsonRpc/network.d.mts.map +1 -1
- package/dist/jsonRpc/types/chain.d.mts.map +1 -1
- package/dist/jsonRpc/types/changes.d.mts.map +1 -1
- package/dist/jsonRpc/types/coins.d.mts.map +1 -1
- package/dist/jsonRpc/types/common.d.mts +1 -2
- package/dist/jsonRpc/types/common.d.mts.map +1 -1
- package/dist/jsonRpc/types/generated.d.mts +101 -129
- package/dist/jsonRpc/types/generated.d.mts.map +1 -1
- package/dist/jsonRpc/types/index.d.mts +1 -1
- package/dist/jsonRpc/types/params.d.mts +9 -14
- package/dist/jsonRpc/types/params.d.mts.map +1 -1
- package/dist/keypairs/ed25519/keypair.d.mts +8 -6
- package/dist/keypairs/ed25519/keypair.d.mts.map +1 -1
- package/dist/keypairs/ed25519/keypair.mjs +13 -9
- package/dist/keypairs/ed25519/keypair.mjs.map +1 -1
- package/dist/keypairs/ed25519/publickey.d.mts +0 -1
- package/dist/keypairs/ed25519/publickey.d.mts.map +1 -1
- package/dist/keypairs/passkey/keypair.d.mts +12 -5
- package/dist/keypairs/passkey/keypair.d.mts.map +1 -1
- package/dist/keypairs/passkey/keypair.mjs +20 -7
- package/dist/keypairs/passkey/keypair.mjs.map +1 -1
- package/dist/keypairs/passkey/publickey.d.mts +0 -1
- package/dist/keypairs/passkey/publickey.d.mts.map +1 -1
- package/dist/keypairs/passkey/types.d.mts.map +1 -1
- package/dist/keypairs/secp256k1/keypair.d.mts +3 -3
- package/dist/keypairs/secp256k1/keypair.d.mts.map +1 -1
- package/dist/keypairs/secp256k1/keypair.mjs +6 -6
- package/dist/keypairs/secp256k1/keypair.mjs.map +1 -1
- package/dist/keypairs/secp256k1/publickey.d.mts +0 -1
- package/dist/keypairs/secp256k1/publickey.d.mts.map +1 -1
- package/dist/keypairs/secp256r1/keypair.d.mts +3 -3
- package/dist/keypairs/secp256r1/keypair.d.mts.map +1 -1
- package/dist/keypairs/secp256r1/keypair.mjs +6 -6
- package/dist/keypairs/secp256r1/keypair.mjs.map +1 -1
- package/dist/keypairs/secp256r1/publickey.d.mts +0 -1
- package/dist/keypairs/secp256r1/publickey.d.mts.map +1 -1
- package/dist/multisig/publickey.d.mts +1 -0
- package/dist/multisig/publickey.d.mts.map +1 -1
- package/dist/multisig/publickey.mjs +7 -7
- package/dist/multisig/publickey.mjs.map +1 -1
- package/dist/multisig/signer.d.mts.map +1 -1
- package/dist/transactions/Arguments.d.mts.map +1 -1
- package/dist/transactions/Commands.d.mts +1 -1
- package/dist/transactions/Commands.d.mts.map +1 -1
- package/dist/transactions/Commands.mjs.map +1 -1
- package/dist/transactions/Inputs.d.mts.map +1 -1
- package/dist/transactions/ObjectCache.d.mts +3 -3
- package/dist/transactions/ObjectCache.d.mts.map +1 -1
- package/dist/transactions/Transaction.d.mts +26 -0
- package/dist/transactions/Transaction.d.mts.map +1 -1
- package/dist/transactions/Transaction.mjs +23 -1
- package/dist/transactions/Transaction.mjs.map +1 -1
- package/dist/transactions/TransactionData.d.mts.map +1 -1
- package/dist/transactions/TransactionData.mjs +8 -8
- package/dist/transactions/TransactionData.mjs.map +1 -1
- package/dist/transactions/data/internal.d.mts +109 -109
- package/dist/transactions/data/internal.d.mts.map +1 -1
- package/dist/transactions/data/internal.mjs.map +1 -1
- package/dist/transactions/data/v1.d.mts +220 -221
- package/dist/transactions/data/v1.d.mts.map +1 -1
- package/dist/transactions/data/v2.d.mts.map +1 -1
- package/dist/transactions/data/v2.mjs.map +1 -1
- package/dist/transactions/executor/caching.mjs +2 -2
- package/dist/transactions/executor/caching.mjs.map +1 -1
- package/dist/transactions/executor/parallel.d.mts +1 -1
- package/dist/transactions/executor/parallel.d.mts.map +1 -1
- package/dist/transactions/executor/parallel.mjs +1 -1
- package/dist/transactions/executor/parallel.mjs.map +1 -1
- package/dist/transactions/executor/serial.d.mts +3 -3
- package/dist/transactions/executor/serial.d.mts.map +1 -1
- package/dist/transactions/executor/serial.mjs.map +1 -1
- package/dist/transactions/intents/CoinWithBalance.d.mts.map +1 -1
- package/dist/transactions/intents/CoinWithBalance.mjs +174 -97
- package/dist/transactions/intents/CoinWithBalance.mjs.map +1 -1
- package/dist/transactions/object.d.mts.map +1 -1
- package/dist/transactions/pure.d.mts.map +1 -1
- package/dist/transactions/pure.mjs +12 -12
- package/dist/transactions/pure.mjs.map +1 -1
- package/dist/transactions/resolve.d.mts.map +1 -1
- package/dist/transactions/resolve.mjs +3 -3
- package/dist/transactions/resolve.mjs.map +1 -1
- package/dist/transactions/serializer.d.mts.map +1 -1
- package/dist/transactions/serializer.mjs +15 -15
- package/dist/transactions/serializer.mjs.map +1 -1
- package/dist/transactions/utils.d.mts +0 -1
- package/dist/transactions/utils.d.mts.map +1 -1
- package/dist/utils/coin-reservation.mjs +67 -0
- package/dist/utils/coin-reservation.mjs.map +1 -0
- package/dist/utils/constants.d.mts +2 -1
- package/dist/utils/constants.d.mts.map +1 -1
- package/dist/utils/constants.mjs +2 -1
- package/dist/utils/constants.mjs.map +1 -1
- package/dist/utils/derived-objects.d.mts +0 -1
- package/dist/utils/derived-objects.d.mts.map +1 -1
- package/dist/utils/dynamic-fields.d.mts.map +1 -1
- package/dist/utils/dynamic-fields.mjs +4 -4
- package/dist/utils/dynamic-fields.mjs.map +1 -1
- package/dist/utils/format.d.mts.map +1 -1
- package/dist/utils/haneul-types.d.mts.map +1 -1
- package/dist/utils/haneul-types.mjs +8 -0
- package/dist/utils/haneul-types.mjs.map +1 -1
- package/dist/utils/haneulns.d.mts.map +1 -1
- package/dist/utils/index.d.mts +2 -2
- package/dist/utils/index.mjs +2 -2
- package/dist/utils/move-registry.d.mts.map +1 -1
- package/dist/verify/verify.d.mts.map +1 -1
- package/dist/version.mjs +1 -1
- package/dist/version.mjs.map +1 -1
- package/dist/zklogin/address.d.mts.map +1 -1
- package/dist/zklogin/bcs.d.mts +14 -14
- package/dist/zklogin/bcs.d.mts.map +1 -1
- package/dist/zklogin/jwt-decode.d.mts +0 -1
- package/dist/zklogin/jwt-decode.d.mts.map +1 -1
- package/dist/zklogin/jwt-utils.d.mts +0 -1
- package/dist/zklogin/jwt-utils.d.mts.map +1 -1
- package/dist/zklogin/nonce.d.mts.map +1 -1
- package/dist/zklogin/poseidon.d.mts.map +1 -1
- package/dist/zklogin/publickey.d.mts +0 -1
- package/dist/zklogin/publickey.d.mts.map +1 -1
- package/dist/zklogin/signature.d.mts.map +1 -1
- package/dist/zklogin/utils.d.mts.map +1 -1
- package/dist/zklogin/utils.mjs +1 -1
- package/dist/zklogin/utils.mjs.map +1 -1
- package/docs/bcs.md +132 -0
- package/docs/clients/core.md +616 -0
- package/docs/clients/graphql.md +99 -0
- package/docs/clients/grpc.md +152 -0
- package/docs/clients/index.md +93 -0
- package/docs/clients/json-rpc.md +235 -0
- package/docs/cryptography/keypairs.md +259 -0
- package/docs/cryptography/multisig.md +192 -0
- package/docs/cryptography/passkey.md +111 -0
- package/docs/cryptography/webcrypto-signer.md +81 -0
- package/docs/executors.md +148 -0
- package/docs/faucet.md +26 -0
- package/docs/hello-haneul.md +115 -0
- package/docs/index.md +56 -0
- package/docs/install.md +61 -0
- package/docs/llm-docs.md +32 -0
- package/docs/llms-index.md +66 -0
- package/docs/migrations/0.38.md +57 -0
- package/docs/migrations/haneul-1.0.md +454 -0
- package/docs/migrations/haneul-2.0/agent-prompt.md +42 -0
- package/docs/migrations/haneul-2.0/dapp-kit.md +350 -0
- package/docs/migrations/haneul-2.0/deepbook-v3.md +33 -0
- package/docs/migrations/haneul-2.0/haneul.md +341 -0
- package/docs/migrations/haneul-2.0/haneulns.md +42 -0
- package/docs/migrations/haneul-2.0/index.md +161 -0
- package/docs/migrations/haneul-2.0/json-rpc-migration.md +399 -0
- package/docs/migrations/haneul-2.0/kiosk.md +120 -0
- package/docs/migrations/haneul-2.0/sdk-maintainers.md +91 -0
- package/docs/migrations/haneul-2.0/seal.md +14 -0
- package/docs/migrations/haneul-2.0/wallet-builders.md +66 -0
- package/docs/migrations/haneul-2.0/walrus.md +41 -0
- package/docs/migrations/haneul-2.0/zksend.md +94 -0
- package/docs/plugins.md +255 -0
- package/docs/sdk-building.md +341 -0
- package/docs/transaction-building/basics.md +297 -0
- package/docs/transaction-building/gas.md +62 -0
- package/docs/transaction-building/intents.md +61 -0
- package/docs/transaction-building/offline.md +71 -0
- package/docs/transaction-building/sponsored-transactions.md +22 -0
- package/docs/utils/derived_objects.md +80 -0
- package/docs/utils/index.md +53 -0
- package/docs/zklogin.md +78 -0
- package/package.json +199 -199
- package/src/bcs/bcs.ts +13 -13
- package/src/bcs/effects.ts +20 -20
- package/src/bcs/index.ts +2 -2
- package/src/client/core-resolver.ts +150 -100
- package/src/client/core.ts +62 -22
- package/src/client/types.ts +109 -24
- package/src/cryptography/index.ts +2 -2
- package/src/cryptography/keypair.ts +2 -2
- package/src/cryptography/mnemonics.ts +7 -7
- package/src/cryptography/publickey.ts +5 -5
- package/src/faucet/faucet.ts +1 -1
- package/src/faucet/index.ts +1 -1
- package/src/graphql/client.ts +100 -8
- package/src/graphql/core.ts +73 -80
- package/src/graphql/generated/queries.ts +301 -51
- package/src/graphql/generated/schema.graphql +407 -104
- package/src/graphql/generated/tada-env.ts +779 -58
- package/src/graphql/index.ts +1 -1
- package/src/graphql/queries/getAllBalances.graphql +1 -1
- package/src/graphql/queries/getBalance.graphql +1 -1
- package/src/graphql/queries/getCoins.graphql +2 -2
- package/src/graphql/queries/getDynamicFields.graphql +9 -1
- package/src/graphql/queries/getMoveFunction.graphql +1 -1
- package/src/graphql/queries/getProtocolConfig.graphql +18 -0
- package/src/graphql/queries/nameService.graphql +1 -1
- package/src/graphql/queries/objects.graphql +11 -1
- package/src/graphql/queries/transactions.graphql +1 -3
- package/src/graphql/queries/verifyZkLoginSignature.graphql +1 -2
- package/src/grpc/client.ts +66 -8
- package/src/grpc/core.ts +74 -35
- package/src/grpc/index.ts +1 -1
- package/src/grpc/proto/haneul/rpc/v2/bcs.ts +1 -1
- package/src/grpc/proto/haneul/rpc/v2/execution_status.ts +4 -4
- package/src/grpc/proto/haneul/rpc/v2/object.ts +44 -0
- package/src/grpc/proto/haneul/rpc/v2/signature.ts +1 -1
- package/src/grpc/proto/haneul/rpc/v2/signature_scheme.ts +1 -1
- package/src/grpc/proto/haneul/rpc/v2/system_state.ts +4 -4
- package/src/grpc/proto/haneul/rpc/v2/transaction_execution_service.ts +16 -0
- package/src/jsonRpc/client.ts +5 -23
- package/src/jsonRpc/core.ts +114 -41
- package/src/jsonRpc/http-transport.ts +0 -52
- package/src/jsonRpc/index.ts +0 -1
- package/src/jsonRpc/types/common.ts +0 -1
- package/src/jsonRpc/types/generated.ts +2 -2
- package/src/jsonRpc/types/params.ts +6 -6
- package/src/keypairs/ed25519/keypair.ts +14 -10
- package/src/keypairs/passkey/keypair.ts +22 -8
- package/src/keypairs/secp256k1/keypair.ts +6 -6
- package/src/keypairs/secp256r1/keypair.ts +6 -6
- package/src/transactions/Commands.ts +1 -1
- package/src/transactions/Transaction.ts +38 -1
- package/src/transactions/TransactionData.ts +3 -3
- package/src/transactions/__tests__/bcs.test.ts +3 -3
- package/src/transactions/data/internal.ts +12 -12
- package/src/transactions/data/v2.ts +6 -6
- package/src/transactions/executor/caching.ts +2 -2
- package/src/transactions/executor/parallel.ts +1 -2
- package/src/transactions/executor/serial.ts +1 -1
- package/src/transactions/intents/CoinWithBalance.ts +247 -121
- package/src/utils/coin-reservation.ts +84 -0
- package/src/utils/constants.ts +2 -0
- package/src/utils/haneul-types.ts +16 -1
- package/src/utils/index.ts +1 -0
- package/src/version.ts +1 -1
- package/src/zklogin/utils.ts +1 -1
- package/dist/jsonRpc/rpc-websocket-client.d.mts +0 -26
- package/dist/jsonRpc/rpc-websocket-client.d.mts.map +0 -1
- package/dist/jsonRpc/rpc-websocket-client.mjs +0 -135
- package/dist/jsonRpc/rpc-websocket-client.mjs.map +0 -1
- package/src/jsonRpc/rpc-websocket-client.ts +0 -241
|
@@ -1,245 +1,244 @@
|
|
|
1
1
|
import { TypeTag } from "../../bcs/types.mjs";
|
|
2
2
|
import "./internal.mjs";
|
|
3
3
|
import "@haneullabs/bcs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as valibot49 from "valibot";
|
|
5
5
|
import { GenericSchema, InferOutput } from "valibot";
|
|
6
6
|
|
|
7
7
|
//#region src/transactions/data/v1.d.ts
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
readonly None: valibot691.NullableSchema<valibot691.LiteralSchema<true, undefined>, undefined>;
|
|
8
|
+
declare const SerializedTransactionDataV1: valibot49.ObjectSchema<{
|
|
9
|
+
readonly version: valibot49.LiteralSchema<1, undefined>;
|
|
10
|
+
readonly sender: valibot49.OptionalSchema<valibot49.StringSchema<undefined>, undefined>;
|
|
11
|
+
readonly expiration: valibot49.NullishSchema<valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
12
|
+
readonly Epoch: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
13
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
14
|
+
readonly None: valibot49.NullableSchema<valibot49.LiteralSchema<true, undefined>, undefined>;
|
|
16
15
|
}, undefined>], undefined>, undefined>;
|
|
17
|
-
readonly gasConfig:
|
|
18
|
-
readonly budget:
|
|
19
|
-
readonly price:
|
|
20
|
-
readonly payment:
|
|
21
|
-
readonly digest:
|
|
22
|
-
readonly objectId:
|
|
23
|
-
readonly version:
|
|
16
|
+
readonly gasConfig: valibot49.ObjectSchema<{
|
|
17
|
+
readonly budget: valibot49.OptionalSchema<valibot49.SchemaWithPipe<readonly [valibot49.UnionSchema<[valibot49.NumberSchema<undefined>, valibot49.StringSchema<undefined>, valibot49.BigintSchema<undefined>], undefined>, valibot49.CheckAction<string | number | bigint, undefined>]>, undefined>;
|
|
18
|
+
readonly price: valibot49.OptionalSchema<valibot49.SchemaWithPipe<readonly [valibot49.UnionSchema<[valibot49.NumberSchema<undefined>, valibot49.StringSchema<undefined>, valibot49.BigintSchema<undefined>], undefined>, valibot49.CheckAction<string | number | bigint, undefined>]>, undefined>;
|
|
19
|
+
readonly payment: valibot49.OptionalSchema<valibot49.ArraySchema<valibot49.ObjectSchema<{
|
|
20
|
+
readonly digest: valibot49.StringSchema<undefined>;
|
|
21
|
+
readonly objectId: valibot49.StringSchema<undefined>;
|
|
22
|
+
readonly version: valibot49.UnionSchema<[valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>, valibot49.StringSchema<undefined>, valibot49.BigintSchema<undefined>], undefined>;
|
|
24
23
|
}, undefined>, undefined>, undefined>;
|
|
25
|
-
readonly owner:
|
|
24
|
+
readonly owner: valibot49.OptionalSchema<valibot49.StringSchema<undefined>, undefined>;
|
|
26
25
|
}, undefined>;
|
|
27
|
-
readonly inputs:
|
|
28
|
-
readonly kind:
|
|
29
|
-
readonly index:
|
|
30
|
-
readonly value:
|
|
31
|
-
readonly type:
|
|
32
|
-
}, undefined>,
|
|
33
|
-
readonly kind:
|
|
34
|
-
readonly index:
|
|
35
|
-
readonly value:
|
|
36
|
-
readonly type:
|
|
26
|
+
readonly inputs: valibot49.ArraySchema<valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
27
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
28
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
29
|
+
readonly value: valibot49.UnknownSchema;
|
|
30
|
+
readonly type: valibot49.OptionalSchema<valibot49.LiteralSchema<"object", undefined>, undefined>;
|
|
31
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
32
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
33
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
34
|
+
readonly value: valibot49.UnknownSchema;
|
|
35
|
+
readonly type: valibot49.LiteralSchema<"pure", undefined>;
|
|
37
36
|
}, undefined>], undefined>, undefined>;
|
|
38
|
-
readonly transactions:
|
|
39
|
-
readonly kind:
|
|
37
|
+
readonly transactions: valibot49.ArraySchema<valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
38
|
+
readonly kind: valibot49.LiteralSchema<"MoveCall", undefined>;
|
|
40
39
|
readonly target: GenericSchema<`${string}::${string}::${string}`>;
|
|
41
|
-
readonly typeArguments:
|
|
42
|
-
readonly arguments:
|
|
43
|
-
readonly kind:
|
|
44
|
-
readonly index:
|
|
45
|
-
readonly value:
|
|
46
|
-
readonly type:
|
|
47
|
-
}, undefined>,
|
|
48
|
-
readonly kind:
|
|
49
|
-
readonly index:
|
|
50
|
-
readonly value:
|
|
51
|
-
readonly type:
|
|
52
|
-
}, undefined>], undefined>,
|
|
53
|
-
readonly kind:
|
|
54
|
-
}, undefined>,
|
|
55
|
-
readonly kind:
|
|
56
|
-
readonly index:
|
|
57
|
-
}, undefined>,
|
|
58
|
-
readonly kind:
|
|
59
|
-
readonly index:
|
|
60
|
-
readonly resultIndex:
|
|
40
|
+
readonly typeArguments: valibot49.ArraySchema<valibot49.StringSchema<undefined>, undefined>;
|
|
41
|
+
readonly arguments: valibot49.ArraySchema<valibot49.UnionSchema<[valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
42
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
43
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
44
|
+
readonly value: valibot49.UnknownSchema;
|
|
45
|
+
readonly type: valibot49.OptionalSchema<valibot49.LiteralSchema<"object", undefined>, undefined>;
|
|
46
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
47
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
48
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
49
|
+
readonly value: valibot49.UnknownSchema;
|
|
50
|
+
readonly type: valibot49.LiteralSchema<"pure", undefined>;
|
|
51
|
+
}, undefined>], undefined>, valibot49.ObjectSchema<{
|
|
52
|
+
readonly kind: valibot49.LiteralSchema<"GasCoin", undefined>;
|
|
53
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
54
|
+
readonly kind: valibot49.LiteralSchema<"Result", undefined>;
|
|
55
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
56
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
57
|
+
readonly kind: valibot49.LiteralSchema<"NestedResult", undefined>;
|
|
58
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
59
|
+
readonly resultIndex: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
61
60
|
}, undefined>], undefined>, undefined>;
|
|
62
|
-
}, undefined>,
|
|
63
|
-
readonly kind:
|
|
64
|
-
readonly objects:
|
|
65
|
-
readonly kind:
|
|
66
|
-
readonly index:
|
|
67
|
-
readonly value:
|
|
68
|
-
readonly type:
|
|
69
|
-
}, undefined>,
|
|
70
|
-
readonly kind:
|
|
71
|
-
readonly index:
|
|
72
|
-
readonly value:
|
|
73
|
-
readonly type:
|
|
74
|
-
}, undefined>], undefined>,
|
|
75
|
-
readonly kind:
|
|
76
|
-
}, undefined>,
|
|
77
|
-
readonly kind:
|
|
78
|
-
readonly index:
|
|
79
|
-
}, undefined>,
|
|
80
|
-
readonly kind:
|
|
81
|
-
readonly index:
|
|
82
|
-
readonly resultIndex:
|
|
61
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
62
|
+
readonly kind: valibot49.LiteralSchema<"TransferObjects", undefined>;
|
|
63
|
+
readonly objects: valibot49.ArraySchema<valibot49.UnionSchema<[valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
64
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
65
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
66
|
+
readonly value: valibot49.UnknownSchema;
|
|
67
|
+
readonly type: valibot49.OptionalSchema<valibot49.LiteralSchema<"object", undefined>, undefined>;
|
|
68
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
69
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
70
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
71
|
+
readonly value: valibot49.UnknownSchema;
|
|
72
|
+
readonly type: valibot49.LiteralSchema<"pure", undefined>;
|
|
73
|
+
}, undefined>], undefined>, valibot49.ObjectSchema<{
|
|
74
|
+
readonly kind: valibot49.LiteralSchema<"GasCoin", undefined>;
|
|
75
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
76
|
+
readonly kind: valibot49.LiteralSchema<"Result", undefined>;
|
|
77
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
78
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
79
|
+
readonly kind: valibot49.LiteralSchema<"NestedResult", undefined>;
|
|
80
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
81
|
+
readonly resultIndex: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
83
82
|
}, undefined>], undefined>, undefined>;
|
|
84
|
-
readonly address:
|
|
85
|
-
readonly kind:
|
|
86
|
-
readonly index:
|
|
87
|
-
readonly value:
|
|
88
|
-
readonly type:
|
|
89
|
-
}, undefined>,
|
|
90
|
-
readonly kind:
|
|
91
|
-
readonly index:
|
|
92
|
-
readonly value:
|
|
93
|
-
readonly type:
|
|
94
|
-
}, undefined>], undefined>,
|
|
95
|
-
readonly kind:
|
|
96
|
-
}, undefined>,
|
|
97
|
-
readonly kind:
|
|
98
|
-
readonly index:
|
|
99
|
-
}, undefined>,
|
|
100
|
-
readonly kind:
|
|
101
|
-
readonly index:
|
|
102
|
-
readonly resultIndex:
|
|
83
|
+
readonly address: valibot49.UnionSchema<[valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
84
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
85
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
86
|
+
readonly value: valibot49.UnknownSchema;
|
|
87
|
+
readonly type: valibot49.OptionalSchema<valibot49.LiteralSchema<"object", undefined>, undefined>;
|
|
88
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
89
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
90
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
91
|
+
readonly value: valibot49.UnknownSchema;
|
|
92
|
+
readonly type: valibot49.LiteralSchema<"pure", undefined>;
|
|
93
|
+
}, undefined>], undefined>, valibot49.ObjectSchema<{
|
|
94
|
+
readonly kind: valibot49.LiteralSchema<"GasCoin", undefined>;
|
|
95
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
96
|
+
readonly kind: valibot49.LiteralSchema<"Result", undefined>;
|
|
97
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
98
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
99
|
+
readonly kind: valibot49.LiteralSchema<"NestedResult", undefined>;
|
|
100
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
101
|
+
readonly resultIndex: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
103
102
|
}, undefined>], undefined>;
|
|
104
|
-
}, undefined>,
|
|
105
|
-
readonly kind:
|
|
106
|
-
readonly coin:
|
|
107
|
-
readonly kind:
|
|
108
|
-
readonly index:
|
|
109
|
-
readonly value:
|
|
110
|
-
readonly type:
|
|
111
|
-
}, undefined>,
|
|
112
|
-
readonly kind:
|
|
113
|
-
readonly index:
|
|
114
|
-
readonly value:
|
|
115
|
-
readonly type:
|
|
116
|
-
}, undefined>], undefined>,
|
|
117
|
-
readonly kind:
|
|
118
|
-
}, undefined>,
|
|
119
|
-
readonly kind:
|
|
120
|
-
readonly index:
|
|
121
|
-
}, undefined>,
|
|
122
|
-
readonly kind:
|
|
123
|
-
readonly index:
|
|
124
|
-
readonly resultIndex:
|
|
103
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
104
|
+
readonly kind: valibot49.LiteralSchema<"SplitCoins", undefined>;
|
|
105
|
+
readonly coin: valibot49.UnionSchema<[valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
106
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
107
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
108
|
+
readonly value: valibot49.UnknownSchema;
|
|
109
|
+
readonly type: valibot49.OptionalSchema<valibot49.LiteralSchema<"object", undefined>, undefined>;
|
|
110
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
111
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
112
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
113
|
+
readonly value: valibot49.UnknownSchema;
|
|
114
|
+
readonly type: valibot49.LiteralSchema<"pure", undefined>;
|
|
115
|
+
}, undefined>], undefined>, valibot49.ObjectSchema<{
|
|
116
|
+
readonly kind: valibot49.LiteralSchema<"GasCoin", undefined>;
|
|
117
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
118
|
+
readonly kind: valibot49.LiteralSchema<"Result", undefined>;
|
|
119
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
120
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
121
|
+
readonly kind: valibot49.LiteralSchema<"NestedResult", undefined>;
|
|
122
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
123
|
+
readonly resultIndex: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
125
124
|
}, undefined>], undefined>;
|
|
126
|
-
readonly amounts:
|
|
127
|
-
readonly kind:
|
|
128
|
-
readonly index:
|
|
129
|
-
readonly value:
|
|
130
|
-
readonly type:
|
|
131
|
-
}, undefined>,
|
|
132
|
-
readonly kind:
|
|
133
|
-
readonly index:
|
|
134
|
-
readonly value:
|
|
135
|
-
readonly type:
|
|
136
|
-
}, undefined>], undefined>,
|
|
137
|
-
readonly kind:
|
|
138
|
-
}, undefined>,
|
|
139
|
-
readonly kind:
|
|
140
|
-
readonly index:
|
|
141
|
-
}, undefined>,
|
|
142
|
-
readonly kind:
|
|
143
|
-
readonly index:
|
|
144
|
-
readonly resultIndex:
|
|
125
|
+
readonly amounts: valibot49.ArraySchema<valibot49.UnionSchema<[valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
126
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
127
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
128
|
+
readonly value: valibot49.UnknownSchema;
|
|
129
|
+
readonly type: valibot49.OptionalSchema<valibot49.LiteralSchema<"object", undefined>, undefined>;
|
|
130
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
131
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
132
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
133
|
+
readonly value: valibot49.UnknownSchema;
|
|
134
|
+
readonly type: valibot49.LiteralSchema<"pure", undefined>;
|
|
135
|
+
}, undefined>], undefined>, valibot49.ObjectSchema<{
|
|
136
|
+
readonly kind: valibot49.LiteralSchema<"GasCoin", undefined>;
|
|
137
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
138
|
+
readonly kind: valibot49.LiteralSchema<"Result", undefined>;
|
|
139
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
140
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
141
|
+
readonly kind: valibot49.LiteralSchema<"NestedResult", undefined>;
|
|
142
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
143
|
+
readonly resultIndex: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
145
144
|
}, undefined>], undefined>, undefined>;
|
|
146
|
-
}, undefined>,
|
|
147
|
-
readonly kind:
|
|
148
|
-
readonly destination:
|
|
149
|
-
readonly kind:
|
|
150
|
-
readonly index:
|
|
151
|
-
readonly value:
|
|
152
|
-
readonly type:
|
|
153
|
-
}, undefined>,
|
|
154
|
-
readonly kind:
|
|
155
|
-
readonly index:
|
|
156
|
-
readonly value:
|
|
157
|
-
readonly type:
|
|
158
|
-
}, undefined>], undefined>,
|
|
159
|
-
readonly kind:
|
|
160
|
-
}, undefined>,
|
|
161
|
-
readonly kind:
|
|
162
|
-
readonly index:
|
|
163
|
-
}, undefined>,
|
|
164
|
-
readonly kind:
|
|
165
|
-
readonly index:
|
|
166
|
-
readonly resultIndex:
|
|
145
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
146
|
+
readonly kind: valibot49.LiteralSchema<"MergeCoins", undefined>;
|
|
147
|
+
readonly destination: valibot49.UnionSchema<[valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
148
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
149
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
150
|
+
readonly value: valibot49.UnknownSchema;
|
|
151
|
+
readonly type: valibot49.OptionalSchema<valibot49.LiteralSchema<"object", undefined>, undefined>;
|
|
152
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
153
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
154
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
155
|
+
readonly value: valibot49.UnknownSchema;
|
|
156
|
+
readonly type: valibot49.LiteralSchema<"pure", undefined>;
|
|
157
|
+
}, undefined>], undefined>, valibot49.ObjectSchema<{
|
|
158
|
+
readonly kind: valibot49.LiteralSchema<"GasCoin", undefined>;
|
|
159
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
160
|
+
readonly kind: valibot49.LiteralSchema<"Result", undefined>;
|
|
161
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
162
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
163
|
+
readonly kind: valibot49.LiteralSchema<"NestedResult", undefined>;
|
|
164
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
165
|
+
readonly resultIndex: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
167
166
|
}, undefined>], undefined>;
|
|
168
|
-
readonly sources:
|
|
169
|
-
readonly kind:
|
|
170
|
-
readonly index:
|
|
171
|
-
readonly value:
|
|
172
|
-
readonly type:
|
|
173
|
-
}, undefined>,
|
|
174
|
-
readonly kind:
|
|
175
|
-
readonly index:
|
|
176
|
-
readonly value:
|
|
177
|
-
readonly type:
|
|
178
|
-
}, undefined>], undefined>,
|
|
179
|
-
readonly kind:
|
|
180
|
-
}, undefined>,
|
|
181
|
-
readonly kind:
|
|
182
|
-
readonly index:
|
|
183
|
-
}, undefined>,
|
|
184
|
-
readonly kind:
|
|
185
|
-
readonly index:
|
|
186
|
-
readonly resultIndex:
|
|
167
|
+
readonly sources: valibot49.ArraySchema<valibot49.UnionSchema<[valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
168
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
169
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
170
|
+
readonly value: valibot49.UnknownSchema;
|
|
171
|
+
readonly type: valibot49.OptionalSchema<valibot49.LiteralSchema<"object", undefined>, undefined>;
|
|
172
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
173
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
174
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
175
|
+
readonly value: valibot49.UnknownSchema;
|
|
176
|
+
readonly type: valibot49.LiteralSchema<"pure", undefined>;
|
|
177
|
+
}, undefined>], undefined>, valibot49.ObjectSchema<{
|
|
178
|
+
readonly kind: valibot49.LiteralSchema<"GasCoin", undefined>;
|
|
179
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
180
|
+
readonly kind: valibot49.LiteralSchema<"Result", undefined>;
|
|
181
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
182
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
183
|
+
readonly kind: valibot49.LiteralSchema<"NestedResult", undefined>;
|
|
184
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
185
|
+
readonly resultIndex: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
187
186
|
}, undefined>], undefined>, undefined>;
|
|
188
|
-
}, undefined>,
|
|
189
|
-
readonly kind:
|
|
190
|
-
readonly modules:
|
|
191
|
-
readonly dependencies:
|
|
192
|
-
}, undefined>,
|
|
193
|
-
readonly kind:
|
|
194
|
-
readonly modules:
|
|
195
|
-
readonly dependencies:
|
|
196
|
-
readonly packageId:
|
|
197
|
-
readonly ticket:
|
|
198
|
-
readonly kind:
|
|
199
|
-
readonly index:
|
|
200
|
-
readonly value:
|
|
201
|
-
readonly type:
|
|
202
|
-
}, undefined>,
|
|
203
|
-
readonly kind:
|
|
204
|
-
readonly index:
|
|
205
|
-
readonly value:
|
|
206
|
-
readonly type:
|
|
207
|
-
}, undefined>], undefined>,
|
|
208
|
-
readonly kind:
|
|
209
|
-
}, undefined>,
|
|
210
|
-
readonly kind:
|
|
211
|
-
readonly index:
|
|
212
|
-
}, undefined>,
|
|
213
|
-
readonly kind:
|
|
214
|
-
readonly index:
|
|
215
|
-
readonly resultIndex:
|
|
187
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
188
|
+
readonly kind: valibot49.LiteralSchema<"Publish", undefined>;
|
|
189
|
+
readonly modules: valibot49.ArraySchema<valibot49.ArraySchema<valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>, undefined>, undefined>;
|
|
190
|
+
readonly dependencies: valibot49.ArraySchema<valibot49.StringSchema<undefined>, undefined>;
|
|
191
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
192
|
+
readonly kind: valibot49.LiteralSchema<"Upgrade", undefined>;
|
|
193
|
+
readonly modules: valibot49.ArraySchema<valibot49.ArraySchema<valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>, undefined>, undefined>;
|
|
194
|
+
readonly dependencies: valibot49.ArraySchema<valibot49.StringSchema<undefined>, undefined>;
|
|
195
|
+
readonly packageId: valibot49.StringSchema<undefined>;
|
|
196
|
+
readonly ticket: valibot49.UnionSchema<[valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
197
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
198
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
199
|
+
readonly value: valibot49.UnknownSchema;
|
|
200
|
+
readonly type: valibot49.OptionalSchema<valibot49.LiteralSchema<"object", undefined>, undefined>;
|
|
201
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
202
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
203
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
204
|
+
readonly value: valibot49.UnknownSchema;
|
|
205
|
+
readonly type: valibot49.LiteralSchema<"pure", undefined>;
|
|
206
|
+
}, undefined>], undefined>, valibot49.ObjectSchema<{
|
|
207
|
+
readonly kind: valibot49.LiteralSchema<"GasCoin", undefined>;
|
|
208
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
209
|
+
readonly kind: valibot49.LiteralSchema<"Result", undefined>;
|
|
210
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
211
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
212
|
+
readonly kind: valibot49.LiteralSchema<"NestedResult", undefined>;
|
|
213
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
214
|
+
readonly resultIndex: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
216
215
|
}, undefined>], undefined>;
|
|
217
|
-
}, undefined>,
|
|
218
|
-
readonly kind:
|
|
219
|
-
readonly type:
|
|
216
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
217
|
+
readonly kind: valibot49.LiteralSchema<"MakeMoveVec", undefined>;
|
|
218
|
+
readonly type: valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
220
219
|
readonly Some: GenericSchema<TypeTag>;
|
|
221
|
-
}, undefined>,
|
|
222
|
-
readonly None:
|
|
220
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
221
|
+
readonly None: valibot49.NullableSchema<valibot49.LiteralSchema<true, undefined>, undefined>;
|
|
223
222
|
}, undefined>], undefined>;
|
|
224
|
-
readonly objects:
|
|
225
|
-
readonly kind:
|
|
226
|
-
readonly index:
|
|
227
|
-
readonly value:
|
|
228
|
-
readonly type:
|
|
229
|
-
}, undefined>,
|
|
230
|
-
readonly kind:
|
|
231
|
-
readonly index:
|
|
232
|
-
readonly value:
|
|
233
|
-
readonly type:
|
|
234
|
-
}, undefined>], undefined>,
|
|
235
|
-
readonly kind:
|
|
236
|
-
}, undefined>,
|
|
237
|
-
readonly kind:
|
|
238
|
-
readonly index:
|
|
239
|
-
}, undefined>,
|
|
240
|
-
readonly kind:
|
|
241
|
-
readonly index:
|
|
242
|
-
readonly resultIndex:
|
|
223
|
+
readonly objects: valibot49.ArraySchema<valibot49.UnionSchema<[valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
224
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
225
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
226
|
+
readonly value: valibot49.UnknownSchema;
|
|
227
|
+
readonly type: valibot49.OptionalSchema<valibot49.LiteralSchema<"object", undefined>, undefined>;
|
|
228
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
229
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
230
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
231
|
+
readonly value: valibot49.UnknownSchema;
|
|
232
|
+
readonly type: valibot49.LiteralSchema<"pure", undefined>;
|
|
233
|
+
}, undefined>], undefined>, valibot49.ObjectSchema<{
|
|
234
|
+
readonly kind: valibot49.LiteralSchema<"GasCoin", undefined>;
|
|
235
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
236
|
+
readonly kind: valibot49.LiteralSchema<"Result", undefined>;
|
|
237
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
238
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
239
|
+
readonly kind: valibot49.LiteralSchema<"NestedResult", undefined>;
|
|
240
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
241
|
+
readonly resultIndex: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
243
242
|
}, undefined>], undefined>, undefined>;
|
|
244
243
|
}, undefined>], undefined>, undefined>;
|
|
245
244
|
}, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.d.mts","names":[],"sources":["../../../src/transactions/data/v1.ts"],"
|
|
1
|
+
{"version":3,"file":"v1.d.mts","names":[],"sources":["../../../src/transactions/data/v1.ts"],"mappings":";;;;;;;cA6La,2BAAA,YAA2B,YAAA;EAAA,kBAOtC,SAAA,CAAA,aAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA9DI,aAAA;IAAA,8CAAa,SAAA,CAAA,YAAA;IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgEP,2BAAA,GAA8B,WAAA,QAAmB,2BAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2.d.mts","names":[],"sources":["../../../src/transactions/data/v2.ts"],"
|
|
1
|
+
{"version":3,"file":"v2.d.mts","names":[],"sources":["../../../src/transactions/data/v2.ts"],"mappings":";;;;;cAmJa,iCAAA,WAAiC,YAAA;EAAA,kBAQ5C,QAAA,CAAA,aAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAEU,2BAAA,GAA8B,WAAA,QAAmB,iCAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2.mjs","names":[],"sources":["../../../src/transactions/data/v2.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { EnumInputShape } from '@haneullabs/bcs';\nimport type { GenericSchema, InferInput, InferOutput } from 'valibot';\nimport {\n\tarray,\n\tboolean,\n\tinteger,\n\tliteral,\n\tnullable,\n\tnullish,\n\tnumber,\n\tobject,\n\toptional,\n\tpipe,\n\trecord,\n\tstring,\n\ttuple,\n\tunion,\n\tunknown,\n} from 'valibot';\n\nimport {\n\tBCSBytes,\n\tFundsWithdrawalArgSchema,\n\tJsonU64,\n\tObjectID,\n\tObjectRefSchema,\n\tHaneulAddress,\n\tValidDuringSchema,\n} from './internal.js';\nimport type { Simplify } from '@haneullabs/utils';\n\nfunction enumUnion<T extends Record<string, GenericSchema<any>>>(options: T) {\n\treturn union(\n\t\tObject.entries(options).map(([key, value]) => object({ [key]: value })),\n\t) as GenericSchema<\n\t\tEnumInputShape<\n\t\t\tSimplify<{\n\t\t\t\t[K in keyof T]: InferInput<T[K]>;\n\t\t\t}>\n\t\t>\n\t>;\n}\n\n// https://github.com/GeunhwaJeong/haneul/blob/df41d5fa8127634ff4285671a01ead00e519f806/
|
|
1
|
+
{"version":3,"file":"v2.mjs","names":[],"sources":["../../../src/transactions/data/v2.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { EnumInputShape } from '@haneullabs/bcs';\nimport type { GenericSchema, InferInput, InferOutput } from 'valibot';\nimport {\n\tarray,\n\tboolean,\n\tinteger,\n\tliteral,\n\tnullable,\n\tnullish,\n\tnumber,\n\tobject,\n\toptional,\n\tpipe,\n\trecord,\n\tstring,\n\ttuple,\n\tunion,\n\tunknown,\n} from 'valibot';\n\nimport {\n\tBCSBytes,\n\tFundsWithdrawalArgSchema,\n\tJsonU64,\n\tObjectID,\n\tObjectRefSchema,\n\tHaneulAddress,\n\tValidDuringSchema,\n} from './internal.js';\nimport type { Simplify } from '@haneullabs/utils';\n\nfunction enumUnion<T extends Record<string, GenericSchema<any>>>(options: T) {\n\treturn union(\n\t\tObject.entries(options).map(([key, value]) => object({ [key]: value })),\n\t) as GenericSchema<\n\t\tEnumInputShape<\n\t\t\tSimplify<{\n\t\t\t\t[K in keyof T]: InferInput<T[K]>;\n\t\t\t}>\n\t\t>\n\t>;\n}\n\n// https://github.com/GeunhwaJeong/haneul/blob/df41d5fa8127634ff4285671a01ead00e519f806/crates/haneul-types/src/transaction.rs#L690-L702\nconst Argument = enumUnion({\n\tGasCoin: literal(true),\n\tInput: pipe(number(), integer()),\n\tResult: pipe(number(), integer()),\n\tNestedResult: tuple([pipe(number(), integer()), pipe(number(), integer())]),\n});\n\n// https://github.com/GeunhwaJeong/haneul/blob/df41d5fa8127634ff4285671a01ead00e519f806/crates/haneul-types/src/transaction.rs#L1387-L1392\nconst GasData = object({\n\tbudget: nullable(JsonU64),\n\tprice: nullable(JsonU64),\n\towner: nullable(HaneulAddress),\n\tpayment: nullable(array(ObjectRefSchema)),\n});\n\n// https://github.com/GeunhwaJeong/haneul/blob/df41d5fa8127634ff4285671a01ead00e519f806/crates/haneul-types/src/transaction.rs#L707-L718\nconst ProgrammableMoveCall = object({\n\tpackage: ObjectID,\n\tmodule: string(),\n\tfunction: string(),\n\t// snake case in rust\n\ttypeArguments: array(string()),\n\targuments: array(Argument),\n});\n\nconst $Intent = object({\n\tname: string(),\n\tinputs: record(string(), union([Argument, array(Argument)])),\n\tdata: record(string(), unknown()),\n});\n\n// https://github.com/GeunhwaJeong/haneul/blob/df41d5fa8127634ff4285671a01ead00e519f806/crates/haneul-types/src/transaction.rs#L657-L685\nconst Command = enumUnion({\n\tMoveCall: ProgrammableMoveCall,\n\tTransferObjects: object({\n\t\tobjects: array(Argument),\n\t\taddress: Argument,\n\t}),\n\tSplitCoins: object({\n\t\tcoin: Argument,\n\t\tamounts: array(Argument),\n\t}),\n\tMergeCoins: object({\n\t\tdestination: Argument,\n\t\tsources: array(Argument),\n\t}),\n\tPublish: object({\n\t\tmodules: array(BCSBytes),\n\t\tdependencies: array(ObjectID),\n\t}),\n\tMakeMoveVec: object({\n\t\ttype: nullable(string()),\n\t\telements: array(Argument),\n\t}),\n\tUpgrade: object({\n\t\tmodules: array(BCSBytes),\n\t\tdependencies: array(ObjectID),\n\t\tpackage: ObjectID,\n\t\tticket: Argument,\n\t}),\n\t$Intent,\n});\n\n// https://github.com/GeunhwaJeong/haneul/blob/df41d5fa8127634ff4285671a01ead00e519f806/crates/haneul-types/src/transaction.rs#L102-L114\nconst ObjectArg = enumUnion({\n\tImmOrOwnedObject: ObjectRefSchema,\n\tSharedObject: object({\n\t\tobjectId: ObjectID,\n\t\t// snake case in rust\n\t\tinitialSharedVersion: JsonU64,\n\t\tmutable: boolean(),\n\t}),\n\tReceiving: ObjectRefSchema,\n});\n\n// https://github.com/GeunhwaJeong/haneul/blob/df41d5fa8127634ff4285671a01ead00e519f806/crates/haneul-types/src/transaction.rs#L75-L80\nconst CallArg = enumUnion({\n\tObject: ObjectArg,\n\tPure: object({\n\t\tbytes: BCSBytes,\n\t}),\n\tUnresolvedPure: object({\n\t\tvalue: unknown(),\n\t}),\n\tUnresolvedObject: object({\n\t\tobjectId: ObjectID,\n\t\tversion: optional(nullable(JsonU64)),\n\t\tdigest: optional(nullable(string())),\n\t\tinitialSharedVersion: optional(nullable(JsonU64)),\n\t\tmutable: optional(nullable(boolean())),\n\t}),\n\tFundsWithdrawal: FundsWithdrawalArgSchema,\n});\n\nconst TransactionExpiration = enumUnion({\n\tNone: literal(true),\n\tEpoch: JsonU64,\n\tValidDuring: ValidDuringSchema,\n});\n\nexport const SerializedTransactionDataV2Schema = object({\n\tversion: literal(2),\n\tsender: nullish(HaneulAddress),\n\texpiration: nullish(TransactionExpiration),\n\tgasData: GasData,\n\tinputs: array(CallArg),\n\tcommands: array(Command),\n\tdigest: optional(nullable(string())),\n});\n\nexport type SerializedTransactionDataV2 = InferOutput<typeof SerializedTransactionDataV2Schema>;\n"],"mappings":";;;;AAkCA,SAAS,UAAwD,SAAY;AAC5E,QAAO,MACN,OAAO,QAAQ,QAAQ,CAAC,KAAK,CAAC,KAAK,WAAW,OAAO,GAAG,MAAM,OAAO,CAAC,CAAC,CACvE;;AAUF,MAAM,WAAW,UAAU;CAC1B,SAAS,QAAQ,KAAK;CACtB,OAAO,KAAK,QAAQ,EAAE,SAAS,CAAC;CAChC,QAAQ,KAAK,QAAQ,EAAE,SAAS,CAAC;CACjC,cAAc,MAAM,CAAC,KAAK,QAAQ,EAAE,SAAS,CAAC,EAAE,KAAK,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;CAC3E,CAAC;AAGF,MAAM,UAAU,OAAO;CACtB,QAAQ,SAAS,QAAQ;CACzB,OAAO,SAAS,QAAQ;CACxB,OAAO,SAAS,cAAc;CAC9B,SAAS,SAAS,MAAM,gBAAgB,CAAC;CACzC,CAAC;AAGF,MAAM,uBAAuB,OAAO;CACnC,SAAS;CACT,QAAQ,QAAQ;CAChB,UAAU,QAAQ;CAElB,eAAe,MAAM,QAAQ,CAAC;CAC9B,WAAW,MAAM,SAAS;CAC1B,CAAC;AAEF,MAAM,UAAU,OAAO;CACtB,MAAM,QAAQ;CACd,QAAQ,OAAO,QAAQ,EAAE,MAAM,CAAC,UAAU,MAAM,SAAS,CAAC,CAAC,CAAC;CAC5D,MAAM,OAAO,QAAQ,EAAE,SAAS,CAAC;CACjC,CAAC;AAGF,MAAM,UAAU,UAAU;CACzB,UAAU;CACV,iBAAiB,OAAO;EACvB,SAAS,MAAM,SAAS;EACxB,SAAS;EACT,CAAC;CACF,YAAY,OAAO;EAClB,MAAM;EACN,SAAS,MAAM,SAAS;EACxB,CAAC;CACF,YAAY,OAAO;EAClB,aAAa;EACb,SAAS,MAAM,SAAS;EACxB,CAAC;CACF,SAAS,OAAO;EACf,SAAS,MAAM,SAAS;EACxB,cAAc,MAAM,SAAS;EAC7B,CAAC;CACF,aAAa,OAAO;EACnB,MAAM,SAAS,QAAQ,CAAC;EACxB,UAAU,MAAM,SAAS;EACzB,CAAC;CACF,SAAS,OAAO;EACf,SAAS,MAAM,SAAS;EACxB,cAAc,MAAM,SAAS;EAC7B,SAAS;EACT,QAAQ;EACR,CAAC;CACF;CACA,CAAC;AAeF,MAAM,UAAU,UAAU;CACzB,QAbiB,UAAU;EAC3B,kBAAkB;EAClB,cAAc,OAAO;GACpB,UAAU;GAEV,sBAAsB;GACtB,SAAS,SAAS;GAClB,CAAC;EACF,WAAW;EACX,CAAC;CAKD,MAAM,OAAO,EACZ,OAAO,UACP,CAAC;CACF,gBAAgB,OAAO,EACtB,OAAO,SAAS,EAChB,CAAC;CACF,kBAAkB,OAAO;EACxB,UAAU;EACV,SAAS,SAAS,SAAS,QAAQ,CAAC;EACpC,QAAQ,SAAS,SAAS,QAAQ,CAAC,CAAC;EACpC,sBAAsB,SAAS,SAAS,QAAQ,CAAC;EACjD,SAAS,SAAS,SAAS,SAAS,CAAC,CAAC;EACtC,CAAC;CACF,iBAAiB;CACjB,CAAC;AAEF,MAAM,wBAAwB,UAAU;CACvC,MAAM,QAAQ,KAAK;CACnB,OAAO;CACP,aAAa;CACb,CAAC;AAEF,MAAa,oCAAoC,OAAO;CACvD,SAAS,QAAQ,EAAE;CACnB,QAAQ,QAAQ,cAAc;CAC9B,YAAY,QAAQ,sBAAsB;CAC1C,SAAS;CACT,QAAQ,MAAM,QAAQ;CACtB,UAAU,MAAM,QAAQ;CACxB,QAAQ,SAAS,SAAS,QAAQ,CAAC,CAAC;CACpC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bcs as
|
|
1
|
+
import { bcs as haneulBcs } from "../../bcs/index.mjs";
|
|
2
2
|
import { coreClientResolveTransactionPlugin } from "../../client/core-resolver.mjs";
|
|
3
3
|
import { isTransaction } from "../Transaction.mjs";
|
|
4
4
|
import { ObjectCache } from "../ObjectCache.mjs";
|
|
@@ -42,7 +42,7 @@ var CachingTransactionExecutor = class {
|
|
|
42
42
|
});
|
|
43
43
|
const tx = results.$kind === "Transaction" ? results.Transaction : results.FailedTransaction;
|
|
44
44
|
if (tx.effects?.bcs) {
|
|
45
|
-
const effects =
|
|
45
|
+
const effects = haneulBcs.TransactionEffects.parse(tx.effects.bcs);
|
|
46
46
|
await this.applyEffects(effects);
|
|
47
47
|
}
|
|
48
48
|
return results;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"caching.mjs","names":["#client","bcs","#lastDigest"],"sources":["../../../src/transactions/executor/caching.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bcs } from '../../bcs/index.js';\nimport type { ClientWithCoreApi } from '../../client/core.js';\nimport { coreClientResolveTransactionPlugin } from '../../client/core-resolver.js';\nimport type { HaneulClientTypes } from '../../client/types.js';\nimport type { Signer } from '../../cryptography/keypair.js';\nimport type { BuildTransactionOptions } from '../resolve.js';\nimport type { ObjectCacheOptions } from '../ObjectCache.js';\nimport { ObjectCache } from '../ObjectCache.js';\nimport type { Transaction } from '../Transaction.js';\nimport { isTransaction } from '../Transaction.js';\n\nexport interface ExecuteTransactionOptions<Include extends HaneulClientTypes.TransactionInclude = {}> {\n\ttransaction: Transaction | Uint8Array;\n\tsignatures: string[];\n\tinclude?: Include;\n}\n\nexport class CachingTransactionExecutor {\n\t#client: ClientWithCoreApi;\n\t#lastDigest: string | null = null;\n\tcache: ObjectCache;\n\n\tconstructor({\n\t\tclient,\n\t\t...options\n\t}: ObjectCacheOptions & {\n\t\tclient: ClientWithCoreApi;\n\t}) {\n\t\tthis.#client = client;\n\t\tthis.cache = new ObjectCache(options);\n\t}\n\n\t/**\n\t * Clears all Owned objects\n\t * Immutable objects, Shared objects, and Move function definitions will be preserved\n\t */\n\tasync reset() {\n\t\tawait Promise.all([\n\t\t\tthis.cache.clearOwnedObjects(),\n\t\t\tthis.cache.clearCustom(),\n\t\t\tthis.waitForLastTransaction(),\n\t\t]);\n\t}\n\n\tasync buildTransaction({\n\t\ttransaction,\n\t\t...options\n\t}: { transaction: Transaction } & BuildTransactionOptions) {\n\t\ttransaction.addBuildPlugin(this.cache.asPlugin());\n\t\ttransaction.addBuildPlugin(coreClientResolveTransactionPlugin);\n\t\treturn transaction.build({\n\t\t\tclient: this.#client,\n\t\t\t...options,\n\t\t});\n\t}\n\n\tasync executeTransaction<Include extends HaneulClientTypes.TransactionInclude = {}>({\n\t\ttransaction,\n\t\tsignatures,\n\t\tinclude,\n\t}: ExecuteTransactionOptions<Include>): Promise<\n\t\tHaneulClientTypes.TransactionResult<Include & { effects: true }>\n\t> {\n\t\tconst bytes = isTransaction(transaction)\n\t\t\t? await this.buildTransaction({ transaction })\n\t\t\t: transaction;\n\n\t\tconst results = await this.#client.core.executeTransaction({\n\t\t\ttransaction: bytes,\n\t\t\tsignatures,\n\t\t\tinclude: {\n\t\t\t\t...include,\n\t\t\t\teffects: true,\n\t\t\t},\n\t\t});\n\n\t\tconst tx = results.$kind === 'Transaction' ? results.Transaction : results.FailedTransaction;\n\t\tif (tx.effects?.bcs) {\n\t\t\tconst effects = bcs.TransactionEffects.parse(tx.effects.bcs);\n\t\t\tawait this.applyEffects(effects);\n\t\t}\n\n\t\treturn results as HaneulClientTypes.TransactionResult<Include & { effects: true }>;\n\t}\n\n\tasync signAndExecuteTransaction<Include extends HaneulClientTypes.TransactionInclude = {}>({\n\t\tinclude,\n\t\ttransaction,\n\t\tsigner,\n\t}: {\n\t\ttransaction: Transaction;\n\t\tsigner: Signer;\n\t\tinclude?: Include;\n\t}): Promise<HaneulClientTypes.TransactionResult<Include & { effects: true }>> {\n\t\ttransaction.setSenderIfNotSet(signer.toHaneulAddress());\n\t\tconst bytes = await this.buildTransaction({ transaction });\n\t\tconst { signature } = await signer.signTransaction(bytes);\n\t\treturn this.executeTransaction({\n\t\t\ttransaction: bytes,\n\t\t\tsignatures: [signature],\n\t\t\tinclude,\n\t\t});\n\t}\n\n\tasync applyEffects(effects: typeof bcs.TransactionEffects.$inferType) {\n\t\tthis.#lastDigest = effects.V2?.transactionDigest ?? null;\n\t\tawait this.cache.applyEffects(effects);\n\t}\n\n\tasync waitForLastTransaction() {\n\t\tif (this.#lastDigest) {\n\t\t\tawait this.#client.core.waitForTransaction({ digest: this.#lastDigest });\n\t\t\tthis.#lastDigest = null;\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;AAoBA,IAAa,6BAAb,MAAwC;CACvC;CACA,cAA6B;CAG7B,YAAY,EACX,QACA,GAAG,WAGD;AACF,QAAKA,SAAU;AACf,OAAK,QAAQ,IAAI,YAAY,QAAQ;;;;;;CAOtC,MAAM,QAAQ;AACb,QAAM,QAAQ,IAAI;GACjB,KAAK,MAAM,mBAAmB;GAC9B,KAAK,MAAM,aAAa;GACxB,KAAK,wBAAwB;GAC7B,CAAC;;CAGH,MAAM,iBAAiB,EACtB,aACA,GAAG,WACuD;AAC1D,cAAY,eAAe,KAAK,MAAM,UAAU,CAAC;AACjD,cAAY,eAAe,mCAAmC;AAC9D,SAAO,YAAY,MAAM;GACxB,QAAQ,MAAKA;GACb,GAAG;GACH,CAAC;;CAGH,MAAM,mBAA8E,EACnF,aACA,YACA,WAGC;EACD,MAAM,QAAQ,cAAc,YAAY,GACrC,MAAM,KAAK,iBAAiB,EAAE,aAAa,CAAC,GAC5C;EAEH,MAAM,UAAU,MAAM,MAAKA,OAAQ,KAAK,mBAAmB;GAC1D,aAAa;GACb;GACA,SAAS;IACR,GAAG;IACH,SAAS;IACT;GACD,CAAC;EAEF,MAAM,KAAK,QAAQ,UAAU,gBAAgB,QAAQ,cAAc,QAAQ;AAC3E,MAAI,GAAG,SAAS,KAAK;GACpB,MAAM,UAAUC,
|
|
1
|
+
{"version":3,"file":"caching.mjs","names":["#client","bcs","#lastDigest"],"sources":["../../../src/transactions/executor/caching.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bcs } from '../../bcs/index.js';\nimport type { ClientWithCoreApi } from '../../client/core.js';\nimport { coreClientResolveTransactionPlugin } from '../../client/core-resolver.js';\nimport type { HaneulClientTypes } from '../../client/types.js';\nimport type { Signer } from '../../cryptography/keypair.js';\nimport type { BuildTransactionOptions } from '../resolve.js';\nimport type { ObjectCacheOptions } from '../ObjectCache.js';\nimport { ObjectCache } from '../ObjectCache.js';\nimport type { Transaction } from '../Transaction.js';\nimport { isTransaction } from '../Transaction.js';\n\nexport interface ExecuteTransactionOptions<Include extends HaneulClientTypes.TransactionInclude = {}> {\n\ttransaction: Transaction | Uint8Array;\n\tsignatures: string[];\n\tinclude?: Include & HaneulClientTypes.TransactionInclude;\n}\n\nexport class CachingTransactionExecutor {\n\t#client: ClientWithCoreApi;\n\t#lastDigest: string | null = null;\n\tcache: ObjectCache;\n\n\tconstructor({\n\t\tclient,\n\t\t...options\n\t}: ObjectCacheOptions & {\n\t\tclient: ClientWithCoreApi;\n\t}) {\n\t\tthis.#client = client;\n\t\tthis.cache = new ObjectCache(options);\n\t}\n\n\t/**\n\t * Clears all Owned objects\n\t * Immutable objects, Shared objects, and Move function definitions will be preserved\n\t */\n\tasync reset() {\n\t\tawait Promise.all([\n\t\t\tthis.cache.clearOwnedObjects(),\n\t\t\tthis.cache.clearCustom(),\n\t\t\tthis.waitForLastTransaction(),\n\t\t]);\n\t}\n\n\tasync buildTransaction({\n\t\ttransaction,\n\t\t...options\n\t}: { transaction: Transaction } & BuildTransactionOptions) {\n\t\ttransaction.addBuildPlugin(this.cache.asPlugin());\n\t\ttransaction.addBuildPlugin(coreClientResolveTransactionPlugin);\n\t\treturn transaction.build({\n\t\t\tclient: this.#client,\n\t\t\t...options,\n\t\t});\n\t}\n\n\tasync executeTransaction<Include extends HaneulClientTypes.TransactionInclude = {}>({\n\t\ttransaction,\n\t\tsignatures,\n\t\tinclude,\n\t}: ExecuteTransactionOptions<Include>): Promise<\n\t\tHaneulClientTypes.TransactionResult<Include & { effects: true }>\n\t> {\n\t\tconst bytes = isTransaction(transaction)\n\t\t\t? await this.buildTransaction({ transaction })\n\t\t\t: transaction;\n\n\t\tconst results = await this.#client.core.executeTransaction({\n\t\t\ttransaction: bytes,\n\t\t\tsignatures,\n\t\t\tinclude: {\n\t\t\t\t...include,\n\t\t\t\teffects: true,\n\t\t\t},\n\t\t});\n\n\t\tconst tx = results.$kind === 'Transaction' ? results.Transaction : results.FailedTransaction;\n\t\tif (tx.effects?.bcs) {\n\t\t\tconst effects = bcs.TransactionEffects.parse(tx.effects.bcs);\n\t\t\tawait this.applyEffects(effects);\n\t\t}\n\n\t\treturn results as HaneulClientTypes.TransactionResult<Include & { effects: true }>;\n\t}\n\n\tasync signAndExecuteTransaction<Include extends HaneulClientTypes.TransactionInclude = {}>({\n\t\tinclude,\n\t\ttransaction,\n\t\tsigner,\n\t}: {\n\t\ttransaction: Transaction;\n\t\tsigner: Signer;\n\t\tinclude?: Include & HaneulClientTypes.TransactionInclude;\n\t}): Promise<HaneulClientTypes.TransactionResult<Include & { effects: true }>> {\n\t\ttransaction.setSenderIfNotSet(signer.toHaneulAddress());\n\t\tconst bytes = await this.buildTransaction({ transaction });\n\t\tconst { signature } = await signer.signTransaction(bytes);\n\t\treturn this.executeTransaction({\n\t\t\ttransaction: bytes,\n\t\t\tsignatures: [signature],\n\t\t\tinclude,\n\t\t});\n\t}\n\n\tasync applyEffects(effects: typeof bcs.TransactionEffects.$inferType) {\n\t\tthis.#lastDigest = effects.V2?.transactionDigest ?? null;\n\t\tawait this.cache.applyEffects(effects);\n\t}\n\n\tasync waitForLastTransaction() {\n\t\tif (this.#lastDigest) {\n\t\t\tawait this.#client.core.waitForTransaction({ digest: this.#lastDigest });\n\t\t\tthis.#lastDigest = null;\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;AAoBA,IAAa,6BAAb,MAAwC;CACvC;CACA,cAA6B;CAG7B,YAAY,EACX,QACA,GAAG,WAGD;AACF,QAAKA,SAAU;AACf,OAAK,QAAQ,IAAI,YAAY,QAAQ;;;;;;CAOtC,MAAM,QAAQ;AACb,QAAM,QAAQ,IAAI;GACjB,KAAK,MAAM,mBAAmB;GAC9B,KAAK,MAAM,aAAa;GACxB,KAAK,wBAAwB;GAC7B,CAAC;;CAGH,MAAM,iBAAiB,EACtB,aACA,GAAG,WACuD;AAC1D,cAAY,eAAe,KAAK,MAAM,UAAU,CAAC;AACjD,cAAY,eAAe,mCAAmC;AAC9D,SAAO,YAAY,MAAM;GACxB,QAAQ,MAAKA;GACb,GAAG;GACH,CAAC;;CAGH,MAAM,mBAA8E,EACnF,aACA,YACA,WAGC;EACD,MAAM,QAAQ,cAAc,YAAY,GACrC,MAAM,KAAK,iBAAiB,EAAE,aAAa,CAAC,GAC5C;EAEH,MAAM,UAAU,MAAM,MAAKA,OAAQ,KAAK,mBAAmB;GAC1D,aAAa;GACb;GACA,SAAS;IACR,GAAG;IACH,SAAS;IACT;GACD,CAAC;EAEF,MAAM,KAAK,QAAQ,UAAU,gBAAgB,QAAQ,cAAc,QAAQ;AAC3E,MAAI,GAAG,SAAS,KAAK;GACpB,MAAM,UAAUC,UAAI,mBAAmB,MAAM,GAAG,QAAQ,IAAI;AAC5D,SAAM,KAAK,aAAa,QAAQ;;AAGjC,SAAO;;CAGR,MAAM,0BAAqF,EAC1F,SACA,aACA,UAK6E;AAC7E,cAAY,kBAAkB,OAAO,iBAAiB,CAAC;EACvD,MAAM,QAAQ,MAAM,KAAK,iBAAiB,EAAE,aAAa,CAAC;EAC1D,MAAM,EAAE,cAAc,MAAM,OAAO,gBAAgB,MAAM;AACzD,SAAO,KAAK,mBAAmB;GAC9B,aAAa;GACb,YAAY,CAAC,UAAU;GACvB;GACA,CAAC;;CAGH,MAAM,aAAa,SAAmD;AACrE,QAAKC,aAAc,QAAQ,IAAI,qBAAqB;AACpD,QAAM,KAAK,MAAM,aAAa,QAAQ;;CAGvC,MAAM,yBAAyB;AAC9B,MAAI,MAAKA,YAAa;AACrB,SAAM,MAAKF,OAAQ,KAAK,mBAAmB,EAAE,QAAQ,MAAKE,YAAa,CAAC;AACxE,SAAKA,aAAc"}
|