@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
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
# @haneullabs/haneul
|
|
2
|
+
|
|
3
|
+
> Migrate @haneullabs/haneul from 1.x to 2.0
|
|
4
|
+
|
|
5
|
+
## Removal of HaneulClient Exports
|
|
6
|
+
|
|
7
|
+
The `@haneullabs/haneul/client` export path has been removed. All JSON-RPC client functionality is
|
|
8
|
+
now exported from `@haneullabs/haneul/jsonRpc`.
|
|
9
|
+
|
|
10
|
+
**Removed exports:**
|
|
11
|
+
|
|
12
|
+
- `HaneulClient` (use `HaneulJsonRpcClient` instead)
|
|
13
|
+
- `HaneulClientOptions` (use `HaneulJsonRpcClientOptions` instead)
|
|
14
|
+
- `isHaneulClient` (use `isHaneulJsonRpcClient` instead)
|
|
15
|
+
- `HaneulTransport` (use `JsonRpcTransport` instead)
|
|
16
|
+
- `HaneulTransportRequestOptions` (use `JsonRpcTransportRequestOptions` instead)
|
|
17
|
+
- `HaneulTransportSubscribeOptions` (use `JsonRpcTransportSubscribeOptions` instead)
|
|
18
|
+
- `HaneulHTTPTransportOptions` (use `JsonRpcHTTPTransportOptions` instead)
|
|
19
|
+
- `HaneulHTTPTransport` (use `JsonRpcHTTPTransport` instead)
|
|
20
|
+
- `getFullnodeUrl` (use `getJsonRpcFullnodeUrl` instead)
|
|
21
|
+
- All JSON-RPC types (now exported from `@haneullabs/haneul/jsonRpc`)
|
|
22
|
+
|
|
23
|
+
**Migration:**
|
|
24
|
+
|
|
25
|
+
```diff
|
|
26
|
+
- import { HaneulClient, getFullnodeUrl } from '@haneullabs/haneul/client';
|
|
27
|
+
+ import { HaneulJsonRpcClient, getJsonRpcFullnodeUrl } from '@haneullabs/haneul/jsonRpc';
|
|
28
|
+
|
|
29
|
+
- const client = new HaneulClient({
|
|
30
|
+
- url: getFullnodeUrl('devnet'),
|
|
31
|
+
+ const client = new HaneulJsonRpcClient({
|
|
32
|
+
+ url: getJsonRpcFullnodeUrl('devnet'),
|
|
33
|
+
network: 'devnet',
|
|
34
|
+
});
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Network Parameter Required
|
|
38
|
+
|
|
39
|
+
When creating a new `HaneulGraphQLClient` or `HaneulJsonRpcClient`, you must now provide a `network`
|
|
40
|
+
parameter:
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
const client = new HaneulGraphQLClient({
|
|
44
|
+
url: 'https://...',
|
|
45
|
+
network: 'mainnet', // Required
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const client = new HaneulJsonRpcClient({
|
|
49
|
+
url: 'https://...',
|
|
50
|
+
network: 'mainnet', // Required
|
|
51
|
+
});
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## BCS Schema Changes
|
|
55
|
+
|
|
56
|
+
Several BCS schemas in `@haneullabs/haneul/bcs` have been updated to align exactly with the Rust
|
|
57
|
+
implementation. These changes affect serialization and deserialization of transaction effects and
|
|
58
|
+
objects.
|
|
59
|
+
|
|
60
|
+
### ExecutionStatus Changes
|
|
61
|
+
|
|
62
|
+
**BCS Schema** (when parsing raw effects): The variant was renamed from `Failed` to `Failure`:
|
|
63
|
+
|
|
64
|
+
```diff
|
|
65
|
+
- effects.status.Failed.error
|
|
66
|
+
+ effects.status.Failure.error
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Core API** (gRPC/GraphQL responses): Uses a simplified structure with a `success` boolean:
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
// Core API returns this structure
|
|
73
|
+
const result = await client.core.getTransaction({ digest, include: { effects: true } });
|
|
74
|
+
const tx = result.Transaction ?? result.FailedTransaction;
|
|
75
|
+
|
|
76
|
+
if (tx.effects.status.success) {
|
|
77
|
+
// Transaction succeeded
|
|
78
|
+
} else {
|
|
79
|
+
const error = tx.effects.status.error;
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Object BCS Schema Changes
|
|
84
|
+
|
|
85
|
+
Several changes to object BCS schemas:
|
|
86
|
+
|
|
87
|
+
```diff
|
|
88
|
+
// Renamed Owner enum variant
|
|
89
|
+
const owner = {
|
|
90
|
+
- ConsensusV2: { owner: addr, startVersion: 1 }
|
|
91
|
+
+ ConsensusAddressOwner: { startVersion: 1, owner: addr }
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
// Renamed Data enum variant
|
|
95
|
+
const data = {
|
|
96
|
+
- MoveObject: { ... }
|
|
97
|
+
+ Move: { ... }
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
// Renamed exported schema
|
|
101
|
+
- import { ObjectBcs } from '@haneullabs/haneul/bcs';
|
|
102
|
+
+ import { bcs } from '@haneullabs/haneul/bcs';
|
|
103
|
+
- const bytes = ObjectBcs.serialize(obj);
|
|
104
|
+
+ const bytes = bcs.Object.serialize(obj);
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**This affects serialization.** Any existing serialized data with `ConsensusV2` will need to be
|
|
108
|
+
re-serialized with the new `ConsensusAddressOwner` variant.
|
|
109
|
+
|
|
110
|
+
### UnchangedSharedKind to UnchangedConsensusKind
|
|
111
|
+
|
|
112
|
+
Transaction effects field renamed:
|
|
113
|
+
|
|
114
|
+
```diff
|
|
115
|
+
// Field name change
|
|
116
|
+
- effects.unchangedSharedObjects
|
|
117
|
+
+ effects.unchangedConsensusObjects
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Removed variants:** `MutateDeleted`, `ReadDeleted`
|
|
121
|
+
|
|
122
|
+
**New variants:** `MutateConsensusStreamEnded`, `ReadConsensusStreamEnded`, `Cancelled`,
|
|
123
|
+
`PerEpochConfig`
|
|
124
|
+
|
|
125
|
+
## Experimental Client API Stabilization
|
|
126
|
+
|
|
127
|
+
The experimental client API has been stabilized and moved from `@haneullabs/haneul/experimental` to
|
|
128
|
+
`@haneullabs/haneul/client`. All `Experimental_` prefixes have been removed.
|
|
129
|
+
|
|
130
|
+
**Breaking changes:**
|
|
131
|
+
|
|
132
|
+
- The `@haneullabs/haneul/experimental` module has been removed
|
|
133
|
+
- All `Experimental_` prefixed types and classes have been renamed
|
|
134
|
+
- Client types namespace changed from `Experimental_HaneulClientTypes` to `HaneulClientTypes`
|
|
135
|
+
|
|
136
|
+
**Migration:**
|
|
137
|
+
|
|
138
|
+
```diff
|
|
139
|
+
- import {
|
|
140
|
+
- Experimental_BaseClient,
|
|
141
|
+
- Experimental_CoreClient,
|
|
142
|
+
- type Experimental_HaneulClientTypes,
|
|
143
|
+
- type Experimental_CoreClientOptions,
|
|
144
|
+
- } from '@haneullabs/haneul/experimental';
|
|
145
|
+
+ import {
|
|
146
|
+
+ BaseClient,
|
|
147
|
+
+ CoreClient,
|
|
148
|
+
+ type HaneulClientTypes,
|
|
149
|
+
+ type CoreClientOptions,
|
|
150
|
+
+ } from '@haneullabs/haneul/client';
|
|
151
|
+
|
|
152
|
+
// Update class extensions
|
|
153
|
+
- class MyClient extends Experimental_CoreClient {
|
|
154
|
+
+ class MyClient extends CoreClient {
|
|
155
|
+
async getObjects(
|
|
156
|
+
- options: Experimental_HaneulClientTypes.GetObjectsOptions,
|
|
157
|
+
- ): Promise<Experimental_HaneulClientTypes.GetObjectsResponse> {
|
|
158
|
+
+ options: HaneulClientTypes.GetObjectsOptions,
|
|
159
|
+
+ ): Promise<HaneulClientTypes.GetObjectsResponse> {
|
|
160
|
+
// ...
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Common renames:**
|
|
166
|
+
|
|
167
|
+
| Old Name | New Name |
|
|
168
|
+
| -------------------------------- | ------------------- |
|
|
169
|
+
| `Experimental_BaseClient` | `BaseClient` |
|
|
170
|
+
| `Experimental_CoreClient` | `CoreClient` |
|
|
171
|
+
| `Experimental_HaneulClientTypes` | `HaneulClientTypes` |
|
|
172
|
+
| `Experimental_CoreClientOptions` | `CoreClientOptions` |
|
|
173
|
+
|
|
174
|
+
## Commands Renamed to TransactionCommands
|
|
175
|
+
|
|
176
|
+
The `Commands` type exported from `@haneullabs/haneul/transactions` has been renamed to
|
|
177
|
+
`TransactionCommands` because `Commands` is a reserved keyword in React Native.
|
|
178
|
+
|
|
179
|
+
```diff
|
|
180
|
+
- import { Commands } from '@haneullabs/haneul/transactions';
|
|
181
|
+
+ import { TransactionCommands } from '@haneullabs/haneul/transactions';
|
|
182
|
+
|
|
183
|
+
- const coin = tx.add(Commands.SplitCoins(tx.gas, [tx.pure.u64(100)]));
|
|
184
|
+
+ const coin = tx.add(TransactionCommands.SplitCoins(tx.gas, [tx.pure.u64(100)]));
|
|
185
|
+
|
|
186
|
+
- tx.add(Commands.TransferObjects([coin], recipient));
|
|
187
|
+
+ tx.add(TransactionCommands.TransferObjects([coin], recipient));
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## GraphQL Schema Consolidation
|
|
191
|
+
|
|
192
|
+
The SDK now exports a single unified GraphQL schema instead of multiple versioned schemas.
|
|
193
|
+
|
|
194
|
+
**Removed exports:**
|
|
195
|
+
|
|
196
|
+
- `@haneullabs/haneul/graphql/schemas/2024.1`
|
|
197
|
+
- `@haneullabs/haneul/graphql/schemas/2024.4`
|
|
198
|
+
- `@haneullabs/haneul/graphql/schemas/latest`
|
|
199
|
+
|
|
200
|
+
**Migration:**
|
|
201
|
+
|
|
202
|
+
```diff
|
|
203
|
+
- import { graphql } from '@haneullabs/haneul/graphql/schemas/latest';
|
|
204
|
+
- import { graphql } from '@haneullabs/haneul/graphql/schemas/2024.4';
|
|
205
|
+
- import { graphql } from '@haneullabs/haneul/graphql/schemas/2024.1';
|
|
206
|
+
+ import { graphql } from '@haneullabs/haneul/graphql/schema';
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## Named Packages Plugin Removed
|
|
210
|
+
|
|
211
|
+
The `namedPackagesPlugin` and global plugin registry APIs have been removed. MVR (Move Registry)
|
|
212
|
+
resolution is now built directly into the core client.
|
|
213
|
+
|
|
214
|
+
**Removed:**
|
|
215
|
+
|
|
216
|
+
- `namedPackagesPlugin` function
|
|
217
|
+
- `NamedPackagesPluginOptions` type (from `@haneullabs/haneul/transactions`)
|
|
218
|
+
- `Transaction.registerGlobalSerializationPlugin()` static method
|
|
219
|
+
- `Transaction.unregisterGlobalSerializationPlugin()` static method
|
|
220
|
+
- `Transaction.registerGlobalBuildPlugin()` static method
|
|
221
|
+
- `Transaction.unregisterGlobalBuildPlugin()` static method
|
|
222
|
+
|
|
223
|
+
**How it works now:**
|
|
224
|
+
|
|
225
|
+
MVR name resolution happens automatically during transaction building. The SDK detects `.move` names
|
|
226
|
+
(like `@org/package::module::Type`) and resolves them using the client's MVR resolver.
|
|
227
|
+
|
|
228
|
+
**Migration:**
|
|
229
|
+
|
|
230
|
+
```diff
|
|
231
|
+
- import { Transaction, namedPackagesPlugin } from '@haneullabs/haneul/transactions';
|
|
232
|
+
-
|
|
233
|
+
- Transaction.registerGlobalSerializationPlugin(
|
|
234
|
+
- 'namedPackages',
|
|
235
|
+
- namedPackagesPlugin({
|
|
236
|
+
- url: 'https://mainnet.mvr.haneul-labs.com',
|
|
237
|
+
- overrides: myOverrides,
|
|
238
|
+
- })
|
|
239
|
+
- );
|
|
240
|
+
|
|
241
|
+
+ import { HaneulJsonRpcClient } from '@haneullabs/haneul/jsonRpc';
|
|
242
|
+
+ import type { NamedPackagesOverrides } from '@haneullabs/haneul/client';
|
|
243
|
+
+
|
|
244
|
+
+ const client = new HaneulJsonRpcClient({
|
|
245
|
+
+ url: 'https://fullnode.mainnet.haneul.io:443',
|
|
246
|
+
+ network: 'mainnet',
|
|
247
|
+
+ mvr: {
|
|
248
|
+
+ overrides: myOverrides,
|
|
249
|
+
+ },
|
|
250
|
+
+ });
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## Transaction Executors Now Accept Any Client
|
|
254
|
+
|
|
255
|
+
The transaction executor classes now accept any client implementing `ClientWithCoreApi` instead of
|
|
256
|
+
requiring `HaneulJsonRpcClient` specifically.
|
|
257
|
+
|
|
258
|
+
**Affected classes:**
|
|
259
|
+
|
|
260
|
+
- `CachingTransactionExecutor`
|
|
261
|
+
- `SerialTransactionExecutor`
|
|
262
|
+
- `ParallelTransactionExecutor`
|
|
263
|
+
|
|
264
|
+
**Breaking changes:**
|
|
265
|
+
|
|
266
|
+
- Constructor `client` parameter type changed from `HaneulJsonRpcClient` to `ClientWithCoreApi`
|
|
267
|
+
- Return type of `executeTransaction()`: `data` property renamed to `result`
|
|
268
|
+
- The second parameter changed from JSON-RPC options to core API include options
|
|
269
|
+
|
|
270
|
+
**Migration:**
|
|
271
|
+
|
|
272
|
+
```diff
|
|
273
|
+
|
|
274
|
+
- import { HaneulJsonRpcClient } from '@haneullabs/haneul/jsonRpc';
|
|
275
|
+
+ // Works with any client: HaneulJsonRpcClient, HaneulGrpcClient, or HaneulGraphQLClient
|
|
276
|
+
|
|
277
|
+
const executor = new SerialTransactionExecutor({
|
|
278
|
+
- client: jsonRpcClient,
|
|
279
|
+
+ client, // Any ClientWithCoreApi-compatible client
|
|
280
|
+
signer,
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
const result = await executor.executeTransaction(tx);
|
|
284
|
+
|
|
285
|
+
// Accessing the transaction result (changed)
|
|
286
|
+
- console.log(result.data.effects?.status.status);
|
|
287
|
+
+ const tx = result.Transaction ?? result.FailedTransaction;
|
|
288
|
+
+ console.log(tx.effects.status.success);
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
Include options have also changed:
|
|
292
|
+
|
|
293
|
+
```diff
|
|
294
|
+
- const result = await executor.executeTransaction(tx, {
|
|
295
|
+
- showEffects: true,
|
|
296
|
+
- showEvents: true,
|
|
297
|
+
- });
|
|
298
|
+
+ const result = await executor.executeTransaction(tx, {
|
|
299
|
+
+ effects: true,
|
|
300
|
+
+ events: true,
|
|
301
|
+
+ });
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
## ZkLogin Changes
|
|
305
|
+
|
|
306
|
+
### legacyAddress Parameter Required
|
|
307
|
+
|
|
308
|
+
The `legacyAddress` parameter is now **required** for all zkLogin address computation functions.
|
|
309
|
+
|
|
310
|
+
**Migration (to preserve existing behavior):**
|
|
311
|
+
|
|
312
|
+
```diff
|
|
313
|
+
// computeZkLoginAddressFromSeed (previous default: true)
|
|
314
|
+
- computeZkLoginAddressFromSeed(seed, iss)
|
|
315
|
+
+ computeZkLoginAddressFromSeed(seed, iss, true)
|
|
316
|
+
|
|
317
|
+
// jwtToAddress (previous default: false)
|
|
318
|
+
- jwtToAddress(jwt, userSalt)
|
|
319
|
+
+ jwtToAddress(jwt, userSalt, false)
|
|
320
|
+
|
|
321
|
+
// computeZkLoginAddress (previous default: false)
|
|
322
|
+
- computeZkLoginAddress({ claimName, claimValue, iss, aud, userSalt })
|
|
323
|
+
+ computeZkLoginAddress({ claimName, claimValue, iss, aud, userSalt, legacyAddress: false })
|
|
324
|
+
|
|
325
|
+
// toZkLoginPublicIdentifier (no previous default)
|
|
326
|
+
- toZkLoginPublicIdentifier(addressSeed, iss)
|
|
327
|
+
+ toZkLoginPublicIdentifier(addressSeed, iss, { legacyAddress: false })
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
## Default Transaction Expiration
|
|
331
|
+
|
|
332
|
+
Transactions now default the expiration to the current epoch + 1 using `ValidDuring` when built with
|
|
333
|
+
a client. This provides replay protection for all transactions without requiring explicit
|
|
334
|
+
configuration.
|
|
335
|
+
|
|
336
|
+
**To preserve the old behavior** (no expiration), explicitly set the expiration to `None`:
|
|
337
|
+
|
|
338
|
+
```typescript
|
|
339
|
+
const tx = new Transaction();
|
|
340
|
+
tx.setExpiration({ None: true });
|
|
341
|
+
```
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# @haneullabs/haneulns
|
|
2
|
+
|
|
3
|
+
> Migrate @haneullabs/haneulns to 2.0
|
|
4
|
+
|
|
5
|
+
This package now exports a client extension that integrates with Haneul clients.
|
|
6
|
+
|
|
7
|
+
```diff
|
|
8
|
+
- import { HaneulClient, getFullnodeUrl } from '@haneullabs/haneul/client';
|
|
9
|
+
- import { HaneulnsClient } from '@haneullabs/haneulns';
|
|
10
|
+
+ import { HaneulGrpcClient } from '@haneullabs/haneul/grpc'; // or HaneulJsonRpcClient, HaneulGraphQLClient
|
|
11
|
+
+ import { haneulns } from '@haneullabs/haneulns';
|
|
12
|
+
|
|
13
|
+
- const haneulClient = new HaneulClient({ url: getFullnodeUrl('mainnet') });
|
|
14
|
+
- const haneulnsClient = new HaneulnsClient({
|
|
15
|
+
- client: haneulClient,
|
|
16
|
+
- network: 'mainnet',
|
|
17
|
+
- });
|
|
18
|
+
+ const client = new HaneulGrpcClient({
|
|
19
|
+
+ baseUrl: 'https://fullnode.mainnet.haneul.io:443',
|
|
20
|
+
+ network: 'mainnet',
|
|
21
|
+
+ }).$extend(haneulns());
|
|
22
|
+
|
|
23
|
+
- const nameRecord = await haneulnsClient.getNameRecord('example.haneul');
|
|
24
|
+
+ const nameRecord = await client.haneulns.getNameRecord('example.haneul');
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Custom Package IDs
|
|
28
|
+
|
|
29
|
+
For custom deployments or networks other than mainnet/testnet, you can provide custom package info:
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
const customPackageInfo: PackageInfo = {
|
|
33
|
+
packageId: '0x...',
|
|
34
|
+
packageIdV1: '0x...',
|
|
35
|
+
// ... other required fields
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const client = new HaneulGrpcClient({
|
|
39
|
+
baseUrl: 'http://localhost:9000',
|
|
40
|
+
network: 'localnet',
|
|
41
|
+
}).$extend(haneulns({ packageInfo: customPackageInfo }));
|
|
42
|
+
```
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Migrate to 2.0
|
|
2
|
+
|
|
3
|
+
> Migration guide for Haneul TypeScript SDK 2.0
|
|
4
|
+
|
|
5
|
+
This guide covers the breaking changes across the latest release of all the `@haneullabs/*`
|
|
6
|
+
packages.
|
|
7
|
+
|
|
8
|
+
The primary goal of this release is to support the new GRPC and GraphQL APIs across all the
|
|
9
|
+
haneullabs SDKs. These releases also include removals of deprecated APIs, some renaming for better
|
|
10
|
+
consistency, and significant internal refactoring to improve maintainability. Starting with this
|
|
11
|
+
release, Haneullabs packages will now be published as ESM only packages.
|
|
12
|
+
|
|
13
|
+
## Quick Reference
|
|
14
|
+
|
|
15
|
+
| Package | Key Changes |
|
|
16
|
+
| ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
|
|
17
|
+
| [@haneullabs/haneul](/haneul/migrations/haneul-2.0/haneul) | Client API stabilization, HaneulClient removal, BCS schema alignment, transaction executors |
|
|
18
|
+
| [@haneullabs/dapp-kit](/haneul/migrations/haneul-2.0/dapp-kit) | Complete rewrite with framework-agnostic core |
|
|
19
|
+
| [@haneullabs/kiosk](/haneul/migrations/haneul-2.0/kiosk) | Client extension pattern, low-level helpers removed, KioskTransaction pattern |
|
|
20
|
+
| [@haneullabs/zksend](/haneul/migrations/haneul-2.0/zksend) | Client extension pattern |
|
|
21
|
+
| [@haneullabs/haneulns](/haneul/migrations/haneul-2.0/haneulns) | Client extension pattern |
|
|
22
|
+
| [@haneullabs/deepbook-v3](/haneul/migrations/haneul-2.0/deepbook-v3) | Client extension pattern |
|
|
23
|
+
| [@haneullabs/walrus](/haneul/migrations/haneul-2.0/walrus) | Client extension pattern, requires client instead of RPC URL |
|
|
24
|
+
| [@haneullabs/seal](/haneul/migrations/haneul-2.0/seal) | Client extension pattern |
|
|
25
|
+
| [@haneullabs/wallet-standard](/haneul/migrations/haneul-2.0/wallet-builders) | Removal of reportTransactionEffects, new core API response format |
|
|
26
|
+
| [Migrating from JSON-RPC](/haneul/migrations/haneul-2.0/json-rpc-migration) | Migrate from deprecated JSON-RPC to gRPC and GraphQL |
|
|
27
|
+
|
|
28
|
+
## Common Migration Patterns
|
|
29
|
+
|
|
30
|
+
### ESM Migration
|
|
31
|
+
|
|
32
|
+
All `@haneullabs/*` packages are now ESM only. If your project does not already use ESM, you will
|
|
33
|
+
need to add `"type": "module"` to your `package.json`:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"type": "module"
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
If you are using TypeScript with `moduleResolution` `"Node"`, `"Classic"`, or `"Node10"`, you will
|
|
42
|
+
need to update your `tsconfig.json` to use `"NodeNext"`, `"Node16"`, or `"Bundler"`:
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"compilerOptions": {
|
|
47
|
+
"moduleResolution": "NodeNext",
|
|
48
|
+
"module": "NodeNext"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
This enables proper resolution of the SDK's subpath exports (e.g., `@haneullabs/haneul/client`,
|
|
54
|
+
`@haneullabs/haneul/transactions`).
|
|
55
|
+
|
|
56
|
+
If you maintain a library that depends on any of the `@haneullabs/*` packages, you may also need to
|
|
57
|
+
update your library to be ESM only to ensure it works correctly everywhere.
|
|
58
|
+
|
|
59
|
+
Applications using bundlers and recent Node.js versions (>=22) may still work when using `require`
|
|
60
|
+
to load ESM packages, but we recommend migrating to ESM.
|
|
61
|
+
|
|
62
|
+
**Why ESM only?** Many packages in the ecosystem (specifically critical cryptography dependencies)
|
|
63
|
+
are now published as ESM only. Supporting CommonJS has prevented us from using the latest versions
|
|
64
|
+
of these dependencies, making our SDKs harder to maintain and risking missing critical security
|
|
65
|
+
updates.
|
|
66
|
+
|
|
67
|
+
### Client Migration
|
|
68
|
+
|
|
69
|
+
The most common change across all SDKs is migrating from `HaneulClient` to `HaneulJsonRpcClient`:
|
|
70
|
+
|
|
71
|
+
```diff
|
|
72
|
+
- import { HaneulClient, getFullnodeUrl } from '@haneullabs/haneul/client';
|
|
73
|
+
+ import { HaneulJsonRpcClient, getJsonRpcFullnodeUrl } from '@haneullabs/haneul/jsonRpc';
|
|
74
|
+
|
|
75
|
+
- const client = new HaneulClient({ url: getFullnodeUrl('mainnet') });
|
|
76
|
+
+ const client = new HaneulJsonRpcClient({
|
|
77
|
+
+ url: getJsonRpcFullnodeUrl('mainnet'),
|
|
78
|
+
+ network: 'mainnet',
|
|
79
|
+
+ });
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
We also recommend moving from the deprecated JSON RPC Apis to the new gRPC API as soon as possible:
|
|
83
|
+
|
|
84
|
+
```diff
|
|
85
|
+
- import { HaneulJsonRpcClient } from '@haneullabs/haneul/jsonRpc';
|
|
86
|
+
+ import { HaneulGrpcClient } from '@haneullabs/haneul/grpc';
|
|
87
|
+
|
|
88
|
+
- const client = new HaneulJsonRpcClient({ url, network: 'mainnet' });
|
|
89
|
+
+ const client = new HaneulGrpcClient({ baseUrl, network: 'mainnet' });
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The gRPC runs on full nodes so in most cases you should be able to use the same URLs when migrating
|
|
93
|
+
to gRPC.
|
|
94
|
+
|
|
95
|
+
### Network Parameter Required
|
|
96
|
+
|
|
97
|
+
All client constructors now require an explicit `network` parameter:
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
const client = new HaneulJsonRpcClient({
|
|
101
|
+
url: getJsonRpcFullnodeUrl('mainnet'),
|
|
102
|
+
network: 'mainnet', // Required
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
const graphqlClient = new HaneulGraphQLClient({
|
|
106
|
+
url: 'https://haneul-mainnet.haneul-labs.com/graphql',
|
|
107
|
+
network: 'mainnet', // Required
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
const grpcClient = new HaneulGrpcClient({
|
|
111
|
+
baseUrl: 'https://fullnode.mainnet.haneul.io:443',
|
|
112
|
+
network: 'mainnet', // Required
|
|
113
|
+
});
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### ClientWithCoreApi Interface
|
|
117
|
+
|
|
118
|
+
Many SDK methods now accept any client implementing `ClientWithCoreApi`, enabling use with JSON-RPC,
|
|
119
|
+
GraphQL, or gRPC transports:
|
|
120
|
+
|
|
121
|
+
```ts
|
|
122
|
+
// All of these work with APIs that accept ClientWithCoreApi
|
|
123
|
+
const jsonRpcClient = new HaneulJsonRpcClient({ url, network: 'mainnet' });
|
|
124
|
+
const graphqlClient = new HaneulGraphQLClient({ url, network: 'mainnet' });
|
|
125
|
+
const grpcClient = new HaneulGrpcClient({ baseUrl, network: 'mainnet' });
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Package-Specific Guides
|
|
129
|
+
|
|
130
|
+
For detailed migration instructions, see the SDK-specific guides:
|
|
131
|
+
|
|
132
|
+
- **[@haneullabs/haneul](/haneul/migrations/haneul-2.0/haneul)** - Core SDK changes including client
|
|
133
|
+
API, BCS schemas, transactions, zkLogin, and GraphQL
|
|
134
|
+
- **[@haneullabs/dapp-kit](/haneul/migrations/haneul-2.0/dapp-kit)** - Complete migration guide for
|
|
135
|
+
the new dApp Kit architecture
|
|
136
|
+
- **[@haneullabs/kiosk](/haneul/migrations/haneul-2.0/kiosk)** - Kiosk SDK now exports a client
|
|
137
|
+
extension, low-level helpers removed
|
|
138
|
+
- **[@haneullabs/zksend](/haneul/migrations/haneul-2.0/zksend)** - zkSend SDK now exports a client
|
|
139
|
+
extension
|
|
140
|
+
- **[@haneullabs/haneulns](/haneul/migrations/haneul-2.0/haneulns)** - HaneulNS now exports a client
|
|
141
|
+
extension
|
|
142
|
+
- **[@haneullabs/deepbook-v3](/haneul/migrations/haneul-2.0/deepbook-v3)** - DeepBook DEX now
|
|
143
|
+
exports a client extension
|
|
144
|
+
- **[@haneullabs/walrus](/haneul/migrations/haneul-2.0/walrus)** - Walrus storage now exports a
|
|
145
|
+
client extension
|
|
146
|
+
- **[@haneullabs/seal](/haneul/migrations/haneul-2.0/seal)** - Seal encryption now exports a client
|
|
147
|
+
extension
|
|
148
|
+
|
|
149
|
+
## Transport Migration
|
|
150
|
+
|
|
151
|
+
- **[Migrating from JSON-RPC](/haneul/migrations/haneul-2.0/json-rpc-migration)** - Migrate from the
|
|
152
|
+
deprecated JSON-RPC client to gRPC and GraphQL
|
|
153
|
+
|
|
154
|
+
## Ecosystem Migration Guides
|
|
155
|
+
|
|
156
|
+
For wallet builders and SDK maintainers building on the Haneul ecosystem:
|
|
157
|
+
|
|
158
|
+
- **[Wallet Builders](/haneul/migrations/haneul-2.0/wallet-builders)** - Guide for wallet
|
|
159
|
+
implementations adapting to `reportTransactionEffects` removal and new core API response format
|
|
160
|
+
- **[SDK Maintainers](/haneul/migrations/haneul-2.0/sdk-maintainers)** - Guide for SDK authors
|
|
161
|
+
migrating to `ClientWithCoreApi` and the new transport-agnostic architecture
|