Skip to main content

TypeScript package

dApp SDK

TypeScript client library reference for dApp integrations.

Generated from published @canton-network/dapp-sdk TypeDoc snapshots.

Table of Contents

Reference

Namespaces

dappAPI

  • Kind: Namespace
  • Source: node_modules/@canton-network/core-wallet-dapp-rpc-client/dist/index.d.ts:1
Members

Enumerations

ErrorCode

EnumerationAdded 1.1.0
  • Kind: Enumeration
  • Source: dist/error.d.ts:1
Members

Classes

DappClient

  • Kind: Class
  • Source: dist/client.d.ts:20
DappClient is a thin convenience wrapper around a connected Provider<DappRpcTypes>. It exposes typed RPC helpers, event subscription shortcuts, and session-persistence listeners. How to obtain a provider is not this class’s concern. Use DiscoveryClient + the wallet picker, or construct any Provider<DappRpcTypes> directly — then pass it here. Members

DappSDK

  • Kind: Class
  • Source: dist/sdk.d.ts:17
Members

DiscoveryClient

  • Kind: Class
  • Source: node_modules/@canton-network/core-wallet-discovery/dist/client.d.ts:31
DiscoveryClient manages provider adapters and exposes a unified Provider<DappRpcTypes> regardless of the underlying wallet type. It is UI-framework agnostic — the wallet picker UI is injected via the walletPicker config option. Client-level events (discovery:connected, discovery:disconnected, discovery:error) track the adapter session lifecycle. Provider-level CIP-103 events (statusChanged, accountsChanged, txChanged) live on the Provider — subscribe via client.getProvider().on(...). Members

DiscoveryError

  • Kind: Class
  • Source: node_modules/@canton-network/core-wallet-discovery/dist/errors.d.ts:2
Members

EventEmitter

  • Kind: Class
  • Source: node_modules/@canton-network/core-wallet-discovery/dist/events.d.ts:20
Members

ExtensionAdapter

  • Kind: Class
  • Source: dist/adapter/extension-adapter.d.ts:19
ProviderAdapter for any CIP-103 compliant wallet exposed as a browser extension. provider() returns a DappProvider which communicates via postMessage and implements the full openrpc-dapp-api.json surface directly. Members

NotConnectedError

  • Kind: Class
  • Source: node_modules/@canton-network/core-wallet-discovery/dist/errors.d.ts:22
Members

RemoteAdapter

  • Kind: Class
  • Source: dist/adapter/remote-adapter.d.ts:19
ProviderAdapter for any CIP-103 compliant wallet reachable over HTTP/SSE. provider() returns a provider that maps the remote API (openrpc-dapp-remote-api.json) to the dApp API (openrpc-dapp-api.json) via dappSDKController. Members

SessionExpiredError

  • Kind: Class
  • Source: node_modules/@canton-network/core-wallet-discovery/dist/errors.d.ts:16
Members

TimeoutError

  • Kind: Class
  • Source: node_modules/@canton-network/core-wallet-discovery/dist/errors.d.ts:19
Members

UserRejectedError

  • Kind: Class
  • Source: node_modules/@canton-network/core-wallet-discovery/dist/errors.d.ts:13
Members

WalletConnectAdapter

  • Kind: Class
  • Source: dist/adapter/walletconnect-adapter.d.ts:74
Single-class WalletConnect adapter that implements both ProviderAdapter (for discovery/wallet-picker) and Provider<DappRpcTypes> (for RPC calls). Calls signClient.request() directly with canton_ prefixed methods. Events arriving via session_event are buffered until a listener attaches. Members

WalletNotFoundError

  • Kind: Class
  • Source: node_modules/@canton-network/core-wallet-discovery/dist/errors.d.ts:7
Members

WalletNotInstalledError

  • Kind: Class
  • Source: node_modules/@canton-network/core-wallet-discovery/dist/errors.d.ts:10
Members

Interfaces

ActiveSession

InterfaceAdded 1.1.0
  • Kind: Interface
  • Source: node_modules/@canton-network/core-wallet-discovery/dist/client.d.ts:14
Signature
Members

DappClientOptions

  • Kind: Interface
  • Source: dist/client.d.ts:3
Signature
Members

DiscoveryClientConfig

InterfaceAdded 1.1.0
  • Kind: Interface
  • Source: node_modules/@canton-network/core-wallet-discovery/dist/client.d.ts:5
Signature
Members

DiscoveryConnectedEvent

InterfaceAdded 1.1.0
  • Kind: Interface
  • Source: node_modules/@canton-network/core-wallet-discovery/dist/events.d.ts:2
Signature
Members

DiscoveryDisconnectedEvent

InterfaceAdded 1.1.0
  • Kind: Interface
  • Source: node_modules/@canton-network/core-wallet-discovery/dist/events.d.ts:5
Signature
Members

DiscoveryErrorEvent

InterfaceAdded 1.1.0
  • Kind: Interface
  • Source: node_modules/@canton-network/core-wallet-discovery/dist/events.d.ts:8
