@haneullabs/haneul 2.5.1 → 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 +2 -3
- package/dist/cryptography/publickey.d.mts.map +1 -1
- package/dist/cryptography/publickey.mjs +10 -10
- 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 +4 -5
- 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 +8 -8
- 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 +32 -6
- 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 +16 -16
- 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/index.d.mts +2 -2
- package/dist/verify/index.mjs +2 -2
- package/dist/verify/verify.d.mts +2 -2
- package/dist/verify/verify.d.mts.map +1 -1
- package/dist/verify/verify.mjs +2 -2
- package/dist/verify/verify.mjs.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/nonce.mjs +1 -1
- package/dist/zklogin/nonce.mjs.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 +8 -8
- 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/multisig/publickey.ts +1 -1
- 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/verify/index.ts +1 -1
- package/src/verify/verify.ts +1 -1
- package/src/version.ts +1 -1
- package/src/zklogin/nonce.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
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
# Migrating from JSON-RPC
|
|
2
|
+
|
|
3
|
+
> Migrate from JSON-RPC to the new Core API
|
|
4
|
+
|
|
5
|
+
This guide covers migrating from `HaneulJsonRpcClient` to the new client APIs. The JSON-RPC API is
|
|
6
|
+
being deprecated in favor of `HaneulGrpcClient` and `HaneulGraphQLClient`.
|
|
7
|
+
|
|
8
|
+
> **Note:** We recommend using `HaneulGrpcClient` for most operations and `HaneulGraphQLClient` for
|
|
9
|
+
> complex queries like filtering transactions and events.
|
|
10
|
+
|
|
11
|
+
## Choosing a Client
|
|
12
|
+
|
|
13
|
+
| Client | Best For |
|
|
14
|
+
| --------------------- | --------------------------------------------------------------- |
|
|
15
|
+
| `HaneulGrpcClient` | Most operations, SDK integrations, real-time data |
|
|
16
|
+
| `HaneulGraphQLClient` | Complex queries, filtering transactions/events, historical data |
|
|
17
|
+
|
|
18
|
+
## Quick Migration to gRPC
|
|
19
|
+
|
|
20
|
+
For most use cases, migrate to `HaneulGrpcClient`:
|
|
21
|
+
|
|
22
|
+
```diff
|
|
23
|
+
- import { HaneulJsonRpcClient, getJsonRpcFullnodeUrl } from '@haneullabs/haneul/jsonRpc';
|
|
24
|
+
+ import { HaneulGrpcClient } from '@haneullabs/haneul/grpc';
|
|
25
|
+
|
|
26
|
+
- const client = new HaneulJsonRpcClient({
|
|
27
|
+
- url: getJsonRpcFullnodeUrl('mainnet'),
|
|
28
|
+
- network: 'mainnet',
|
|
29
|
+
- });
|
|
30
|
+
+ const client = new HaneulGrpcClient({
|
|
31
|
+
+ baseUrl: 'https://fullnode.mainnet.haneul.io:443',
|
|
32
|
+
+ network: 'mainnet',
|
|
33
|
+
+ });
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Both clients use the same full node URLs, so you can use the same endpoint when migrating.
|
|
37
|
+
|
|
38
|
+
## Core API Methods
|
|
39
|
+
|
|
40
|
+
The gRPC client should work with almost all haneullabs SDKs as a drop in replacement for the
|
|
41
|
+
JSON-RPC client. When using the client directly, the methods and data returned will not be exactly
|
|
42
|
+
the same as what was available in JSON-RPC.
|
|
43
|
+
|
|
44
|
+
## Methods Replaced by Core API
|
|
45
|
+
|
|
46
|
+
These JSON-RPC methods have direct replacements in the core API:
|
|
47
|
+
|
|
48
|
+
| JSON-RPC Method | Core API Replacement |
|
|
49
|
+
| ---------------------------- | ------------------------------------------------- |
|
|
50
|
+
| `getCoins` | `listCoins` |
|
|
51
|
+
| `getAllCoins` | `listOwnedObjects` with `type: '0x2::coin::Coin'` |
|
|
52
|
+
| `getAllBalances` | `listBalances` |
|
|
53
|
+
| `getOwnedObjects` | `listOwnedObjects` |
|
|
54
|
+
| `multiGetObjects` | `getObjects` |
|
|
55
|
+
| `getDynamicFields` | `listDynamicFields` |
|
|
56
|
+
| `getDynamicFieldObject` | `getDynamicField` |
|
|
57
|
+
| `devInspectTransactionBlock` | `simulateTransaction` with `checksEnabled: false` |
|
|
58
|
+
| `dryRunTransactionBlock` | `simulateTransaction` |
|
|
59
|
+
| `getNormalizedMoveFunction` | `getMoveFunction` |
|
|
60
|
+
| `getMoveFunctionArgTypes` | `getMoveFunction` |
|
|
61
|
+
|
|
62
|
+
### Example: Migrating devInspectTransactionBlock
|
|
63
|
+
|
|
64
|
+
```diff
|
|
65
|
+
- const result = await jsonRpcClient.devInspectTransactionBlock({
|
|
66
|
+
- sender: '0xabc...',
|
|
67
|
+
- transactionBlock: tx,
|
|
68
|
+
- });
|
|
69
|
+
- const returnValues = result.results?.[0]?.returnValues;
|
|
70
|
+
+ const result = await client.core.simulateTransaction({
|
|
71
|
+
+ transaction: tx,
|
|
72
|
+
+ checksEnabled: false,
|
|
73
|
+
+ include: { commandResults: true },
|
|
74
|
+
+ });
|
|
75
|
+
+ const returnValues = result.commandResults?.[0]?.returnValues;
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Example: Migrating getOwnedObjects
|
|
79
|
+
|
|
80
|
+
```diff
|
|
81
|
+
- const { data } = await jsonRpcClient.getOwnedObjects({
|
|
82
|
+
- owner: '0xabc...',
|
|
83
|
+
- options: { showContent: true },
|
|
84
|
+
- });
|
|
85
|
+
+ const { objects } = await grpcClient.listOwnedObjects({
|
|
86
|
+
+ owner: '0xabc...',
|
|
87
|
+
+ include: { content: true },
|
|
88
|
+
+ });
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Methods Replaced by gRPC Services
|
|
92
|
+
|
|
93
|
+
These JSON-RPC methods can be replaced by calling gRPC service clients directly:
|
|
94
|
+
|
|
95
|
+
| JSON-RPC Method | gRPC Service Replacement |
|
|
96
|
+
| ----------------------------------- | --------------------------------- |
|
|
97
|
+
| `getCheckpoint` | `ledgerService.getCheckpoint` |
|
|
98
|
+
| `getCheckpoints` | `ledgerService.listCheckpoints` |
|
|
99
|
+
| `getLatestCheckpointSequenceNumber` | `ledgerService.getCheckpoint` |
|
|
100
|
+
| `getEpochs` | `ledgerService.listEpochs` |
|
|
101
|
+
| `getCurrentEpoch` | `ledgerService.getEpoch` |
|
|
102
|
+
| `getLatestHaneulSystemState` | `ledgerService.getSystemState` |
|
|
103
|
+
| `getCommitteeInfo` | `ledgerService.getCommittee` |
|
|
104
|
+
| `getValidatorsApy` | `ledgerService.getValidators` |
|
|
105
|
+
| `getProtocolConfig` | `ledgerService.getProtocolConfig` |
|
|
106
|
+
| `getNormalizedMoveModule` | `movePackageService.getModule` |
|
|
107
|
+
| `getNormalizedMoveModulesByPackage` | `movePackageService.getPackage` |
|
|
108
|
+
| `getNormalizedMoveStruct` | `movePackageService.getStruct` |
|
|
109
|
+
| `resolveNameServiceAddress` | `nameService.lookupName` |
|
|
110
|
+
| `resolveNameServiceNames` | `nameService.reverseLookupName` |
|
|
111
|
+
|
|
112
|
+
### Example: Using gRPC Service Clients
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
const client = new HaneulGrpcClient({
|
|
116
|
+
baseUrl: 'https://fullnode.mainnet.haneul.io:443',
|
|
117
|
+
network: 'mainnet',
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
// Get checkpoint information
|
|
121
|
+
const { response } = await client.ledgerService.getCheckpoint({
|
|
122
|
+
sequenceNumber: 12345n,
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
// Get current epoch
|
|
126
|
+
const { response: epoch } = await client.ledgerService.getEpoch({});
|
|
127
|
+
|
|
128
|
+
// Get Move module information
|
|
129
|
+
const { response: module } = await client.movePackageService.getModule({
|
|
130
|
+
packageId: '0x2',
|
|
131
|
+
moduleName: 'coin',
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
// Resolve HaneulNS name
|
|
135
|
+
const { response: address } = await client.nameService.lookupName({
|
|
136
|
+
name: 'example.haneul',
|
|
137
|
+
});
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Methods Requiring GraphQL
|
|
141
|
+
|
|
142
|
+
Some JSON-RPC methods don't have gRPC equivalents and require using `HaneulGraphQLClient` instead:
|
|
143
|
+
|
|
144
|
+
| JSON-RPC Method | GraphQL Alternative |
|
|
145
|
+
| --------------------------- | ---------------------------------- |
|
|
146
|
+
| `queryTransactionBlocks` | `transactions` query |
|
|
147
|
+
| `multiGetTransactionBlocks` | `multiGetTransactionEffects` query |
|
|
148
|
+
| `queryEvents` | `events` query |
|
|
149
|
+
| `getCoinMetadata` | `coinMetadata` query |
|
|
150
|
+
| `getTotalSupply` | `coinMetadata` query |
|
|
151
|
+
| `getStakes` | `address.stakedHaneuls` query |
|
|
152
|
+
| `getStakesByIds` | `multiGetObjects` query |
|
|
153
|
+
| `tryGetPastObject` | Historical object queries |
|
|
154
|
+
| `getNetworkMetrics` | Use indexer |
|
|
155
|
+
| `getAddressMetrics` | Use indexer |
|
|
156
|
+
| `getMoveCallMetrics` | Use indexer |
|
|
157
|
+
|
|
158
|
+
### Setting Up GraphQL Client
|
|
159
|
+
|
|
160
|
+
```typescript
|
|
161
|
+
const graphqlClient = new HaneulGraphQLClient({
|
|
162
|
+
url: 'https://haneul-mainnet.haneul-labs.com/graphql',
|
|
163
|
+
network: 'mainnet',
|
|
164
|
+
});
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Querying Transactions
|
|
168
|
+
|
|
169
|
+
Replace `queryTransactionBlocks` with a GraphQL query:
|
|
170
|
+
|
|
171
|
+
```typescript
|
|
172
|
+
const result = await graphqlClient.query({
|
|
173
|
+
query: `
|
|
174
|
+
query QueryTransactions($sender: HaneulAddress, $first: Int, $after: String) {
|
|
175
|
+
transactions(
|
|
176
|
+
first: $first
|
|
177
|
+
after: $after
|
|
178
|
+
filter: { sentAddress: $sender }
|
|
179
|
+
) {
|
|
180
|
+
pageInfo {
|
|
181
|
+
hasNextPage
|
|
182
|
+
endCursor
|
|
183
|
+
}
|
|
184
|
+
nodes {
|
|
185
|
+
digest
|
|
186
|
+
effects {
|
|
187
|
+
status
|
|
188
|
+
epoch { epochId }
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
`,
|
|
194
|
+
variables: {
|
|
195
|
+
sender: '0xabc...',
|
|
196
|
+
first: 10,
|
|
197
|
+
},
|
|
198
|
+
});
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**Available transaction filters:**
|
|
202
|
+
|
|
203
|
+
- `sentAddress` - Filter by sender address
|
|
204
|
+
- `affectedAddress` - Filter by any address involved in the transaction
|
|
205
|
+
- `affectedObject` - Filter by object ID that was affected
|
|
206
|
+
- `function` - Filter by Move function called (e.g., `0x2::coin::transfer`)
|
|
207
|
+
- `kind` - Filter by transaction kind (`SYSTEM` or `PROGRAMMABLE`)
|
|
208
|
+
- `atCheckpoint` / `beforeCheckpoint` / `afterCheckpoint` - Filter by checkpoint
|
|
209
|
+
|
|
210
|
+
### Querying Events
|
|
211
|
+
|
|
212
|
+
Replace `queryEvents` with a GraphQL query:
|
|
213
|
+
|
|
214
|
+
```typescript
|
|
215
|
+
const result = await graphqlClient.query({
|
|
216
|
+
query: `
|
|
217
|
+
query QueryEvents($type: String, $first: Int, $after: String) {
|
|
218
|
+
events(
|
|
219
|
+
first: $first
|
|
220
|
+
after: $after
|
|
221
|
+
filter: { type: $type }
|
|
222
|
+
) {
|
|
223
|
+
pageInfo {
|
|
224
|
+
hasNextPage
|
|
225
|
+
endCursor
|
|
226
|
+
}
|
|
227
|
+
nodes {
|
|
228
|
+
transactionModule {
|
|
229
|
+
package { address }
|
|
230
|
+
name
|
|
231
|
+
}
|
|
232
|
+
sender { address }
|
|
233
|
+
contents {
|
|
234
|
+
type { repr }
|
|
235
|
+
bcs
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
`,
|
|
241
|
+
variables: {
|
|
242
|
+
type: '0x2::coin::CoinCreated',
|
|
243
|
+
first: 10,
|
|
244
|
+
},
|
|
245
|
+
});
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
**Available event filters:**
|
|
249
|
+
|
|
250
|
+
- `type` - Filter by event type (package, package::module, or full type)
|
|
251
|
+
- `module` - Filter by emitting module
|
|
252
|
+
- `sender` - Filter by transaction sender
|
|
253
|
+
- `atCheckpoint` / `beforeCheckpoint` / `afterCheckpoint` - Filter by checkpoint
|
|
254
|
+
|
|
255
|
+
### Fetching Multiple Transactions
|
|
256
|
+
|
|
257
|
+
Replace `multiGetTransactionBlocks` with a GraphQL query:
|
|
258
|
+
|
|
259
|
+
```typescript
|
|
260
|
+
const result = await graphqlClient.query({
|
|
261
|
+
query: `
|
|
262
|
+
query MultiGetTransactions($digests: [String!]!) {
|
|
263
|
+
multiGetTransactionEffects(keys: $digests) {
|
|
264
|
+
transaction {
|
|
265
|
+
digest
|
|
266
|
+
transactionBcs
|
|
267
|
+
}
|
|
268
|
+
status
|
|
269
|
+
epoch { epochId }
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
`,
|
|
273
|
+
variables: {
|
|
274
|
+
digests: ['digest1', 'digest2', 'digest3'],
|
|
275
|
+
},
|
|
276
|
+
});
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Querying Historical Objects
|
|
280
|
+
|
|
281
|
+
Replace `tryGetPastObject` with a GraphQL query specifying a version:
|
|
282
|
+
|
|
283
|
+
```typescript
|
|
284
|
+
const result = await graphqlClient.query({
|
|
285
|
+
query: `
|
|
286
|
+
query GetObjectAtVersion($id: HaneulAddress!, $version: UInt53!) {
|
|
287
|
+
object(address: $id, version: $version) {
|
|
288
|
+
address
|
|
289
|
+
version
|
|
290
|
+
digest
|
|
291
|
+
asMoveObject {
|
|
292
|
+
contents {
|
|
293
|
+
type { repr }
|
|
294
|
+
bcs
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
`,
|
|
300
|
+
variables: {
|
|
301
|
+
id: '0x123...',
|
|
302
|
+
version: 42,
|
|
303
|
+
},
|
|
304
|
+
});
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### Querying Coin Metadata
|
|
308
|
+
|
|
309
|
+
Replace `getCoinMetadata` and `getTotalSupply` with a GraphQL query:
|
|
310
|
+
|
|
311
|
+
```typescript
|
|
312
|
+
const result = await graphqlClient.query({
|
|
313
|
+
query: `
|
|
314
|
+
query GetCoinMetadata($coinType: String!) {
|
|
315
|
+
coinMetadata(coinType: $coinType) {
|
|
316
|
+
name
|
|
317
|
+
symbol
|
|
318
|
+
description
|
|
319
|
+
decimals
|
|
320
|
+
iconUrl
|
|
321
|
+
supply
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
`,
|
|
325
|
+
variables: {
|
|
326
|
+
coinType: '0x2::haneul::HANEUL',
|
|
327
|
+
},
|
|
328
|
+
});
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### Querying Staked HANEUL
|
|
332
|
+
|
|
333
|
+
Replace `getStakes` with a GraphQL query:
|
|
334
|
+
|
|
335
|
+
```typescript
|
|
336
|
+
const result = await graphqlClient.query({
|
|
337
|
+
query: `
|
|
338
|
+
query GetStakes($owner: HaneulAddress!) {
|
|
339
|
+
address(address: $owner) {
|
|
340
|
+
stakedHaneuls {
|
|
341
|
+
nodes {
|
|
342
|
+
principal
|
|
343
|
+
stakeActivationEpoch
|
|
344
|
+
estimatedReward
|
|
345
|
+
contents {
|
|
346
|
+
bcs
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
`,
|
|
353
|
+
variables: {
|
|
354
|
+
owner: '0xabc...',
|
|
355
|
+
},
|
|
356
|
+
});
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
## Response Format Differences
|
|
360
|
+
|
|
361
|
+
The gRPC client uses the core API response format, which differs from JSON-RPC responses. See the
|
|
362
|
+
[@haneullabs/haneul migration guide](/haneul/migrations/haneul-2.0/haneul#transaction-executors-now-accept-any-client)
|
|
363
|
+
for details on the new response format.
|
|
364
|
+
|
|
365
|
+
Key differences:
|
|
366
|
+
|
|
367
|
+
```diff
|
|
368
|
+
// Transaction result access
|
|
369
|
+
- const status = result.effects?.status?.status;
|
|
370
|
+
+ const tx = result.Transaction ?? result.FailedTransaction;
|
|
371
|
+
+ const status = tx.effects.status.success;
|
|
372
|
+
|
|
373
|
+
// Include options
|
|
374
|
+
- { showEffects: true, showEvents: true }
|
|
375
|
+
+ { effects: true, events: true }
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
## Client Extensions
|
|
379
|
+
|
|
380
|
+
Client extensions work the same way with both clients:
|
|
381
|
+
|
|
382
|
+
```typescript
|
|
383
|
+
const client = new HaneulGrpcClient({
|
|
384
|
+
baseUrl: 'https://fullnode.mainnet.haneul.io:443',
|
|
385
|
+
network: 'mainnet',
|
|
386
|
+
}).$extend(deepbook({ address: myAddress }), haneulns());
|
|
387
|
+
|
|
388
|
+
// Use extended functionality
|
|
389
|
+
await client.deepbook.checkManagerBalance(manager, asset);
|
|
390
|
+
await client.haneulns.getName('0xabc...');
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
## See Also
|
|
394
|
+
|
|
395
|
+
- [HaneulGrpcClient Documentation](/haneul/clients/grpc) - Full gRPC client documentation
|
|
396
|
+
- [HaneulGraphQLClient Documentation](/haneul/clients/graphql) - GraphQL client documentation
|
|
397
|
+
- [Core API](/haneul/clients/core) - Transport-agnostic API methods
|
|
398
|
+
- [gRPC Overview](https://docs.haneul.io/concepts/data-access/grpc-overview) - Haneul gRPC API
|
|
399
|
+
documentation
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# @haneullabs/kiosk
|
|
2
|
+
|
|
3
|
+
> Migrate @haneullabs/kiosk to 2.0
|
|
4
|
+
|
|
5
|
+
This package now exports a client extension that integrates with Haneul clients.
|
|
6
|
+
|
|
7
|
+
> **Note:** The Kiosk SDK requires `HaneulJsonRpcClient` or `HaneulGraphQLClient`. It does not work
|
|
8
|
+
> with `HaneulGrpcClient` because it uses event queries that are not available in gRPC.
|
|
9
|
+
|
|
10
|
+
```diff
|
|
11
|
+
- import { HaneulClient, getFullnodeUrl } from '@haneullabs/haneul/client';
|
|
12
|
+
- import { KioskClient, Network } from '@haneullabs/kiosk';
|
|
13
|
+
+ import { HaneulJsonRpcClient, getJsonRpcFullnodeUrl } from '@haneullabs/haneul/jsonRpc'; // or HaneulGraphQLClient
|
|
14
|
+
+ import { kiosk } from '@haneullabs/kiosk';
|
|
15
|
+
|
|
16
|
+
- const haneulClient = new HaneulClient({ url: getFullnodeUrl('mainnet') });
|
|
17
|
+
- const kioskClient = new KioskClient({
|
|
18
|
+
- client: haneulClient,
|
|
19
|
+
- network: Network.MAINNET,
|
|
20
|
+
- });
|
|
21
|
+
+ const client = new HaneulJsonRpcClient({
|
|
22
|
+
+ url: getJsonRpcFullnodeUrl('mainnet'),
|
|
23
|
+
+ network: 'mainnet',
|
|
24
|
+
+ }).$extend(kiosk());
|
|
25
|
+
|
|
26
|
+
- const ownedKiosks = await kioskClient.getOwnedKiosks({ address: myAddress });
|
|
27
|
+
+ const ownedKiosks = await client.kiosk.getOwnedKiosks({ address: myAddress });
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Removed: transactionBlock Parameter
|
|
31
|
+
|
|
32
|
+
The deprecated `transactionBlock` parameter has been removed from `KioskTransaction`,
|
|
33
|
+
`TransferPolicyTransaction`, and rule resolving functions. Use `transaction` instead:
|
|
34
|
+
|
|
35
|
+
```diff
|
|
36
|
+
const kioskTx = new KioskTransaction({
|
|
37
|
+
- transactionBlock: tx,
|
|
38
|
+
+ transaction: tx,
|
|
39
|
+
kioskClient,
|
|
40
|
+
cap,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
const tpTx = new TransferPolicyTransaction({
|
|
44
|
+
- transactionBlock: tx,
|
|
45
|
+
+ transaction: tx,
|
|
46
|
+
kioskClient,
|
|
47
|
+
cap,
|
|
48
|
+
});
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Removed: Low-Level Helper Functions
|
|
52
|
+
|
|
53
|
+
The low-level helper functions have been removed in favor of the `KioskTransaction` and
|
|
54
|
+
`TransferPolicyTransaction` builder classes.
|
|
55
|
+
|
|
56
|
+
### Kiosk Functions
|
|
57
|
+
|
|
58
|
+
| Removed Function | Use Instead |
|
|
59
|
+
| ------------------- | ------------------------ |
|
|
60
|
+
| `createKiosk` | `kioskTx.create()` |
|
|
61
|
+
| `shareKiosk` | `kioskTx.share()` |
|
|
62
|
+
| `place` | `kioskTx.place()` |
|
|
63
|
+
| `lock` | `kioskTx.lock()` |
|
|
64
|
+
| `take` | `kioskTx.take()` |
|
|
65
|
+
| `list` | `kioskTx.list()` |
|
|
66
|
+
| `delist` | `kioskTx.delist()` |
|
|
67
|
+
| `placeAndList` | `kioskTx.placeAndList()` |
|
|
68
|
+
| `purchase` | `kioskTx.purchase()` |
|
|
69
|
+
| `withdrawFromKiosk` | `kioskTx.withdraw()` |
|
|
70
|
+
| `borrowValue` | `kioskTx.borrow()` |
|
|
71
|
+
| `returnValue` | `kioskTx.return()` |
|
|
72
|
+
|
|
73
|
+
### Transfer Policy Functions
|
|
74
|
+
|
|
75
|
+
| Removed Function | Use Instead |
|
|
76
|
+
| ------------------------------------ | ------------------------------------------------------- |
|
|
77
|
+
| `createTransferPolicyWithoutSharing` | `tpTx.create()` |
|
|
78
|
+
| `shareTransferPolicy` | `tpTx.shareAndTransferCap()` |
|
|
79
|
+
| `confirmRequest` | Handled automatically by `kioskTx.purchaseAndResolve()` |
|
|
80
|
+
| `removeTransferPolicyRule` | `tpTx.removeRule()` |
|
|
81
|
+
|
|
82
|
+
### Personal Kiosk Functions
|
|
83
|
+
|
|
84
|
+
| Removed Function | Use Instead |
|
|
85
|
+
| ----------------------- | --------------------------------------------- |
|
|
86
|
+
| `convertToPersonalTx` | `kioskTx.convertToPersonal()` |
|
|
87
|
+
| `transferPersonalCapTx` | Handled automatically by `kioskTx.finalize()` |
|
|
88
|
+
|
|
89
|
+
### Rule Attachment Functions
|
|
90
|
+
|
|
91
|
+
| Removed Function | Use Instead |
|
|
92
|
+
| --------------------------- | ----------------------------- |
|
|
93
|
+
| `attachKioskLockRuleTx` | `tpTx.addLockRule()` |
|
|
94
|
+
| `attachRoyaltyRuleTx` | `tpTx.addRoyaltyRule()` |
|
|
95
|
+
| `attachPersonalKioskRuleTx` | `tpTx.addPersonalKioskRule()` |
|
|
96
|
+
| `attachFloorPriceRuleTx` | `tpTx.addFloorPriceRule()` |
|
|
97
|
+
|
|
98
|
+
## Migration Example
|
|
99
|
+
|
|
100
|
+
```diff
|
|
101
|
+
- import { createKiosk, shareKiosk, placeAndList } from '@haneullabs/kiosk';
|
|
102
|
+
+ import { kiosk, KioskTransaction } from '@haneullabs/kiosk';
|
|
103
|
+
+ import { HaneulJsonRpcClient, getJsonRpcFullnodeUrl } from '@haneullabs/haneul/jsonRpc';
|
|
104
|
+
|
|
105
|
+
- const [kiosk, cap] = createKiosk(tx);
|
|
106
|
+
- shareKiosk(tx, kiosk);
|
|
107
|
+
- placeAndList(tx, itemType, kiosk, cap, item, price);
|
|
108
|
+
|
|
109
|
+
+ const client = new HaneulJsonRpcClient({
|
|
110
|
+
+ url: getJsonRpcFullnodeUrl('mainnet'),
|
|
111
|
+
+ network: 'mainnet',
|
|
112
|
+
+ }).$extend(kiosk());
|
|
113
|
+
+
|
|
114
|
+
+ const kioskTx = new KioskTransaction({ transaction: tx, kioskClient: client.kiosk });
|
|
115
|
+
+ kioskTx
|
|
116
|
+
+ .create()
|
|
117
|
+
+ .placeAndList({ itemType, item, price })
|
|
118
|
+
+ .shareAndTransferCap(address)
|
|
119
|
+
+ .finalize();
|
|
120
|
+
```
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# SDK Maintainers
|
|
2
|
+
|
|
3
|
+
> Migration guide for SDK maintainers and library authors
|
|
4
|
+
|
|
5
|
+
# Upgrading SDKs to @haneullabs/haneul@2.0.0
|
|
6
|
+
|
|
7
|
+
This guide covers the key breaking changes for SDK maintainers building on top of
|
|
8
|
+
`@haneullabs/haneul`.
|
|
9
|
+
|
|
10
|
+
For comprehensive SDK development patterns, see the [Building SDKs guide](/haneul/sdk-building).
|
|
11
|
+
|
|
12
|
+
## Use `ClientWithCoreApi`
|
|
13
|
+
|
|
14
|
+
Accept `ClientWithCoreApi` instead of `HaneulClient` to support all 3 Haneul clients (JSON-RPC,
|
|
15
|
+
GraphQL, gRPC):
|
|
16
|
+
|
|
17
|
+
```diff
|
|
18
|
+
- import { HaneulClient } from '@haneullabs/haneul/client';
|
|
19
|
+
+ import type { ClientWithCoreApi } from '@haneullabs/haneul/client';
|
|
20
|
+
|
|
21
|
+
- client: HaneulClient;
|
|
22
|
+
+ client: ClientWithCoreApi;
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Access Data via `client.core` methods
|
|
27
|
+
|
|
28
|
+
All data access methods are namespaced under `client.core`:
|
|
29
|
+
|
|
30
|
+
```diff
|
|
31
|
+
- const result = await this.client.getObject({ objectId });
|
|
32
|
+
+ const result = await this.client.core.getObject({ objectId });
|
|
33
|
+
|
|
34
|
+
- const result = await this.client.getOwnedObjects({ owner });
|
|
35
|
+
+ const result = await this.client.core.listOwnedObjects({ owner });
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
| v1.x Method | v2.0 Method |
|
|
39
|
+
| -------------------------------- | --------------------------------- |
|
|
40
|
+
| `client.getObject()` | `client.core.getObject()` |
|
|
41
|
+
| `client.getOwnedObjects()` | `client.core.listOwnedObjects()` |
|
|
42
|
+
| `client.getDynamicFieldObject()` | `client.core.getDynamicField()` |
|
|
43
|
+
| `client.getDynamicFields()` | `client.core.listDynamicFields()` |
|
|
44
|
+
| `client.multiGetObjects()` | `client.core.getObjects()` |
|
|
45
|
+
|
|
46
|
+
See the [Core API documentation](/haneul/clients/core) for all available methods.
|
|
47
|
+
|
|
48
|
+
## Use Peer Dependencies
|
|
49
|
+
|
|
50
|
+
Declare `@haneullabs/*` packages as peer dependencies:
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"@haneullabs/haneul": "^2.0.0"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@haneullabs/haneul": "^2.0.0"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Client Extensions
|
|
64
|
+
|
|
65
|
+
v2.0 introduces client extensions that let users add your SDK to any Haneul client:
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
name: 'mySDK',
|
|
71
|
+
register: (client: ClientWithCoreApi) => {
|
|
72
|
+
return new MySDKClient({ client });
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Users can then extend any client
|
|
78
|
+
const client = new HaneulGrpcClient({ ... }).$extend(mySDK());
|
|
79
|
+
await client.mySDK.doSomething();
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
See the [Building SDKs guide](/haneul/sdk-building#client-extensions) for the complete extension
|
|
83
|
+
pattern.
|
|
84
|
+
|
|
85
|
+
## Code Generation
|
|
86
|
+
|
|
87
|
+
Use **[@haneullabs/codegen](/codegen)** to generate type-safe TypeScript bindings from your Move
|
|
88
|
+
packages. See the [codegen documentation](/codegen) for setup instructions.
|
|
89
|
+
|
|
90
|
+
For complete SDK development patterns including client extensions, transaction thunks, and best
|
|
91
|
+
practices, see the [Building SDKs guide](/haneul/sdk-building).
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# @haneullabs/seal
|
|
2
|
+
|
|
3
|
+
> Migrate @haneullabs/seal to 2.0
|
|
4
|
+
|
|
5
|
+
The deprecated `SealClient.asClientExtension()` static method has been removed. Use the `seal()`
|
|
6
|
+
registration function instead:
|
|
7
|
+
|
|
8
|
+
```diff
|
|
9
|
+
- import { SealClient } from '@haneullabs/seal';
|
|
10
|
+
+ import { seal } from '@haneullabs/seal';
|
|
11
|
+
|
|
12
|
+
- const client = haneulClient.$extend(SealClient.asClientExtension());
|
|
13
|
+
+ const client = haneulClient.$extend(seal());
|
|
14
|
+
```
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Wallet Builders
|
|
2
|
+
|
|
3
|
+
> Migration guide for wallet extension developers
|
|
4
|
+
|
|
5
|
+
This guide covers the breaking changes for wallet builders implementing the
|
|
6
|
+
`@haneullabs/wallet-standard` interface.
|
|
7
|
+
|
|
8
|
+
## Key Changes
|
|
9
|
+
|
|
10
|
+
### Removal of `haneul:reportTransactionEffects`
|
|
11
|
+
|
|
12
|
+
The `haneul:reportTransactionEffects` feature has been removed entirely. If your wallet implements
|
|
13
|
+
this feature, remove it.
|
|
14
|
+
|
|
15
|
+
### New Core API Response Format
|
|
16
|
+
|
|
17
|
+
The most significant change is how you obtain BCS-encoded effects for the
|
|
18
|
+
`signAndExecuteTransaction` response. The new core API returns effects in a different structure.
|
|
19
|
+
|
|
20
|
+
## Migrating `signAndExecuteTransaction`
|
|
21
|
+
|
|
22
|
+
The wallet standard output format hasn't changed - what's different is how you obtain the BCS
|
|
23
|
+
effects when using the new Haneul client APIs.
|
|
24
|
+
|
|
25
|
+
```diff
|
|
26
|
+
#signAndExecuteTransaction: HaneulSignAndExecuteTransactionMethod = async ({
|
|
27
|
+
transaction,
|
|
28
|
+
signal,
|
|
29
|
+
}) => {
|
|
30
|
+
- const { bytes, signature } = await Transaction.from(
|
|
31
|
+
- await transaction.toJSON(),
|
|
32
|
+
- ).sign({ client: haneulClient, signer: keypair });
|
|
33
|
+
-
|
|
34
|
+
- const { rawEffects, digest } = await haneulClient.executeTransactionBlock({
|
|
35
|
+
- signature,
|
|
36
|
+
- transactionBlock: bytes,
|
|
37
|
+
- options: { showRawEffects: true },
|
|
38
|
+
- });
|
|
39
|
+
+ const parsedTransaction = Transaction.from(await transaction.toJSON());
|
|
40
|
+
+ const bytes = await parsedTransaction.build({ client });
|
|
41
|
+
+
|
|
42
|
+
+ const result = await this.#keypair.signAndExecuteTransaction({
|
|
43
|
+
+ transaction: parsedTransaction,
|
|
44
|
+
+ client,
|
|
45
|
+
+ });
|
|
46
|
+
+
|
|
47
|
+
+ const tx = result.Transaction ?? result.FailedTransaction;
|
|
48
|
+
|
|
49
|
+
return {
|
|
50
|
+
- bytes,
|
|
51
|
+
- signature,
|
|
52
|
+
- digest,
|
|
53
|
+
- effects: toBase64(new Uint8Array(rawEffects!)),
|
|
54
|
+
+ bytes: toBase64(bytes),
|
|
55
|
+
+ signature: tx.signatures[0],
|
|
56
|
+
+ digest: tx.digest,
|
|
57
|
+
+ effects: toBase64(tx.effects.bcs!),
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Key changes:
|
|
63
|
+
|
|
64
|
+
- Use `signer.signAndExecuteTransaction()` instead of `haneulClient.executeTransactionBlock()`
|
|
65
|
+
- Response is a union type - unwrap with `result.Transaction ?? result.FailedTransaction`
|
|
66
|
+
- BCS effects are in `tx.effects.bcs` (Uint8Array) instead of `rawEffects` (number array)
|