What the machine needs to build and drive its own DappSDK. Read once, at actor creation: as in wagmi, a config swapped afterwards reaches the hooks but not the connection lifecycle.
DappSDK
import { DappSDK } from '@canton-network/dapp-sdk'import { createActor } from 'xstate'import { connectionMachine } from '#src/machine/connectionMachine'const createSdk = () => new DappSDK({})const input = { createSdk, initOptions: {}, guardPicker: true }createActor(connectionMachine, { input }) Copy
import { DappSDK } from '@canton-network/dapp-sdk'import { createActor } from 'xstate'import { connectionMachine } from '#src/machine/connectionMachine'const createSdk = () => new DappSDK({})const input = { createSdk, initOptions: {}, guardPicker: true }createActor(connectionMachine, { input })
What the machine needs to build and drive its own
DappSDK. Read once, at actor creation: as in wagmi, a config swapped afterwards reaches the hooks but not the connection lifecycle.Example