Signature
Members

ProviderAdapter

  • Kind: Interface
  • Source: node_modules/@canton-network/core-wallet-discovery/dist/types.d.ts:27
Signature
A ProviderAdapter is a thin factory that knows how to create a Provider<DappRpcTypes> for a particular wallet type, detect its availability, and clean up resources. All RPC methods (connect, disconnect, status, prepareExecute, etc.) are called directly on the provider — the adapter does not duplicate them. Members

RemoteAdapterConfig

InterfaceAdded 1.1.0
  • Kind: Interface
  • Source: dist/adapter/remote-adapter.d.ts:6
Signature
Members

WalletConnectAdapterConfig

  • Kind: Interface
  • Source: dist/adapter/walletconnect-adapter.d.ts:52
Signature
Members

WalletInfo

InterfaceAdded 1.1.0
  • Kind: Interface
  • Source: node_modules/@canton-network/core-wallet-discovery/dist/types.d.ts:5
Signature
Members

WalletPickerEntry

  • Kind: Interface
  • Source: node_modules/@canton-network/core-types/dist/index.d.ts:158
Signature
Members

WalletPickerResult

InterfaceAdded 1.1.0
  • Kind: Interface
  • Source: node_modules/@canton-network/core-types/dist/index.d.ts:174
Signature
Members

Type Aliases

DiscoveryClientEventHandler

Type AliasAdded 1.1.0
  • Kind: Type Alias
  • Source: node_modules/@canton-network/core-wallet-discovery/dist/events.d.ts:19
Signature
Type Parameters

DiscoveryClientEventMap

Type AliasAdded 1.1.0
  • Kind: Type Alias
  • Source: node_modules/@canton-network/core-wallet-discovery/dist/events.d.ts:13
Signature

DiscoveryClientEventName

Type AliasAdded 1.1.0
  • Kind: Type Alias
  • Source: node_modules/@canton-network/core-wallet-discovery/dist/events.d.ts:18
Signature

DiscoveryErrorCode

Type AliasAdded 1.1.0
  • Kind: Type Alias
  • Source: node_modules/@canton-network/core-wallet-discovery/dist/errors.d.ts:1
Signature

ProviderAdapterConfig

Type AliasAdded 1.1.0
  • Kind: Type Alias
  • Source: node_modules/@canton-network/core-types/dist/index.d.ts:150
Signature

WalletPickerFn

Type AliasAdded 1.1.0
  • Kind: Type Alias
  • Source: node_modules/@canton-network/core-wallet-discovery/dist/types.d.ts:64
Signature
A function that presents wallet choices to the user and returns their selection. This abstraction allows the DiscoveryClient to remain UI-framework agnostic.

Variables

CANTON_LOGO_PNG

VariableAdded 1.1.0
  • Kind: Variable
  • Source: dist/assets.d.ts:10
Signature
Canton logo (PNG) - used as the default icon for Wallet Gateway

dappSDK

VariableAdded 1.1.0
  • Kind: Variable
  • Source: dist/sdk.d.ts:91
Signature

ProviderAdapterConfig

VariableAdded 1.1.0
  • Kind: Variable
  • Source: node_modules/@canton-network/core-types/dist/index.d.ts:150
Signature
Provider adapter configuration

WALLET_GATEWAY_ICON

VariableAdded 1.1.0
  • Kind: Variable
  • Source: dist/assets.d.ts:14
Signature
Alias for Wallet Gateway - same as Canton logo

Functions

connect

  • Kind: Function
  • Source: dist/sdk.d.ts:96
Signature
Opens the wallet picker and connects. Prefer init with adapters at startup; options here is a legacy convenience that forwards to DappSDK.init. Call Signatures Overload 1:
Opens the wallet picker and connects. Prefer init with adapters at startup; options here is a legacy convenience that forwards to DappSDK.init. Returns: Promise<ConnectResult> Overload 2:
Returns: Promise<ConnectResult>

disconnect

FunctionAdded 1.1.0
  • Kind: Function
  • Source: dist/sdk.d.ts:100
Signature
Call Signatures
Returns: Promise<null>

getConnectedProvider

FunctionAdded 1.1.0
  • Kind: Function
  • Source: dist/sdk.d.ts:108
Signature
Call Signatures
Returns: Provider<RpcTypes>

init

FunctionAdded 1.1.0
  • Kind: Function
  • Source: dist/sdk.d.ts:99
Signature
Call Signatures
Returns: Promise<void>

isConnected

FunctionAdded 1.1.0
  • Kind: Function
  • Source: dist/sdk.d.ts:101
Signature
Call Signatures
Returns: Promise<ConnectResult>

ledgerApi

FunctionAdded 1.1.0
  • Kind: Function
  • Source: dist/sdk.d.ts:106
Signature
Call Signatures
Returns: Promise<LedgerApiResult>

listAccounts

FunctionAdded 1.1.0
  • Kind: Function
  • Source: dist/sdk.d.ts:103
