@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,148 @@
|
|
|
1
|
+
# Transaction Executors
|
|
2
|
+
|
|
3
|
+
> Manage transaction execution with queuing and parallel strategies
|
|
4
|
+
|
|
5
|
+
The Typescript SDK ships 2 Transaction executor classes that simplify the processes of efficiently
|
|
6
|
+
executing multiple transactions signed by the same address. These executors help manage object
|
|
7
|
+
versions and gas coins which significantly reduces the number of requests made to RPC nodes, and for
|
|
8
|
+
many cases avoids the need to wait for the RPC nodes to index previously executed transactions.
|
|
9
|
+
|
|
10
|
+
## `SerialTransactionExecutor`
|
|
11
|
+
|
|
12
|
+
The `SerialTransactionExecutor` is designed for use in wallet implementations, and dapps where the
|
|
13
|
+
objects owned by the address executing transactions are unlikely to be changed by transactions not
|
|
14
|
+
executed through the executor.
|
|
15
|
+
|
|
16
|
+
To fund transactions, the `SerialTransactionExecutor` will select all of the senders HANEUL coins
|
|
17
|
+
for the first transaction, which will result in a single coin that will then be used as the gas
|
|
18
|
+
payment on all subsequent transactions. This allows executing multiple transactions, without needing
|
|
19
|
+
to re-query for gas coins, or wait for the RPC node to index the previous transactions.
|
|
20
|
+
|
|
21
|
+
To further improve execution efficiency, the `SerialTransactionExecutor` caches the object versions
|
|
22
|
+
of every object used or created by a transaction. This will significantly speed up the execution
|
|
23
|
+
when multiple transactions use the same objects.
|
|
24
|
+
|
|
25
|
+
`SerialTransactionExecutor` maintains an internal queue, so you don't need to wait for previous
|
|
26
|
+
transactions to finish before sending the next one.
|
|
27
|
+
|
|
28
|
+
`SerialTransactionExecutor` can be configured with a number of options:
|
|
29
|
+
|
|
30
|
+
- `client`: An instance of a Haneul client (such as `HaneulGrpcClient`) used to execute
|
|
31
|
+
transactions.
|
|
32
|
+
- `signer`: The signer/keypair used for signed transactions.
|
|
33
|
+
- `defaultBudget`: The default budget for transactions, which will be used if the transaction does
|
|
34
|
+
not specify a budget (default `50_000_000n`).
|
|
35
|
+
- `gasMode`: Either `'coins'` (default) to use owned coins for gas, or `'addressBalance'` to pay gas
|
|
36
|
+
from the sender's address balance.
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
const client = new HaneulGrpcClient({
|
|
40
|
+
network: 'devnet',
|
|
41
|
+
baseUrl: 'https://fullnode.devnet.haneul.io:443',
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const executor = new SerialTransactionExecutor({
|
|
45
|
+
client,
|
|
46
|
+
signer: yourKeyPair,
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const tx1 = new Transaction();
|
|
50
|
+
const [coin1] = tx1.splitCoins(tx1.gas, [1]);
|
|
51
|
+
tx1.transferObjects([coin1], address1);
|
|
52
|
+
const tx2 = new Transaction();
|
|
53
|
+
const [coin2] = tx2.splitCoins(tx2.gas, [1]);
|
|
54
|
+
tx2.transferObjects([coin2], address2);
|
|
55
|
+
|
|
56
|
+
const [{ digest: digest1 }, { digest: digest2 }] = await Promise.all([
|
|
57
|
+
executor.executeTransaction(tx1),
|
|
58
|
+
executor.executeTransaction(tx2),
|
|
59
|
+
]);
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## `ParallelTransactionExecutor`
|
|
63
|
+
|
|
64
|
+
> **Warning:** `ParallelTransactionExecutor` is experimental and may change rapidly as it is being
|
|
65
|
+
> developed.
|
|
66
|
+
|
|
67
|
+
The `ParallelTransactionExecutor` class works similarly to the `SerialTransactionExecutor`, but
|
|
68
|
+
allows for parallel execution of transactions. To make this work, the `ParallelTransactionExecutor`
|
|
69
|
+
will maintain a pool of gas coins, and automatically execute additional transactions to refill the
|
|
70
|
+
gas pool as needed.
|
|
71
|
+
|
|
72
|
+
> **Warning:** Using other client methods or wallets to execute additional transactions while
|
|
73
|
+
> `ParallelTransactionExecutor` is in use may consume/combine gas coins in the gasPool, causing
|
|
74
|
+
> transactions to fail. This may also result in the coins becoming locked for the remainder of the
|
|
75
|
+
> current epoch, preventing them from being used in future transactions.
|
|
76
|
+
>
|
|
77
|
+
> Running multiple instances of `ParallelTransactionExecutor` using the same `sourceCoins` will
|
|
78
|
+
> result in the same issues.
|
|
79
|
+
|
|
80
|
+
In addition to managing gas and caching object versions, the `ParallelTransactionExecutor` will
|
|
81
|
+
automatically detect what objects are being used by transactions, and schedules transactions in a
|
|
82
|
+
way that avoids conflicts between transactions using the same object ids.
|
|
83
|
+
|
|
84
|
+
`ParallelTransactionExecutor` can be configured with a number of options:
|
|
85
|
+
|
|
86
|
+
- `client`: An instance of `HaneulJsonRpcClient` used to execute transactions.
|
|
87
|
+
- `signer`: The signer/keypair used for signed transactions.
|
|
88
|
+
- `gasMode`: Either `'coins'` (default) to use owned coins for gas, or `'addressBalance'` to pay gas
|
|
89
|
+
from the sender's address balance. When using `'addressBalance'`, coin-specific options like
|
|
90
|
+
`coinBatchSize`, `initialCoinBalance`, `minimumCoinBalance`, and `sourceCoins` are not available.
|
|
91
|
+
- `coinBatchSize`: The maximum number of new coins to create when refilling the gas pool
|
|
92
|
+
(default 20)
|
|
93
|
+
- `initialCoinBalance`: The balance of new coins created for the gas pool in GEUNHWA (default
|
|
94
|
+
`200_000_000n`),
|
|
95
|
+
- `minimumCoinBalance`: After executing a transaction, the gasCoin will be reused unless it's
|
|
96
|
+
balance is below this value (default `50_000_000n`),
|
|
97
|
+
- `defaultBudget`: The default budget for transactions, which will be used if the transaction does
|
|
98
|
+
not specify a budget (default `minimumCoinBalance`),
|
|
99
|
+
- `maxPoolSize`: The maximum number of gas coins to keep in the gas pool, which also limits the
|
|
100
|
+
maximum number of concurrent transactions (default 50),
|
|
101
|
+
- `sourceCoins`: An array of coins to use to create the gas pool, defaults to using all coins owned
|
|
102
|
+
by the signer.
|
|
103
|
+
- `epochBoundaryWindow` Time to wait before/after the expected epoch boundary before re-fetching the
|
|
104
|
+
gas pool (in milliseconds). Building transactions will be paused for up to 2x this duration around
|
|
105
|
+
each epoch boundary to ensure the gas price is up-to-date for the next epoch. (default `1000`)
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
const client = new HaneulJsonRpcClient({ url: getJsonRpcFullnodeUrl('devnet'), network: 'devnet' });
|
|
109
|
+
|
|
110
|
+
const executor = new ParallelTransactionExecutor({
|
|
111
|
+
client,
|
|
112
|
+
signer: yourKeyPair,
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
const tx1 = new Transaction();
|
|
116
|
+
const [coin1] = tx1.splitCoins(tx1.gas, [1]);
|
|
117
|
+
tx1.transferObjects([coin1], address1);
|
|
118
|
+
const tx2 = new Transaction();
|
|
119
|
+
const [coin2] = tx2.splitCoins(tx2.gas, [1]);
|
|
120
|
+
tx2.transferObjects([coin2], address2);
|
|
121
|
+
|
|
122
|
+
const [{ digest: digest1 }, { digest: digest2 }] = await Promise.all([
|
|
123
|
+
executor.executeTransaction(tx1),
|
|
124
|
+
executor.executeTransaction(tx2),
|
|
125
|
+
]);
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Building and Executing Transactions with Executors
|
|
129
|
+
|
|
130
|
+
The executor classes will significantly improve efficiency when executing multiple transactions, but
|
|
131
|
+
to get the best results there are some best practices to follow:
|
|
132
|
+
|
|
133
|
+
When building transactions, always prefer using unresolved object IDs rather than specifying the
|
|
134
|
+
full `id`/`version`/`digest` for an object input (eg use `tx.object(id)` rather than
|
|
135
|
+
`tx.objectRef({ objectId, version, digest })`). By doing this, you allow the executor to use object
|
|
136
|
+
versions and digests from the cache, and will avoid executing transactions using stale object
|
|
137
|
+
versions.
|
|
138
|
+
|
|
139
|
+
If the signer executes transactions that are not sent through the executor that may cause
|
|
140
|
+
transactions to fail. The executor classes will handle this by invalidating the cache for any
|
|
141
|
+
objects used in the transaction, so you will often be able to recover by re-trying a failed
|
|
142
|
+
transaction once. If it was caused by a stale cache, it should succeed on the second execution.
|
|
143
|
+
|
|
144
|
+
> **Warning:** Transaction plugins and intents may resolve their own data (such as object
|
|
145
|
+
> references) that are not automatically managed by the executor's object cache. This can cause
|
|
146
|
+
> transactions to include stale object versions. The `coinWithBalance` intent is partially supported
|
|
147
|
+
> by the executors and will work correctly when all coin types are either HANEUL or the required
|
|
148
|
+
> balances are available as address balances rather than coin objects.
|
package/docs/faucet.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Faucet
|
|
2
|
+
|
|
3
|
+
> Request test HANEUL tokens from the faucet
|
|
4
|
+
|
|
5
|
+
Devnet, Testnet, and local networks include faucets that mint HANEUL. You can use the Haneul
|
|
6
|
+
TypeScript SDK to call a network's faucet and provide HANEUL to the address you provide.
|
|
7
|
+
|
|
8
|
+
To request HANEUL from a faucet, import the `requestHaneulFromFaucetV2` function from the
|
|
9
|
+
`@haneullabs/haneul/faucet` package to your project.
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Use `requestHaneulFromFaucetV2` in your TypeScript code to request HANEUL from the network's faucet.
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
await requestHaneulFromFaucetV2({
|
|
19
|
+
host: getFaucetHost('testnet'),
|
|
20
|
+
recipient: <RECIPIENT_ADDRESS>,
|
|
21
|
+
});
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
> **Note:** Faucets on Devnet and Testnet are rate limited. If you run the script too many times,
|
|
25
|
+
> you surpass the limit and must wait to successfully run it again. For testnet, the best way to get
|
|
26
|
+
> HANEUL is via the Web UI: `faucet.haneul.io`.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Hello Haneul
|
|
2
|
+
|
|
3
|
+
> Build your first Haneul application with the TypeScript SDK
|
|
4
|
+
|
|
5
|
+
This basic example introduces you to the Haneul TypeScript SDK. The Node.js example mints HANEUL on
|
|
6
|
+
a Haneul network and then queries the address to get a sum for the owned HANEUL. You don't need to
|
|
7
|
+
use an IDE to complete the example, but one like Microsoft Visual Studio Code helps centralize more
|
|
8
|
+
advanced projects.
|
|
9
|
+
|
|
10
|
+
## Before you begin
|
|
11
|
+
|
|
12
|
+
You need an address on a Haneul development network (Devnet, Testnet, local). If you don't already
|
|
13
|
+
have an address, use the [Haneul Client CLI](https://docs.haneul.io/references/cli/client) or the
|
|
14
|
+
[Haneul Wallet browser extension](https://docs.haneul-labs.com) to create one.
|
|
15
|
+
|
|
16
|
+
You also need [Node.js](https://nodejs.org/en/download/current) and a package manager like
|
|
17
|
+
[pnpm](https://pnpm.io/installation) to follow this example, so install them on your system if you
|
|
18
|
+
haven't already.
|
|
19
|
+
|
|
20
|
+
## Start a project
|
|
21
|
+
|
|
22
|
+
Using a Terminal or Console, create a folder on your system (`hello-haneul` in this example) and
|
|
23
|
+
make it the working directory.
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
mkdir hello-haneul
|
|
27
|
+
cd hello-haneul
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
When you use a package manager to install the necessary packages, it downloads the modules to your
|
|
31
|
+
`node_modules` folder and adds the references to your `package.json` file, creating the file if it
|
|
32
|
+
doesn't already exist. For this example, you need only the Haneul TypeScript SDK:
|
|
33
|
+
|
|
34
|
+
```sh npm2yarn
|
|
35
|
+
npm i -D @haneullabs/haneul
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The SDK is published as an ESM only package, so you also need to set `"type": "module"` in your
|
|
39
|
+
`package.json`. Your `package.json` file should look like this:
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"type": "module",
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@haneullabs/haneul": "^<VERSION_NUMBER>"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Get some HANEUL for your account
|
|
51
|
+
|
|
52
|
+
Instead of a 'Hello World' output to your console, this example introduces some HANEUL to your
|
|
53
|
+
wallet address. You must be on Devnet, Testnet, or a local network to use a faucet for minting
|
|
54
|
+
HANEUL.
|
|
55
|
+
|
|
56
|
+
Create a new `index.js` file in the root of your project with the following code.
|
|
57
|
+
|
|
58
|
+
```js
|
|
59
|
+
// replace <YOUR_HANEUL_ADDRESS> with your actual address, which is in the form 0x123...
|
|
60
|
+
const MY_ADDRESS = '<YOUR_HANEUL_ADDRESS>';
|
|
61
|
+
|
|
62
|
+
// create a new HaneulGrpcClient object pointing to the network you want to use
|
|
63
|
+
const haneulClient = new HaneulGrpcClient({
|
|
64
|
+
network: 'devnet',
|
|
65
|
+
baseUrl: 'https://fullnode.devnet.haneul.io:443',
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
// Convert GEUNHWA to Haneul
|
|
69
|
+
const balance = (balance) => {
|
|
70
|
+
return Number.parseInt(balance.totalBalance) / Number(GEUNHWA_PER_HANEUL);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// store the JSON representation for the HANEUL the address owns before using faucet
|
|
74
|
+
const haneulBefore = await haneulClient.getBalance({
|
|
75
|
+
owner: MY_ADDRESS,
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
await requestHaneulFromFaucetV2({
|
|
79
|
+
// use getFaucetHost to make sure you're using correct faucet address
|
|
80
|
+
// you can also just use the address (see Haneul TypeScript SDK Quick Start for values)
|
|
81
|
+
host: getFaucetHost('devnet'),
|
|
82
|
+
recipient: MY_ADDRESS,
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
// store the JSON representation for the HANEUL the address owns after using faucet
|
|
86
|
+
const haneulAfter = await haneulClient.getBalance({
|
|
87
|
+
owner: MY_ADDRESS,
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
// Output result to console.
|
|
91
|
+
console.log(
|
|
92
|
+
`Balance before faucet: ${balance(haneulBefore)} HANEUL. Balance after: ${balance(
|
|
93
|
+
haneulAfter,
|
|
94
|
+
)} HANEUL. Hello, HANEUL!`,
|
|
95
|
+
);
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Save the file, then use Node.js to run it in your Console or Terminal:
|
|
99
|
+
|
|
100
|
+
```sh
|
|
101
|
+
node index.js
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
The code imports the `requestHaneulFromFaucetV2` function from the SDK and calls it to mint HANEUL
|
|
105
|
+
for the provided address. The code also imports `HaneulGrpcClient` to create a new client on the
|
|
106
|
+
Haneul network that it uses to query the address and output the amount of HANEUL the address owns
|
|
107
|
+
before and after using the faucet. You can check the total HANEUL for your address using the Haneul
|
|
108
|
+
Wallet or Haneul Client CLI.
|
|
109
|
+
|
|
110
|
+
> **Note:** Faucets on Devnet and Testnet are rate limited. If you run the script too many times,
|
|
111
|
+
> you surpass the limit and must wait to successfully run it again. For testnet, the best way to get
|
|
112
|
+
> HANEUL is via the Web UI: `faucet.haneul.io`.
|
|
113
|
+
|
|
114
|
+
You can also use the [Haneul Client CLI](https://docs.haneul.io/references/cli/client) to perform
|
|
115
|
+
client calls on a Haneul network.
|
package/docs/index.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Haneul TypeScript SDK Quick Start
|
|
2
|
+
|
|
3
|
+
> TypeScript SDK for building on the Haneul blockchain
|
|
4
|
+
|
|
5
|
+
The Haneul TypeScript SDK is a modular library of tools for interacting with the Haneul blockchain.
|
|
6
|
+
Use it to send queries to RPC nodes, build and sign transactions, and interact with a Haneul or
|
|
7
|
+
local network.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```sh npm2yarn
|
|
12
|
+
npm i @haneullabs/haneul
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Network locations
|
|
16
|
+
|
|
17
|
+
The following table lists the locations for Haneul networks.
|
|
18
|
+
|
|
19
|
+
| Network | Full node | faucet |
|
|
20
|
+
| ------- | ---------------------------------------- | ----------------------------------------- |
|
|
21
|
+
| local | `http://127.0.0.1:9000` (default) | `http://127.0.0.1:9123/v2/gas` (default) |
|
|
22
|
+
| Devnet | `https://fullnode.devnet.haneul.io:443` | `https://faucet.devnet.haneul.io/v2/gas` |
|
|
23
|
+
| Testnet | `https://fullnode.testnet.haneul.io:443` | `https://faucet.testnet.haneul.io/v2/gas` |
|
|
24
|
+
| Mainnet | `https://fullnode.mainnet.haneul.io:443` | `null` |
|
|
25
|
+
|
|
26
|
+
> **Warning:** Use dedicated nodes/shared services rather than public endpoints for production apps.
|
|
27
|
+
> The public endpoints maintained by Haneul Labs (`fullnode.<NETWORK>.haneul.io:443`) are
|
|
28
|
+
> rate-limited, and support only 100 requests per 30 seconds or so. Do not use public endpoints in
|
|
29
|
+
> production applications with high traffic volume.
|
|
30
|
+
>
|
|
31
|
+
> You can either run your own Full nodes, or outsource this to a professional infrastructure
|
|
32
|
+
> provider (preferred for apps that have high traffic). You can find a list of reliable RPC endpoint
|
|
33
|
+
> providers for Haneul on the [Haneul Dev Portal](https://haneul.io/developers#dev-tools) using the
|
|
34
|
+
> **Node Service** tab.
|
|
35
|
+
|
|
36
|
+
## Module packages
|
|
37
|
+
|
|
38
|
+
The SDK contains a set of modular packages that you can use independently or together. Import just
|
|
39
|
+
what you need to keep your code light and compact.
|
|
40
|
+
|
|
41
|
+
- [`@haneullabs/haneul/client`](/haneul/clients) - A client for interacting with Haneul RPC nodes.
|
|
42
|
+
- [`@haneullabs/haneul/bcs`](/haneul/bcs) - A BCS builder with pre-defined types for Haneul.
|
|
43
|
+
- [`@haneullabs/haneul/transactions`](/haneul/transaction-building/basics) - Utilities for building
|
|
44
|
+
and interacting with transactions.
|
|
45
|
+
- [`@haneullabs/haneul/keypairs/*`](/haneul/cryptography/keypairs) - Modular exports for specific
|
|
46
|
+
KeyPair implementations.
|
|
47
|
+
- [`@haneullabs/haneul/verify`](/haneul/cryptography/keypairs#verifying-signatures-without-a-key-pair) -
|
|
48
|
+
Methods for verifying transactions and messages.
|
|
49
|
+
- [`@haneullabs/haneul/cryptography`](/haneul/cryptography/keypairs) - Shared types and classes for
|
|
50
|
+
cryptography.
|
|
51
|
+
- [`@haneullabs/haneul/multisig`](/haneul/cryptography/multisig) - Utilities for working with
|
|
52
|
+
multisig signatures.
|
|
53
|
+
- [`@haneullabs/haneul/utils`](/haneul/utils) - Utilities for formatting and parsing various Haneul
|
|
54
|
+
types.
|
|
55
|
+
- [`@haneullabs/haneul/faucet`](/haneul/faucet) - Methods for requesting HANEUL from a faucet.
|
|
56
|
+
- [`@haneullabs/haneul/zklogin`](/haneul/zklogin) - Utilities for working with zkLogin.
|
package/docs/install.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Install Haneul TypeScript SDK
|
|
2
|
+
|
|
3
|
+
> Install the @haneullabs/haneul package and configure your project
|
|
4
|
+
|
|
5
|
+
The Haneul TypeScript SDK is available in the
|
|
6
|
+
[Haneul TS SDK monorepo](https://github.com/GeunhwaJeong/ts-sdks) and NPM.
|
|
7
|
+
|
|
8
|
+
## Install from NPM
|
|
9
|
+
|
|
10
|
+
To use the Haneul TypeScript SDK in your project, run the following command in your project root:
|
|
11
|
+
|
|
12
|
+
```sh npm2yarn
|
|
13
|
+
npm i @haneullabs/haneul
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The SDK is published as an ESM only package. Make sure your `package.json` includes
|
|
17
|
+
`"type": "module"`:
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"type": "module"
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
If you are using TypeScript, your `tsconfig.json` should use a compatible `moduleResolution` setting
|
|
26
|
+
such as `"NodeNext"`, `"Node16"`, or `"Bundler"`. See the
|
|
27
|
+
[2.0 migration guide](/haneul/migrations/haneul-2.0#esm-migration) for more details.
|
|
28
|
+
|
|
29
|
+
## Experimental tag for use with a local Haneul network
|
|
30
|
+
|
|
31
|
+
Projects developing against one of the on-chain Haneul networks (Devnet, Testnet, Mainnet) should
|
|
32
|
+
use the base SDK published in the NPM registry (previous section) because the code aligns with the
|
|
33
|
+
relevant JSON-RPC. If your developing against a
|
|
34
|
+
[local network](https://docs.haneul.io/guides/developer/getting-started/local-network) built from
|
|
35
|
+
the `main` branch of the Haneul monorepo, however, you should use the `experimental`-tagged SDK
|
|
36
|
+
package as it contains the latest features (or a local build detailed in the section that follows).
|
|
37
|
+
|
|
38
|
+
```sh npm2yarn
|
|
39
|
+
npm i @haneullabs/haneul@experimental
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Install from local build
|
|
43
|
+
|
|
44
|
+
To build the SDK from the Haneul monorepo, you must use [pnpm](https://pnpm.io/). With pnpm
|
|
45
|
+
installed, run the following command from the `haneul` root directory:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Install all dependencies
|
|
49
|
+
pnpm install
|
|
50
|
+
# Run the build for the TypeScript SDK
|
|
51
|
+
pnpm sdk build
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
With the SDK built, you can import the library from your `haneul` project. To do so, use a path to
|
|
55
|
+
the `ts-sdks/packages/haneul` directory that is relative to your project. For example, if you
|
|
56
|
+
created a folder `my-haneul-project` at the same level as `haneul`, use the following to import the
|
|
57
|
+
locally built Haneul TypeScript package:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
pnpm add ../ts-sdks/packages/haneul
|
|
61
|
+
```
|
package/docs/llm-docs.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# LLM Documentation
|
|
2
|
+
|
|
3
|
+
> Give AI agents access to Haneul SDK documentation in your project
|
|
4
|
+
|
|
5
|
+
Every `@haneullabs/*` package ships a `docs/` directory containing flat markdown files optimized for
|
|
6
|
+
AI agent consumption. When you install an SDK package, you automatically get accurate, up-to-date
|
|
7
|
+
documentation that coding agents (Claude Code, Cursor, Copilot, etc.) can read directly — no
|
|
8
|
+
separate install or training data required.
|
|
9
|
+
|
|
10
|
+
## How It Works
|
|
11
|
+
|
|
12
|
+
Each package includes:
|
|
13
|
+
|
|
14
|
+
- `docs/llms-index.md` — routing index listing all doc pages with descriptions
|
|
15
|
+
- `docs/*.md` — individual reference pages
|
|
16
|
+
|
|
17
|
+
For example, installing `@haneullabs/haneul` gives you docs at
|
|
18
|
+
`node_modules/@haneullabs/haneul/docs/llms-index.md`.
|
|
19
|
+
|
|
20
|
+
## Configure Your Agent
|
|
21
|
+
|
|
22
|
+
Add the following snippet to your agent's configuration file (`AGENTS.md`, `CLAUDE.md`,
|
|
23
|
+
`.cursorrules`, etc.):
|
|
24
|
+
|
|
25
|
+
```markdown
|
|
26
|
+
## Haneul SDK Reference
|
|
27
|
+
|
|
28
|
+
Every @haneullabs/\* package ships LLM documentation in its `docs/` directory. When working with
|
|
29
|
+
these packages, find the relevant docs by looking for `docs/llms-index.md` files inside
|
|
30
|
+
`node_modules/@haneullabs/\*/`. Read the index first to find the page you need, then read that page
|
|
31
|
+
for details.
|
|
32
|
+
```
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Haneul SDK
|
|
2
|
+
|
|
3
|
+
> TypeScript interfaces for Haneul
|
|
4
|
+
|
|
5
|
+
- [Haneul TypeScript SDK Quick Start](./index.md): TypeScript SDK for building on the Haneul
|
|
6
|
+
blockchain
|
|
7
|
+
- [Install Haneul TypeScript SDK](./install.md): Install the @haneullabs/haneul package and
|
|
8
|
+
configure your project
|
|
9
|
+
- [LLM Documentation](./llm-docs.md): Give AI agents access to Haneul SDK documentation in your
|
|
10
|
+
project
|
|
11
|
+
- [Hello Haneul](./hello-haneul.md): Build your first Haneul application with the TypeScript SDK
|
|
12
|
+
- [Faucet](./faucet.md): Request test HANEUL tokens from the faucet
|
|
13
|
+
- [Haneul Clients](./clients/index.md): Choose and configure gRPC, GraphQL, or JSON-RPC clients
|
|
14
|
+
- [Core API](./clients/core.md): Transport-agnostic Core API shared by all Haneul clients
|
|
15
|
+
- [HaneulGrpcClient](./clients/grpc.md): Connect to Haneul via gRPC with HaneulGrpcClient
|
|
16
|
+
- [HaneulGraphQLClient](./clients/graphql.md): Connect to Haneul via GraphQL with
|
|
17
|
+
HaneulGraphQLClient
|
|
18
|
+
- [HaneulJsonRpcClient](./clients/json-rpc.md): Connect to Haneul via JSON-RPC with
|
|
19
|
+
HaneulJsonRpcClient
|
|
20
|
+
- [Haneul Programmable Transaction Basics](./transaction-building/basics.md): Construct programmable
|
|
21
|
+
transaction blocks with the Transaction API
|
|
22
|
+
- [Paying for Haneul Transactions with Gas Coins](./transaction-building/gas.md): Configure gas
|
|
23
|
+
budget, price, and coin selection for transactions
|
|
24
|
+
- [Transaction Intents](./transaction-building/intents.md): Use high-level intents to simplify
|
|
25
|
+
transaction building
|
|
26
|
+
- [Building Offline](./transaction-building/offline.md): Build transactions without a network
|
|
27
|
+
connection
|
|
28
|
+
- [Sponsored Transactions](./transaction-building/sponsored-transactions.md): Pay gas fees on behalf
|
|
29
|
+
of other users with sponsored transactions
|
|
30
|
+
- [Key pairs](./cryptography/keypairs.md): Create and manage Ed25519, Secp256k1, and Secp256r1
|
|
31
|
+
keypairs
|
|
32
|
+
- [Multi-Signature Transactions](./cryptography/multisig.md): Create multi-signature transactions
|
|
33
|
+
with multiple signers
|
|
34
|
+
- [Passkey](./cryptography/passkey.md): Use WebAuthn passkeys for Haneul transaction signing
|
|
35
|
+
- [Web Crypto Signer](./cryptography/webcrypto-signer.md): Sign transactions using the Web Crypto
|
|
36
|
+
API
|
|
37
|
+
- [The `@haneullabs/haneul/utils` package](./utils/index.md): Utility functions for addresses,
|
|
38
|
+
coins, and common operations
|
|
39
|
+
- [Derived Objects](./utils/derived_objects.md): Compute derived object IDs from parent objects
|
|
40
|
+
- [BCS](./bcs.md): Binary Canonical Serialization for encoding Haneul Move types
|
|
41
|
+
- [ZkLogin](./zklogin.md): Zero-knowledge authentication with OAuth providers on Haneul
|
|
42
|
+
- [Transaction Executors](./executors.md): Manage transaction execution with queuing and parallel
|
|
43
|
+
strategies
|
|
44
|
+
- [Transaction Plugins](./plugins.md): Extend transaction building with reusable plugins
|
|
45
|
+
- [Building SDKs](./sdk-building.md): Build custom SDKs on top of the Haneul TypeScript SDK
|
|
46
|
+
- [Migrate to 2.0](./migrations/haneul-2.0/index.md): Migration guide for Haneul TypeScript SDK 2.0
|
|
47
|
+
- [Agent Migration Prompt](./migrations/haneul-2.0/agent-prompt.md): AI agent prompt for automated
|
|
48
|
+
SDK 2.0 migration
|
|
49
|
+
- [@haneullabs/haneul](./migrations/haneul-2.0/haneul.md): Migrate @haneullabs/haneul from 1.x to
|
|
50
|
+
2.0
|
|
51
|
+
- [Migrating from JSON-RPC](./migrations/haneul-2.0/json-rpc-migration.md): Migrate from JSON-RPC to
|
|
52
|
+
the new Core API
|
|
53
|
+
- [@haneullabs/dapp-kit](./migrations/haneul-2.0/dapp-kit.md): Migrate @haneullabs/dapp-kit to 2.0
|
|
54
|
+
- [@haneullabs/kiosk](./migrations/haneul-2.0/kiosk.md): Migrate @haneullabs/kiosk to 2.0
|
|
55
|
+
- [@haneullabs/zksend](./migrations/haneul-2.0/zksend.md): Migrate @haneullabs/zksend to 2.0
|
|
56
|
+
- [@haneullabs/haneulns](./migrations/haneul-2.0/haneulns.md): Migrate @haneullabs/haneulns to 2.0
|
|
57
|
+
- [@haneullabs/deepbook-v3](./migrations/haneul-2.0/deepbook-v3.md): Migrate @haneullabs/deepbook-v3
|
|
58
|
+
to 2.0
|
|
59
|
+
- [@haneullabs/walrus](./migrations/haneul-2.0/walrus.md): Migrate @haneullabs/walrus to 2.0
|
|
60
|
+
- [@haneullabs/seal](./migrations/haneul-2.0/seal.md): Migrate @haneullabs/seal to 2.0
|
|
61
|
+
- [Wallet Builders](./migrations/haneul-2.0/wallet-builders.md): Migration guide for wallet
|
|
62
|
+
extension developers
|
|
63
|
+
- [SDK Maintainers](./migrations/haneul-2.0/sdk-maintainers.md): Migration guide for SDK maintainers
|
|
64
|
+
and library authors
|
|
65
|
+
- [Migrate to 1.0](./migrations/haneul-1.0.md): Migrate to Haneul TypeScript SDK 1.0
|
|
66
|
+
- [Migrate to 0.38.0](./migrations/0.38.md): Migrate from SDK version 0.37 to 0.38
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Migrate to 0.38.0
|
|
2
|
+
|
|
3
|
+
> Migrate from SDK version 0.37 to 0.38
|
|
4
|
+
|
|
5
|
+
> **Warning:** The 1.0 release of the SDK contains many additional changes. This document may help
|
|
6
|
+
> help as an intermediate step when upgrading from older versions of the SDK, but all apps should be
|
|
7
|
+
> upgraded to the latest version of the SDK instead of 0.38.0.
|
|
8
|
+
|
|
9
|
+
The Haneul TypeScript SDK was refactored beginning with version 0.38.0. If you are updating from an
|
|
10
|
+
earlier version of the SDK, there are some changes you should consider when updating your code.
|
|
11
|
+
|
|
12
|
+
### Module structure
|
|
13
|
+
|
|
14
|
+
The Haneul TypeScript SDK is now divided into modular components. Before version 0.38.0, you
|
|
15
|
+
imported the complete SDK module. Now, you upload the individual packages of the SDK module instead.
|
|
16
|
+
See the [Module Packages section](#module-packages) for the list of packages.
|
|
17
|
+
|
|
18
|
+
### Deprecated classes
|
|
19
|
+
|
|
20
|
+
The Haneul TypeScript SDK deprecates the following classes with version 0.38.0:
|
|
21
|
+
|
|
22
|
+
- `JsonRpcProvider` - The `JsonRpcProvider` class is deprecated in favor of the `haneulClient` class
|
|
23
|
+
when creating a client for a Haneul network. See
|
|
24
|
+
[Network Interactions with HaneulJsonRpcClient](/haneul/clients) for more information.
|
|
25
|
+
- `SignerWithProver` and `RawSigner` - Key pairs now directly support signing transactions and
|
|
26
|
+
messages without the need of a `Signer` class. See the [Key pairs](/haneul/cryptography/keypairs)
|
|
27
|
+
topic for more information.
|
|
28
|
+
- `signAndExecuteTransaction` - This method was not deprecated, but is now part of
|
|
29
|
+
`HaneulJsonRpcClient`.
|
|
30
|
+
- `Connection` classes - The `Connection` classes (`Connection`, `devnetConnection`, and so on) have
|
|
31
|
+
been deprecated in favor ofHaneulJsonRpcClientuiClient` for establishing the connection. See
|
|
32
|
+
[Network Interactions with HaneulJsonRpcClient](/haneul/clients) for more information.
|
|
33
|
+
- The `superstruct` type definitions for `JsonRPCProvider` types are replaced with generated types
|
|
34
|
+
exported from `@haneullabs/haneul/client`. The new type definitions are pure TypeScript types that
|
|
35
|
+
you can't use for runtime validation.
|
|
36
|
+
- A more stable JSON-RPC API has reduced the need for many of the SDK "getter" methods, which are
|
|
37
|
+
now deprecated.
|
|
38
|
+
|
|
39
|
+
### Signing transactions
|
|
40
|
+
|
|
41
|
+
Signing and sending transactions changes slightly with the deprecation of the `Signer` pattern. For
|
|
42
|
+
an example of transaction signing, see the
|
|
43
|
+
[Haneul Programmable Transaction Blocks Basics](/haneul/transaction-building/basics) topic.
|
|
44
|
+
|
|
45
|
+
### Faucet requests
|
|
46
|
+
|
|
47
|
+
HaneulJsonRpcClient The ability to request HANEUL from a faucet is not part of `HaneulJsonRpcClient`
|
|
48
|
+
as it was with `JsonRpcProvider`. Instead, you must use the `requestHaneulFromFaucetV0` method from
|
|
49
|
+
`@haneullabs/haneul/faucet`. The `@haneullabs/haneul/faucet` import also provides a `getFaucetHost`
|
|
50
|
+
method to retrieve the faucet URL for `localnet`, `testnet`, or `devnet` networks.
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
await requestHaneulFromFaucetV0({
|
|
54
|
+
host: getFaucetHost('devnet'),
|
|
55
|
+
recipient: '<HANEUL_ADDRESS>',
|
|
56
|
+
});
|
|
57
|
+
```
|