@haneullabs/haneul 2.5.1 → 2.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +129 -0
- package/README.md +36 -36
- package/dist/bcs/bcs.d.mts +6 -7
- package/dist/bcs/bcs.d.mts.map +1 -1
- package/dist/bcs/bcs.mjs.map +1 -1
- package/dist/bcs/effects.mjs.map +1 -1
- package/dist/bcs/index.d.mts +2 -2
- package/dist/bcs/index.d.mts.map +1 -1
- package/dist/bcs/index.mjs +2 -2
- package/dist/bcs/index.mjs.map +1 -1
- package/dist/bcs/pure.d.mts.map +1 -1
- package/dist/bcs/type-tag-serializer.d.mts.map +1 -1
- package/dist/bcs/types.d.mts +0 -1
- package/dist/bcs/types.d.mts.map +1 -1
- package/dist/client/cache.d.mts.map +1 -1
- package/dist/client/client.d.mts.map +1 -1
- package/dist/client/core-resolver.d.mts.map +1 -1
- package/dist/client/core-resolver.mjs +87 -68
- package/dist/client/core-resolver.mjs.map +1 -1
- package/dist/client/core.d.mts +9 -8
- package/dist/client/core.d.mts.map +1 -1
- package/dist/client/core.mjs +29 -10
- package/dist/client/core.mjs.map +1 -1
- package/dist/client/errors.d.mts.map +1 -1
- package/dist/client/mvr.d.mts +0 -1
- package/dist/client/mvr.d.mts.map +1 -1
- package/dist/client/types.d.mts +110 -24
- package/dist/client/types.d.mts.map +1 -1
- package/dist/client/utils.d.mts.map +1 -1
- package/dist/client/utils.mjs +7 -7
- package/dist/client/utils.mjs.map +1 -1
- package/dist/cryptography/index.d.mts +2 -2
- package/dist/cryptography/index.mjs +2 -2
- package/dist/cryptography/intent.d.mts +2 -2
- package/dist/cryptography/intent.d.mts.map +1 -1
- package/dist/cryptography/intent.mjs +2 -2
- package/dist/cryptography/intent.mjs.map +1 -1
- package/dist/cryptography/keypair.d.mts +3 -3
- package/dist/cryptography/keypair.d.mts.map +1 -1
- package/dist/cryptography/keypair.mjs +3 -3
- package/dist/cryptography/keypair.mjs.map +1 -1
- package/dist/cryptography/mnemonics.d.mts +5 -5
- package/dist/cryptography/mnemonics.d.mts.map +1 -1
- package/dist/cryptography/mnemonics.mjs +7 -7
- package/dist/cryptography/mnemonics.mjs.map +1 -1
- package/dist/cryptography/publickey.d.mts +2 -3
- package/dist/cryptography/publickey.d.mts.map +1 -1
- package/dist/cryptography/publickey.mjs +10 -10
- package/dist/cryptography/publickey.mjs.map +1 -1
- package/dist/cryptography/signature-scheme.d.mts.map +1 -1
- package/dist/cryptography/signature.d.mts +10 -13
- package/dist/cryptography/signature.d.mts.map +1 -1
- package/dist/cryptography/signature.mjs +2 -2
- package/dist/cryptography/signature.mjs.map +1 -1
- package/dist/faucet/faucet.d.mts +2 -2
- package/dist/faucet/faucet.d.mts.map +1 -1
- package/dist/faucet/faucet.mjs +2 -2
- package/dist/faucet/faucet.mjs.map +1 -1
- package/dist/faucet/index.d.mts +2 -2
- package/dist/faucet/index.mjs +2 -2
- package/dist/graphql/client.d.mts +20 -5
- package/dist/graphql/client.d.mts.map +1 -1
- package/dist/graphql/client.mjs +55 -7
- package/dist/graphql/client.mjs.map +1 -1
- package/dist/graphql/core.d.mts +6 -5
- package/dist/graphql/core.d.mts.map +1 -1
- package/dist/graphql/core.mjs +43 -47
- package/dist/graphql/core.mjs.map +1 -1
- package/dist/graphql/generated/queries.d.mts +0 -1
- package/dist/graphql/generated/queries.d.mts.map +1 -1
- package/dist/graphql/generated/queries.mjs +46 -10
- package/dist/graphql/generated/queries.mjs.map +1 -1
- package/dist/graphql/generated/tada-env.d.mts +706 -98
- package/dist/graphql/generated/tada-env.d.mts.map +1 -1
- package/dist/graphql/index.d.mts +2 -2
- package/dist/graphql/index.mjs +2 -2
- package/dist/graphql/schema/index.d.mts +0 -1
- package/dist/graphql/schema/index.d.mts.map +1 -1
- package/dist/graphql/types.d.mts.map +1 -1
- package/dist/grpc/client.d.mts +20 -5
- package/dist/grpc/client.d.mts.map +1 -1
- package/dist/grpc/client.mjs +47 -7
- package/dist/grpc/client.mjs.map +1 -1
- package/dist/grpc/core.d.mts +6 -5
- package/dist/grpc/core.d.mts.map +1 -1
- package/dist/grpc/core.mjs +35 -34
- package/dist/grpc/core.mjs.map +1 -1
- package/dist/grpc/index.d.mts +2 -2
- package/dist/grpc/index.mjs +2 -2
- package/dist/grpc/proto/google/protobuf/any.d.mts +0 -1
- package/dist/grpc/proto/google/protobuf/any.d.mts.map +1 -1
- package/dist/grpc/proto/google/protobuf/duration.d.mts +0 -1
- package/dist/grpc/proto/google/protobuf/duration.d.mts.map +1 -1
- package/dist/grpc/proto/google/protobuf/field_mask.d.mts +0 -1
- package/dist/grpc/proto/google/protobuf/field_mask.d.mts.map +1 -1
- package/dist/grpc/proto/google/protobuf/struct.d.mts +1 -2
- package/dist/grpc/proto/google/protobuf/struct.d.mts.map +1 -1
- package/dist/grpc/proto/google/protobuf/timestamp.d.mts +0 -1
- package/dist/grpc/proto/google/protobuf/timestamp.d.mts.map +1 -1
- package/dist/grpc/proto/google/rpc/status.d.mts +0 -1
- package/dist/grpc/proto/google/rpc/status.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/argument.d.mts +1 -2
- package/dist/grpc/proto/haneul/rpc/v2/argument.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/balance_change.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/balance_change.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/bcs.d.mts +1 -2
- package/dist/grpc/proto/haneul/rpc/v2/bcs.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/bcs.mjs.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/checkpoint.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/checkpoint.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/checkpoint_contents.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/checkpoint_contents.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/checkpoint_summary.d.mts +1 -2
- package/dist/grpc/proto/haneul/rpc/v2/checkpoint_summary.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/effects.d.mts +5 -6
- package/dist/grpc/proto/haneul/rpc/v2/effects.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/epoch.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/epoch.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/error_reason.d.mts +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/error_reason.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/event.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/event.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/executed_transaction.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/executed_transaction.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/execution_status.d.mts +8 -9
- package/dist/grpc/proto/haneul/rpc/v2/execution_status.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/execution_status.mjs +4 -4
- package/dist/grpc/proto/haneul/rpc/v2/execution_status.mjs.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/gas_cost_summary.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/gas_cost_summary.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/input.d.mts +3 -4
- package/dist/grpc/proto/haneul/rpc/v2/input.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/jwk.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/jwk.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/ledger_service.client.d.mts +4 -5
- package/dist/grpc/proto/haneul/rpc/v2/ledger_service.client.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/ledger_service.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/ledger_service.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/move_package.d.mts +5 -6
- package/dist/grpc/proto/haneul/rpc/v2/move_package.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/move_package_service.client.d.mts +4 -5
- package/dist/grpc/proto/haneul/rpc/v2/move_package_service.client.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/move_package_service.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/move_package_service.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/name_service.client.d.mts +4 -5
- package/dist/grpc/proto/haneul/rpc/v2/name_service.client.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/name_service.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/name_service.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/object.d.mts +38 -2
- package/dist/grpc/proto/haneul/rpc/v2/object.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/object.mjs +26 -1
- package/dist/grpc/proto/haneul/rpc/v2/object.mjs.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/object_reference.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/object_reference.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/owner.d.mts +1 -2
- package/dist/grpc/proto/haneul/rpc/v2/owner.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/protocol_config.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/protocol_config.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/signature.d.mts +1 -2
- package/dist/grpc/proto/haneul/rpc/v2/signature.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/signature.mjs.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/signature_scheme.d.mts +2 -2
- package/dist/grpc/proto/haneul/rpc/v2/signature_scheme.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/signature_scheme.mjs +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/signature_scheme.mjs.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/signature_verification_service.client.d.mts +4 -5
- package/dist/grpc/proto/haneul/rpc/v2/signature_verification_service.client.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/signature_verification_service.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/signature_verification_service.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/state_service.client.d.mts +4 -5
- package/dist/grpc/proto/haneul/rpc/v2/state_service.client.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/state_service.d.mts +4 -5
- package/dist/grpc/proto/haneul/rpc/v2/state_service.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/subscription_service.client.d.mts +4 -5
- package/dist/grpc/proto/haneul/rpc/v2/subscription_service.client.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/subscription_service.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/subscription_service.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/system_state.d.mts +3 -4
- package/dist/grpc/proto/haneul/rpc/v2/system_state.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/system_state.mjs +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/system_state.mjs.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/transaction.d.mts +4 -5
- package/dist/grpc/proto/haneul/rpc/v2/transaction.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/transaction_execution_service.client.d.mts +0 -1
- package/dist/grpc/proto/haneul/rpc/v2/transaction_execution_service.client.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/transaction_execution_service.d.mts +9 -2
- package/dist/grpc/proto/haneul/rpc/v2/transaction_execution_service.d.mts.map +1 -1
- package/dist/grpc/proto/haneul/rpc/v2/transaction_execution_service.mjs +23 -12
- package/dist/grpc/proto/haneul/rpc/v2/transaction_execution_service.mjs.map +1 -1
- package/dist/grpc/proto/types.d.mts +2 -2
- package/dist/grpc/proto/types.d.mts.map +1 -1
- package/dist/grpc/proto/types.mjs +2 -1
- package/dist/jsonRpc/client.d.mts +4 -7
- package/dist/jsonRpc/client.d.mts.map +1 -1
- package/dist/jsonRpc/client.mjs +4 -33
- package/dist/jsonRpc/client.mjs.map +1 -1
- package/dist/jsonRpc/core.d.mts +8 -15
- package/dist/jsonRpc/core.d.mts.map +1 -1
- package/dist/jsonRpc/core.mjs +81 -34
- package/dist/jsonRpc/core.mjs.map +1 -1
- package/dist/jsonRpc/errors.d.mts.map +1 -1
- package/dist/jsonRpc/http-transport.d.mts +1 -17
- package/dist/jsonRpc/http-transport.d.mts.map +1 -1
- package/dist/jsonRpc/http-transport.mjs +0 -23
- package/dist/jsonRpc/http-transport.mjs.map +1 -1
- package/dist/jsonRpc/index.d.mts +3 -3
- package/dist/jsonRpc/network.d.mts.map +1 -1
- package/dist/jsonRpc/types/chain.d.mts.map +1 -1
- package/dist/jsonRpc/types/changes.d.mts.map +1 -1
- package/dist/jsonRpc/types/coins.d.mts.map +1 -1
- package/dist/jsonRpc/types/common.d.mts +1 -2
- package/dist/jsonRpc/types/common.d.mts.map +1 -1
- package/dist/jsonRpc/types/generated.d.mts +101 -129
- package/dist/jsonRpc/types/generated.d.mts.map +1 -1
- package/dist/jsonRpc/types/index.d.mts +1 -1
- package/dist/jsonRpc/types/params.d.mts +9 -14
- package/dist/jsonRpc/types/params.d.mts.map +1 -1
- package/dist/keypairs/ed25519/keypair.d.mts +8 -6
- package/dist/keypairs/ed25519/keypair.d.mts.map +1 -1
- package/dist/keypairs/ed25519/keypair.mjs +13 -9
- package/dist/keypairs/ed25519/keypair.mjs.map +1 -1
- package/dist/keypairs/ed25519/publickey.d.mts +0 -1
- package/dist/keypairs/ed25519/publickey.d.mts.map +1 -1
- package/dist/keypairs/passkey/keypair.d.mts +12 -5
- package/dist/keypairs/passkey/keypair.d.mts.map +1 -1
- package/dist/keypairs/passkey/keypair.mjs +20 -7
- package/dist/keypairs/passkey/keypair.mjs.map +1 -1
- package/dist/keypairs/passkey/publickey.d.mts +0 -1
- package/dist/keypairs/passkey/publickey.d.mts.map +1 -1
- package/dist/keypairs/passkey/types.d.mts.map +1 -1
- package/dist/keypairs/secp256k1/keypair.d.mts +3 -3
- package/dist/keypairs/secp256k1/keypair.d.mts.map +1 -1
- package/dist/keypairs/secp256k1/keypair.mjs +6 -6
- package/dist/keypairs/secp256k1/keypair.mjs.map +1 -1
- package/dist/keypairs/secp256k1/publickey.d.mts +0 -1
- package/dist/keypairs/secp256k1/publickey.d.mts.map +1 -1
- package/dist/keypairs/secp256r1/keypair.d.mts +3 -3
- package/dist/keypairs/secp256r1/keypair.d.mts.map +1 -1
- package/dist/keypairs/secp256r1/keypair.mjs +6 -6
- package/dist/keypairs/secp256r1/keypair.mjs.map +1 -1
- package/dist/keypairs/secp256r1/publickey.d.mts +0 -1
- package/dist/keypairs/secp256r1/publickey.d.mts.map +1 -1
- package/dist/multisig/publickey.d.mts +1 -0
- package/dist/multisig/publickey.d.mts.map +1 -1
- package/dist/multisig/publickey.mjs +8 -8
- package/dist/multisig/publickey.mjs.map +1 -1
- package/dist/multisig/signer.d.mts.map +1 -1
- package/dist/transactions/Arguments.d.mts.map +1 -1
- package/dist/transactions/Commands.d.mts +1 -1
- package/dist/transactions/Commands.d.mts.map +1 -1
- package/dist/transactions/Commands.mjs.map +1 -1
- package/dist/transactions/Inputs.d.mts.map +1 -1
- package/dist/transactions/ObjectCache.d.mts +3 -3
- package/dist/transactions/ObjectCache.d.mts.map +1 -1
- package/dist/transactions/Transaction.d.mts +32 -6
- package/dist/transactions/Transaction.d.mts.map +1 -1
- package/dist/transactions/Transaction.mjs +23 -1
- package/dist/transactions/Transaction.mjs.map +1 -1
- package/dist/transactions/TransactionData.d.mts.map +1 -1
- package/dist/transactions/TransactionData.mjs +8 -8
- package/dist/transactions/TransactionData.mjs.map +1 -1
- package/dist/transactions/data/internal.d.mts +109 -109
- package/dist/transactions/data/internal.d.mts.map +1 -1
- package/dist/transactions/data/internal.mjs.map +1 -1
- package/dist/transactions/data/v1.d.mts +220 -221
- package/dist/transactions/data/v1.d.mts.map +1 -1
- package/dist/transactions/data/v2.d.mts +16 -16
- package/dist/transactions/data/v2.d.mts.map +1 -1
- package/dist/transactions/data/v2.mjs.map +1 -1
- package/dist/transactions/executor/caching.mjs +2 -2
- package/dist/transactions/executor/caching.mjs.map +1 -1
- package/dist/transactions/executor/parallel.d.mts +1 -1
- package/dist/transactions/executor/parallel.d.mts.map +1 -1
- package/dist/transactions/executor/parallel.mjs +1 -1
- package/dist/transactions/executor/parallel.mjs.map +1 -1
- package/dist/transactions/executor/serial.d.mts +3 -3
- package/dist/transactions/executor/serial.d.mts.map +1 -1
- package/dist/transactions/executor/serial.mjs.map +1 -1
- package/dist/transactions/intents/CoinWithBalance.d.mts.map +1 -1
- package/dist/transactions/intents/CoinWithBalance.mjs +174 -97
- package/dist/transactions/intents/CoinWithBalance.mjs.map +1 -1
- package/dist/transactions/object.d.mts.map +1 -1
- package/dist/transactions/pure.d.mts.map +1 -1
- package/dist/transactions/pure.mjs +12 -12
- package/dist/transactions/pure.mjs.map +1 -1
- package/dist/transactions/resolve.d.mts.map +1 -1
- package/dist/transactions/resolve.mjs +3 -3
- package/dist/transactions/resolve.mjs.map +1 -1
- package/dist/transactions/serializer.d.mts.map +1 -1
- package/dist/transactions/serializer.mjs +15 -15
- package/dist/transactions/serializer.mjs.map +1 -1
- package/dist/transactions/utils.d.mts +0 -1
- package/dist/transactions/utils.d.mts.map +1 -1
- package/dist/utils/coin-reservation.mjs +67 -0
- package/dist/utils/coin-reservation.mjs.map +1 -0
- package/dist/utils/constants.d.mts +2 -1
- package/dist/utils/constants.d.mts.map +1 -1
- package/dist/utils/constants.mjs +2 -1
- package/dist/utils/constants.mjs.map +1 -1
- package/dist/utils/derived-objects.d.mts +0 -1
- package/dist/utils/derived-objects.d.mts.map +1 -1
- package/dist/utils/dynamic-fields.d.mts.map +1 -1
- package/dist/utils/dynamic-fields.mjs +4 -4
- package/dist/utils/dynamic-fields.mjs.map +1 -1
- package/dist/utils/format.d.mts.map +1 -1
- package/dist/utils/haneul-types.d.mts.map +1 -1
- package/dist/utils/haneul-types.mjs +8 -0
- package/dist/utils/haneul-types.mjs.map +1 -1
- package/dist/utils/haneulns.d.mts.map +1 -1
- package/dist/utils/index.d.mts +2 -2
- package/dist/utils/index.mjs +2 -2
- package/dist/utils/move-registry.d.mts.map +1 -1
- package/dist/verify/index.d.mts +2 -2
- package/dist/verify/index.mjs +2 -2
- package/dist/verify/verify.d.mts +2 -2
- package/dist/verify/verify.d.mts.map +1 -1
- package/dist/verify/verify.mjs +2 -2
- package/dist/verify/verify.mjs.map +1 -1
- package/dist/version.mjs +1 -1
- package/dist/version.mjs.map +1 -1
- package/dist/zklogin/address.d.mts.map +1 -1
- package/dist/zklogin/bcs.d.mts +14 -14
- package/dist/zklogin/bcs.d.mts.map +1 -1
- package/dist/zklogin/jwt-decode.d.mts +0 -1
- package/dist/zklogin/jwt-decode.d.mts.map +1 -1
- package/dist/zklogin/jwt-utils.d.mts +0 -1
- package/dist/zklogin/jwt-utils.d.mts.map +1 -1
- package/dist/zklogin/nonce.d.mts.map +1 -1
- package/dist/zklogin/nonce.mjs +1 -1
- package/dist/zklogin/nonce.mjs.map +1 -1
- package/dist/zklogin/poseidon.d.mts.map +1 -1
- package/dist/zklogin/publickey.d.mts +0 -1
- package/dist/zklogin/publickey.d.mts.map +1 -1
- package/dist/zklogin/signature.d.mts.map +1 -1
- package/dist/zklogin/utils.d.mts.map +1 -1
- package/dist/zklogin/utils.mjs +1 -1
- package/dist/zklogin/utils.mjs.map +1 -1
- package/docs/bcs.md +132 -0
- package/docs/clients/core.md +616 -0
- package/docs/clients/graphql.md +99 -0
- package/docs/clients/grpc.md +152 -0
- package/docs/clients/index.md +93 -0
- package/docs/clients/json-rpc.md +235 -0
- package/docs/cryptography/keypairs.md +259 -0
- package/docs/cryptography/multisig.md +192 -0
- package/docs/cryptography/passkey.md +111 -0
- package/docs/cryptography/webcrypto-signer.md +81 -0
- package/docs/executors.md +148 -0
- package/docs/faucet.md +26 -0
- package/docs/hello-haneul.md +115 -0
- package/docs/index.md +56 -0
- package/docs/install.md +61 -0
- package/docs/llm-docs.md +32 -0
- package/docs/llms-index.md +66 -0
- package/docs/migrations/0.38.md +57 -0
- package/docs/migrations/haneul-1.0.md +454 -0
- package/docs/migrations/haneul-2.0/agent-prompt.md +42 -0
- package/docs/migrations/haneul-2.0/dapp-kit.md +350 -0
- package/docs/migrations/haneul-2.0/deepbook-v3.md +33 -0
- package/docs/migrations/haneul-2.0/haneul.md +341 -0
- package/docs/migrations/haneul-2.0/haneulns.md +42 -0
- package/docs/migrations/haneul-2.0/index.md +161 -0
- package/docs/migrations/haneul-2.0/json-rpc-migration.md +399 -0
- package/docs/migrations/haneul-2.0/kiosk.md +120 -0
- package/docs/migrations/haneul-2.0/sdk-maintainers.md +91 -0
- package/docs/migrations/haneul-2.0/seal.md +14 -0
- package/docs/migrations/haneul-2.0/wallet-builders.md +66 -0
- package/docs/migrations/haneul-2.0/walrus.md +41 -0
- package/docs/migrations/haneul-2.0/zksend.md +94 -0
- package/docs/plugins.md +255 -0
- package/docs/sdk-building.md +341 -0
- package/docs/transaction-building/basics.md +297 -0
- package/docs/transaction-building/gas.md +62 -0
- package/docs/transaction-building/intents.md +61 -0
- package/docs/transaction-building/offline.md +71 -0
- package/docs/transaction-building/sponsored-transactions.md +22 -0
- package/docs/utils/derived_objects.md +80 -0
- package/docs/utils/index.md +53 -0
- package/docs/zklogin.md +78 -0
- package/package.json +199 -199
- package/src/bcs/bcs.ts +13 -13
- package/src/bcs/effects.ts +20 -20
- package/src/bcs/index.ts +2 -2
- package/src/client/core-resolver.ts +150 -100
- package/src/client/core.ts +62 -22
- package/src/client/types.ts +109 -24
- package/src/cryptography/index.ts +2 -2
- package/src/cryptography/keypair.ts +2 -2
- package/src/cryptography/mnemonics.ts +7 -7
- package/src/cryptography/publickey.ts +8 -8
- package/src/faucet/faucet.ts +1 -1
- package/src/faucet/index.ts +1 -1
- package/src/graphql/client.ts +100 -8
- package/src/graphql/core.ts +73 -80
- package/src/graphql/generated/queries.ts +301 -51
- package/src/graphql/generated/schema.graphql +407 -104
- package/src/graphql/generated/tada-env.ts +779 -58
- package/src/graphql/index.ts +1 -1
- package/src/graphql/queries/getAllBalances.graphql +1 -1
- package/src/graphql/queries/getBalance.graphql +1 -1
- package/src/graphql/queries/getCoins.graphql +2 -2
- package/src/graphql/queries/getDynamicFields.graphql +9 -1
- package/src/graphql/queries/getMoveFunction.graphql +1 -1
- package/src/graphql/queries/getProtocolConfig.graphql +18 -0
- package/src/graphql/queries/nameService.graphql +1 -1
- package/src/graphql/queries/objects.graphql +11 -1
- package/src/graphql/queries/transactions.graphql +1 -3
- package/src/graphql/queries/verifyZkLoginSignature.graphql +1 -2
- package/src/grpc/client.ts +66 -8
- package/src/grpc/core.ts +74 -35
- package/src/grpc/index.ts +1 -1
- package/src/grpc/proto/haneul/rpc/v2/bcs.ts +1 -1
- package/src/grpc/proto/haneul/rpc/v2/execution_status.ts +4 -4
- package/src/grpc/proto/haneul/rpc/v2/object.ts +44 -0
- package/src/grpc/proto/haneul/rpc/v2/signature.ts +1 -1
- package/src/grpc/proto/haneul/rpc/v2/signature_scheme.ts +1 -1
- package/src/grpc/proto/haneul/rpc/v2/system_state.ts +4 -4
- package/src/grpc/proto/haneul/rpc/v2/transaction_execution_service.ts +16 -0
- package/src/jsonRpc/client.ts +5 -23
- package/src/jsonRpc/core.ts +114 -41
- package/src/jsonRpc/http-transport.ts +0 -52
- package/src/jsonRpc/index.ts +0 -1
- package/src/jsonRpc/types/common.ts +0 -1
- package/src/jsonRpc/types/generated.ts +2 -2
- package/src/jsonRpc/types/params.ts +6 -6
- package/src/keypairs/ed25519/keypair.ts +14 -10
- package/src/keypairs/passkey/keypair.ts +22 -8
- package/src/keypairs/secp256k1/keypair.ts +6 -6
- package/src/keypairs/secp256r1/keypair.ts +6 -6
- package/src/multisig/publickey.ts +1 -1
- package/src/transactions/Commands.ts +1 -1
- package/src/transactions/Transaction.ts +38 -1
- package/src/transactions/TransactionData.ts +3 -3
- package/src/transactions/__tests__/bcs.test.ts +3 -3
- package/src/transactions/data/internal.ts +12 -12
- package/src/transactions/data/v2.ts +6 -6
- package/src/transactions/executor/caching.ts +2 -2
- package/src/transactions/executor/parallel.ts +1 -2
- package/src/transactions/executor/serial.ts +1 -1
- package/src/transactions/intents/CoinWithBalance.ts +247 -121
- package/src/utils/coin-reservation.ts +84 -0
- package/src/utils/constants.ts +2 -0
- package/src/utils/haneul-types.ts +16 -1
- package/src/utils/index.ts +1 -0
- package/src/verify/index.ts +1 -1
- package/src/verify/verify.ts +1 -1
- package/src/version.ts +1 -1
- package/src/zklogin/nonce.ts +1 -1
- package/src/zklogin/utils.ts +1 -1
- package/dist/jsonRpc/rpc-websocket-client.d.mts +0 -26
- package/dist/jsonRpc/rpc-websocket-client.d.mts.map +0 -1
- package/dist/jsonRpc/rpc-websocket-client.mjs +0 -135
- package/dist/jsonRpc/rpc-websocket-client.mjs.map +0 -1
- package/src/jsonRpc/rpc-websocket-client.ts +0 -241
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
# @haneullabs/dapp-kit
|
|
2
|
+
|
|
3
|
+
> Migrate @haneullabs/dapp-kit to 2.0
|
|
4
|
+
|
|
5
|
+
This guide helps you migrate from the original `@haneullabs/dapp-kit` (legacy) to the new
|
|
6
|
+
`@haneullabs/dapp-kit-react` package.
|
|
7
|
+
|
|
8
|
+
> **Note:** The legacy `@haneullabs/dapp-kit` package will continue to work with the latest SDK, but
|
|
9
|
+
> it only supports JSON-RPC and will not receive further updates. We recommend migrating to
|
|
10
|
+
> `@haneullabs/dapp-kit-react` for new features and gRPC support.
|
|
11
|
+
|
|
12
|
+
## Overview
|
|
13
|
+
|
|
14
|
+
The new dApp Kit SDK represents a complete rewrite with these key changes:
|
|
15
|
+
|
|
16
|
+
- **Framework agnostic**: Split into `@haneullabs/dapp-kit-core` (framework-agnostic) and
|
|
17
|
+
`@haneullabs/dapp-kit-react` (React bindings)
|
|
18
|
+
- **No React Query dependency**: Direct promise-based API instead of mutation hooks
|
|
19
|
+
- **Web Components**: UI components built with Lit Elements for cross-framework compatibility
|
|
20
|
+
- **Smaller bundle size**: No React Query dependency, lighter state management with nanostores
|
|
21
|
+
- **Better SSR support**: Compatible with SSR frameworks like Next.js
|
|
22
|
+
- **Cross-framework compatibility**: Core functionality can be used in vanilla JS, Vue, React, and
|
|
23
|
+
other frameworks
|
|
24
|
+
|
|
25
|
+
## Step-by-Step Migration
|
|
26
|
+
|
|
27
|
+
### 1. Update Dependencies
|
|
28
|
+
|
|
29
|
+
Remove the old package and install the new ones:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm uninstall @haneullabs/dapp-kit
|
|
33
|
+
npm i @haneullabs/dapp-kit-react @haneullabs/dapp-kit-core @haneullabs/haneul
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 2. Create dApp Kit Instance
|
|
37
|
+
|
|
38
|
+
Create a new instance of the dApp Kit using the `createDAppKit` function and register the global
|
|
39
|
+
type.
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
// dapp-kit.ts
|
|
43
|
+
|
|
44
|
+
const GRPC_URLS = {
|
|
45
|
+
testnet: 'https://fullnode.testnet.haneul.io:443',
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
networks: ['testnet'],
|
|
49
|
+
createClient(network) {
|
|
50
|
+
return new HaneulGrpcClient({ network, baseUrl: GRPC_URLS[network] });
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// global type registration necessary for the hooks to work correctly
|
|
55
|
+
declare module '@haneullabs/dapp-kit-react' {
|
|
56
|
+
interface Register {
|
|
57
|
+
dAppKit: typeof dAppKit;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 3. Register Types
|
|
63
|
+
|
|
64
|
+
The `declare module` block in the previous step registers your dApp Kit instance's type globally.
|
|
65
|
+
This enables all hooks like `useDAppKit()`, `useCurrentNetwork()`, and `useCurrentClient()` to
|
|
66
|
+
automatically infer the correct types based on your configuration (e.g., your specific networks and
|
|
67
|
+
client type).
|
|
68
|
+
|
|
69
|
+
```tsx
|
|
70
|
+
declare module '@haneullabs/dapp-kit-react' {
|
|
71
|
+
interface Register {
|
|
72
|
+
dAppKit: typeof dAppKit;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Without this registration, hooks return generic types and you lose type safety for things like
|
|
78
|
+
network names. If you prefer not to use global type registration, you can pass the `dAppKit`
|
|
79
|
+
instance explicitly to each hook instead:
|
|
80
|
+
|
|
81
|
+
```tsx
|
|
82
|
+
const connection = useWalletConnection({ dAppKit });
|
|
83
|
+
const network = useCurrentNetwork({ dAppKit });
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 4. Replace Provider Setup
|
|
87
|
+
|
|
88
|
+
Replace the nested dApp Kit providers with a single unified provider. You can keep your existing
|
|
89
|
+
`QueryClientProvider` for data fetching.
|
|
90
|
+
|
|
91
|
+
```diff
|
|
92
|
+
// App.tsx
|
|
93
|
+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
94
|
+
- import { HaneulClientProvider, WalletProvider } from '@haneullabs/dapp-kit';
|
|
95
|
+
+ import { DAppKitProvider } from '@haneullabs/dapp-kit-react';
|
|
96
|
+
+ import { dAppKit } from './dapp-kit.ts';
|
|
97
|
+
|
|
98
|
+
export function App() {
|
|
99
|
+
const queryClient = new QueryClient();
|
|
100
|
+
- const networkConfig = {
|
|
101
|
+
- mainnet: { url: 'https://mainnet.haneul.io:443' },
|
|
102
|
+
- testnet: { url: 'https://testnet.haneul.io:443' },
|
|
103
|
+
- };
|
|
104
|
+
|
|
105
|
+
return (
|
|
106
|
+
<QueryClientProvider client={queryClient}>
|
|
107
|
+
- <HaneulClientProvider networks={networkConfig} defaultNetwork="mainnet">
|
|
108
|
+
- <WalletProvider>
|
|
109
|
+
- <App />
|
|
110
|
+
- </WalletProvider>
|
|
111
|
+
- </HaneulClientProvider>
|
|
112
|
+
+ <DAppKitProvider dAppKit={dAppKit}>
|
|
113
|
+
+ <App />
|
|
114
|
+
+ </DAppKitProvider>
|
|
115
|
+
</QueryClientProvider>
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### 5. Configuration Option Changes
|
|
121
|
+
|
|
122
|
+
The `createDAppKit` function has different configuration options than the old `WalletProvider`:
|
|
123
|
+
|
|
124
|
+
| Old (`WalletProvider`) | New (`createDAppKit`) | Notes |
|
|
125
|
+
| ---------------------- | --------------------- | -------------------------------------------------------------------- |
|
|
126
|
+
| - | `networks` (required) | List of network identifiers your app supports |
|
|
127
|
+
| - | `createClient` | Function to create a client for each network |
|
|
128
|
+
| - | `defaultNetwork` | Network to use by default (defaults to first in `networks`) |
|
|
129
|
+
| `autoConnect` (false) | `autoConnect` (true) | Default changed from `false` to `true` |
|
|
130
|
+
| `enableUnsafeBurner` | `enableBurnerWallet` | Renamed |
|
|
131
|
+
| `slushWallet` | `slushWalletConfig` | Renamed |
|
|
132
|
+
| `storage` | `storage` | Unchanged |
|
|
133
|
+
| `storageKey` | `storageKey` | Unchanged |
|
|
134
|
+
| `preferredWallets` | - | Removed |
|
|
135
|
+
| `walletFilter` | - | Removed (wallets filtered by network compatibility) |
|
|
136
|
+
| `theme` | - | Removed (UI components are now web components with built-in styling) |
|
|
137
|
+
| - | `walletInitializers` | New option for registering custom wallets |
|
|
138
|
+
|
|
139
|
+
### 6. Update Hook Usage
|
|
140
|
+
|
|
141
|
+
The new dApp Kit has a dramatically simplified hook API. Most hooks from the original version have
|
|
142
|
+
been replaced with direct action calls through `useDAppKit()`.
|
|
143
|
+
|
|
144
|
+
**Available hooks in the new version:**
|
|
145
|
+
|
|
146
|
+
- `useDAppKit()` - Access the dAppKit instance for calling actions
|
|
147
|
+
- `useCurrentClient()` - Get the blockchain client (renamed from `useHaneulClient`)
|
|
148
|
+
- `useCurrentAccount()` - Get the current connected account
|
|
149
|
+
- `useCurrentWallet()` - Get the current connected wallet
|
|
150
|
+
- `useWallets()` - Get the list of available wallets
|
|
151
|
+
- `useWalletConnection()` - Get the current wallet connection status
|
|
152
|
+
- `useCurrentNetwork()` - Get the current network
|
|
153
|
+
|
|
154
|
+
**Removed hooks:**
|
|
155
|
+
|
|
156
|
+
All wallet action hooks have been replaced with direct action calls via `useDAppKit()`:
|
|
157
|
+
|
|
158
|
+
- `useConnectWallet` -> Use `dAppKit.connectWallet()`
|
|
159
|
+
- `useDisconnectWallet` -> Use `dAppKit.disconnectWallet()`
|
|
160
|
+
- `useSignTransaction` -> Use `dAppKit.signTransaction()`
|
|
161
|
+
- `useSignAndExecuteTransaction` -> Use `dAppKit.signAndExecuteTransaction()`
|
|
162
|
+
- `useSignPersonalMessage` -> Use `dAppKit.signPersonalMessage()`
|
|
163
|
+
- `useSwitchAccount` -> Use `dAppKit.switchAccount()`
|
|
164
|
+
|
|
165
|
+
All data fetching hooks have been removed (giving you flexibility to use your preferred solution):
|
|
166
|
+
|
|
167
|
+
- `useHaneulClientQuery` -> Use `useCurrentClient()` with your data fetching solution
|
|
168
|
+
- `useHaneulClientMutation` -> Use `useCurrentClient()` with your data fetching solution
|
|
169
|
+
- `useHaneulClientInfiniteQuery` -> Use `useCurrentClient()` with your data fetching solution
|
|
170
|
+
- `useHaneulClientQueries` -> Use `useCurrentClient()` with your data fetching solution
|
|
171
|
+
- `useResolveHaneulNSNames` -> Use `useCurrentClient()` directly
|
|
172
|
+
|
|
173
|
+
Other removed hooks:
|
|
174
|
+
|
|
175
|
+
- `useAutoConnectWallet` -> Auto-connect is enabled by default
|
|
176
|
+
- `useAccounts` -> Use `useWalletConnection()` to access `connection.wallet.accounts`
|
|
177
|
+
- `useWalletStore` -> Use specific hooks like `useWalletConnection()` instead
|
|
178
|
+
|
|
179
|
+
### 7. Replace Mutation Patterns
|
|
180
|
+
|
|
181
|
+
The built-in mutation hooks have been removed. Use TanStack Query's `useMutation` with
|
|
182
|
+
`useDAppKit()` to get similar functionality.
|
|
183
|
+
|
|
184
|
+
**Chain parameter replaced with network:**
|
|
185
|
+
|
|
186
|
+
In the old dapp-kit, you could optionally pass a `chain` parameter (e.g., `haneul:mainnet`) to
|
|
187
|
+
methods like `signTransaction` and `signAndExecuteTransaction`. In the new dapp-kit, use the
|
|
188
|
+
`network` parameter instead - the chain is automatically derived from the network.
|
|
189
|
+
|
|
190
|
+
```diff
|
|
191
|
+
- const { mutateAsync: signAndExecute } = useSignAndExecuteTransaction();
|
|
192
|
+
- await signAndExecute({ transaction, chain: 'haneul:mainnet' });
|
|
193
|
+
+ const dAppKit = useDAppKit();
|
|
194
|
+
+ await dAppKit.signAndExecuteTransaction({ transaction, network: 'mainnet' });
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**Mutation example:**
|
|
198
|
+
|
|
199
|
+
```diff
|
|
200
|
+
- import { useSignAndExecuteTransaction } from '@haneullabs/dapp-kit';
|
|
201
|
+
+ import { useMutation } from '@tanstack/react-query';
|
|
202
|
+
+ import { useDAppKit } from '@haneullabs/dapp-kit-react';
|
|
203
|
+
import type { Transaction } from '@haneullabs/haneul/transactions';
|
|
204
|
+
|
|
205
|
+
export function ExampleComponent({ transaction }: { transaction: Transaction }) {
|
|
206
|
+
- const { mutateAsync: signAndExecute } = useSignAndExecuteTransaction();
|
|
207
|
+
+ const dAppKit = useDAppKit();
|
|
208
|
+
+
|
|
209
|
+
+ const { mutateAsync: signAndExecute } = useMutation({
|
|
210
|
+
+ mutationFn: (tx: Transaction) => dAppKit.signAndExecuteTransaction({ transaction: tx }),
|
|
211
|
+
+ });
|
|
212
|
+
|
|
213
|
+
const handleClick = async () => {
|
|
214
|
+
- await signAndExecute(
|
|
215
|
+
- { transaction },
|
|
216
|
+
- {
|
|
217
|
+
- onSuccess: (result: any) => console.log(result),
|
|
218
|
+
- onError: (error: any) => console.error(error),
|
|
219
|
+
- },
|
|
220
|
+
- );
|
|
221
|
+
+ await signAndExecute(transaction, {
|
|
222
|
+
+ onSuccess: (result) => console.log(result),
|
|
223
|
+
+ onError: (error) => console.error(error),
|
|
224
|
+
+ });
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
return <button onClick={handleClick}>Sign and Execute</button>;
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**Alternative: Direct promise-based calls**
|
|
232
|
+
|
|
233
|
+
If you don't need React Query's state management, you can call `dAppKit` methods directly:
|
|
234
|
+
|
|
235
|
+
```tsx
|
|
236
|
+
|
|
237
|
+
const dAppKit = useDAppKit();
|
|
238
|
+
|
|
239
|
+
const handleClick = async () => {
|
|
240
|
+
try {
|
|
241
|
+
const result = await dAppKit.signAndExecuteTransaction({ transaction });
|
|
242
|
+
console.log(result);
|
|
243
|
+
} catch (error) {
|
|
244
|
+
console.error(error);
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
return <button onClick={handleClick}>Sign and Execute</button>;
|
|
249
|
+
}
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### 8. Replace Data Fetching Patterns
|
|
253
|
+
|
|
254
|
+
The built-in data fetching hooks have been removed. Use TanStack Query's `useQuery` with
|
|
255
|
+
`useCurrentClient()` to get similar functionality:
|
|
256
|
+
|
|
257
|
+
```diff
|
|
258
|
+
- import { useHaneulClientQuery } from '@haneullabs/dapp-kit';
|
|
259
|
+
+ import { useQuery } from '@tanstack/react-query';
|
|
260
|
+
+ import { useCurrentClient } from '@haneullabs/dapp-kit-react';
|
|
261
|
+
|
|
262
|
+
export function ExampleComponent({ objectId }: { objectId: string }) {
|
|
263
|
+
+ const client = useCurrentClient();
|
|
264
|
+
+
|
|
265
|
+
- const { data, isLoading, error } = useHaneulClientQuery('getObject', {
|
|
266
|
+
- id: objectId,
|
|
267
|
+
- });
|
|
268
|
+
+ const { data, isLoading, error } = useQuery({
|
|
269
|
+
+ queryKey: ['object', objectId],
|
|
270
|
+
+ queryFn: () => client.core.getObject({ objectId }),
|
|
271
|
+
+ });
|
|
272
|
+
// ...
|
|
273
|
+
}
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
**Alternative: Direct data fetching**
|
|
277
|
+
|
|
278
|
+
If you don't need React Query's caching and state management, you can fetch data directly:
|
|
279
|
+
|
|
280
|
+
```tsx
|
|
281
|
+
|
|
282
|
+
const client = useCurrentClient();
|
|
283
|
+
const [data, setData] = useState(null);
|
|
284
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
285
|
+
const [error, setError] = useState<string | null>(null);
|
|
286
|
+
|
|
287
|
+
useEffect(() => {
|
|
288
|
+
client.core
|
|
289
|
+
.getObject({ objectId })
|
|
290
|
+
.then((result) => setData(result.object ?? null))
|
|
291
|
+
.catch((err) => setError(err.message))
|
|
292
|
+
.finally(() => setIsLoading(false));
|
|
293
|
+
}, [client, objectId]);
|
|
294
|
+
// ...
|
|
295
|
+
}
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
### 9. Update The Remaining Code
|
|
299
|
+
|
|
300
|
+
The following hooks from the original dApp Kit are not available anymore:
|
|
301
|
+
|
|
302
|
+
- `useHaneulClientQuery` → Use `useQuery` from `@tanstack/react-query`
|
|
303
|
+
- `useHaneulClientMutation` → Use `useMutation` from `@tanstack/react-query`
|
|
304
|
+
- `useHaneulClientInfiniteQuery` → Use `useInfiniteQuery` from `@tanstack/react-query`
|
|
305
|
+
- `useResolveHaneulNSNames` → Use `useCurrentClient()` with the haneulns extension
|
|
306
|
+
|
|
307
|
+
> **Warning:** The `reportTransactionEffects` feature is planned for deprecation in the
|
|
308
|
+
> [Wallet Standard](https://docs.haneul.io/standards/wallet-standard) and so the dApp Kit provides
|
|
309
|
+
> no replacement.
|
|
310
|
+
|
|
311
|
+
The following have been removed:
|
|
312
|
+
|
|
313
|
+
- `useReportTransactionEffects` hook
|
|
314
|
+
- `reportTransactionEffects` callback from `useSignTransaction`
|
|
315
|
+
- Automatic transaction effects reporting from `useSignAndExecuteTransaction`
|
|
316
|
+
|
|
317
|
+
## CSS and Theming Changes
|
|
318
|
+
|
|
319
|
+
The new dApp Kit no longer bundles a CSS file. If you were importing the old CSS file, remove the
|
|
320
|
+
import:
|
|
321
|
+
|
|
322
|
+
```diff
|
|
323
|
+
- import '@haneullabs/dapp-kit/dist/full/index.css';
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
The new dApp Kit uses web components with built-in styling that can be customized using CSS custom
|
|
327
|
+
properties. See the [Theming documentation](/dapp-kit/theming) for details on customizing the
|
|
328
|
+
appearance of dApp Kit components.
|
|
329
|
+
|
|
330
|
+
**Quick theme setup:**
|
|
331
|
+
|
|
332
|
+
```css
|
|
333
|
+
:root {
|
|
334
|
+
--primary: #4f46e5;
|
|
335
|
+
--primary-foreground: #ffffff;
|
|
336
|
+
--background: #ffffff;
|
|
337
|
+
--foreground: #0f172a;
|
|
338
|
+
--border: #e2e8f0;
|
|
339
|
+
--radius: 0.5rem;
|
|
340
|
+
}
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
## Removing TanStack Query
|
|
344
|
+
|
|
345
|
+
If you were only using `@tanstack/react-query` for dApp Kit and don't need it for other parts of
|
|
346
|
+
your application, you can now remove it:
|
|
347
|
+
|
|
348
|
+
```bash
|
|
349
|
+
npm uninstall @tanstack/react-query
|
|
350
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# @haneullabs/deepbook-v3
|
|
2
|
+
|
|
3
|
+
> Migrate @haneullabs/deepbook-v3 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 { DeepBookClient } from '@haneullabs/deepbook-v3';
|
|
10
|
+
+ import { HaneulGrpcClient } from '@haneullabs/haneul/grpc'; // or HaneulJsonRpcClient, HaneulGraphQLClient
|
|
11
|
+
+ import { deepbook } from '@haneullabs/deepbook-v3';
|
|
12
|
+
|
|
13
|
+
- const haneulClient = new HaneulClient({ url: getFullnodeUrl('mainnet') });
|
|
14
|
+
- const deepBookClient = new DeepBookClient({
|
|
15
|
+
- client: haneulClient,
|
|
16
|
+
- address: myAddress,
|
|
17
|
+
- env: 'mainnet',
|
|
18
|
+
- balanceManagers: { ... },
|
|
19
|
+
- });
|
|
20
|
+
+ const client = new HaneulGrpcClient({
|
|
21
|
+
+ baseUrl: 'https://fullnode.mainnet.haneul.io:443',
|
|
22
|
+
+ network: 'mainnet',
|
|
23
|
+
+ }).$extend(
|
|
24
|
+
+ deepbook({
|
|
25
|
+
+ address: myAddress,
|
|
26
|
+
+ // network is auto-detected from the client
|
|
27
|
+
+ balanceManagers: { ... },
|
|
28
|
+
+ }),
|
|
29
|
+
+ );
|
|
30
|
+
|
|
31
|
+
- await deepBookClient.checkManagerBalance(manager, asset);
|
|
32
|
+
+ await client.deepbook.checkManagerBalance(manager, asset);
|
|
33
|
+
```
|