Signature
Call Signatures
Returns: Promise<ListAccountsResult>

onAccountsChanged

FunctionAdded 1.1.0
  • Kind: Function
  • Source: dist/sdk.d.ts:110
Signature
Call Signatures
Returns: Promise<void>

onConnected

FunctionAdded 1.1.0
  • Kind: Function
  • Source: dist/sdk.d.ts:111
Signature
Call Signatures
Returns: Promise<void>

onStatusChanged

FunctionAdded 1.1.0
  • Kind: Function
  • Source: dist/sdk.d.ts:109
Signature
Call Signatures
Returns: Promise<void>

onTxChanged

FunctionAdded 1.1.0
  • Kind: Function
  • Source: dist/sdk.d.ts:112
Signature
Call Signatures
Returns: Promise<void>

open

FunctionAdded 1.1.0
  • Kind: Function
  • Source: dist/sdk.d.ts:107
Signature
Call Signatures
Returns: Promise<void>

prepareExecute

FunctionAdded 1.1.0
  • Kind: Function
  • Source: dist/sdk.d.ts:104
Signature
Call Signatures
Returns: Promise<null>

prepareExecuteAndWait

FunctionAdded 1.1.0
  • Kind: Function
  • Source: dist/sdk.d.ts:105
Signature
Call Signatures
Returns: Promise<PrepareExecuteAndWaitResult>

removeOnAccountsChanged

FunctionAdded 1.1.0
  • Kind: Function
  • Source: dist/sdk.d.ts:115
Signature
Call Signatures
Returns: Promise<void>

removeOnConnected

FunctionAdded 1.1.0
  • Kind: Function
  • Source: dist/sdk.d.ts:116
Signature
Call Signatures
Returns: Promise<void>

removeOnStatusChanged

FunctionAdded 1.1.0
  • Kind: Function
  • Source: dist/sdk.d.ts:114
Signature
Call Signatures
Returns: Promise<void>

removeOnTxChanged

FunctionAdded 1.1.0
  • Kind: Function
  • Source: dist/sdk.d.ts:117
Signature
Call Signatures
Returns: Promise<void>

status

FunctionAdded 1.1.0
  • Kind: Function
  • Source: dist/sdk.d.ts:102
Signature
Call Signatures
Returns: Promise<StatusEvent>

References

AccountsChangedEvent

  • Kind: Reference
  • Source: dist/index.d.ts:10

ConnectResult

  • Kind: Reference
  • Source: dist/index.d.ts:10

LedgerApiParams

  • Kind: Reference
  • Source: dist/index.d.ts:10

LedgerApiResult

  • Kind: Reference
  • Source: dist/index.d.ts:10

ListAccountsResult

  • Kind: Reference
  • Source: dist/index.d.ts:10

Network

  • Kind: Reference
  • Source: dist/index.d.ts:10

PrepareExecuteAndWaitResult

  • Kind: Reference
  • Source: dist/index.d.ts:10

PrepareExecuteParams

  • Kind: Reference
  • Source: dist/index.d.ts:10

ProviderId

  • Kind: Reference
  • Source: dist/adapter/types.d.ts:2

ProviderType

  • Kind: Reference
  • Source: dist/adapter/types.d.ts:2

Session

  • Kind: Reference
  • Source: dist/index.d.ts:10

SignMessageParams

  • Kind: Reference
  • Source: dist/index.d.ts:10

SignMessageResult

  • Kind: Reference
  • Source: dist/index.d.ts:10

StatusEvent

  • Kind: Reference
  • Source: dist/index.d.ts:10

TxChangedEvent

  • Kind: Reference
  • Source: dist/index.d.ts:10

Wallet

  • Kind: Reference
  • Source: dist/index.d.ts:10

History

Updated1.2.0

dappAPI: members added: Command, Commands, CreateAndExerciseCommand, CreateAndExerciseCommandPayload, CreateCommand, CreateCommandPayload, ExerciseByKeyCommand, ExerciseByKeyCommandPayload, ExerciseCommand, ExerciseCommandPayload; members removed: JsCommands

DappClient: summary updated; members added: onMessageSignature, removeOnMessageSignature, signMessage

DappSDK: members added: onMessageSignature, removeOnMessageSignature, signMessage

DiscoveryClient: details updated

DappClientOptions: members removed: injectGlobal

ProviderAdapter: details updated

WalletConnectAdapterConfig: members added: onSignInWithCanton, signInWithCanton

WalletPickerEntry: summary updated

connect: details updated

AccountsChangedEvent: details updated

ConnectResult: details updated

LedgerApiParams: details updated

LedgerApiResult: details updated

ListAccountsResult: details updated

Network: details updated

PrepareExecuteAndWaitResult: details updated

PrepareExecuteParams: details updated

ProviderId: details updated

ProviderType: details updated

Session: details updated

SignMessageParams: details updated

SignMessageResult: details updated

StatusEvent: details updated

TxChangedEvent: details updated

Wallet: details updated

Added1.1.0

73 exported symbols added.