CantonContextValue
Defined in: packages/react/src/context.tsx:57
@sigilry/react - React hooks and context for Canton wallet integration
Provides react-query powered hooks following wagmi patterns.
Example
Section titled “Example”import { CantonReactProvider, useConnect, useLedgerEnd } from '@sigilry/react'import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
const queryClient = new QueryClient()
function App() { return ( <QueryClientProvider client={queryClient}> <CantonReactProvider> <MyDApp /> </CantonReactProvider> </QueryClientProvider> )}Properties
Section titled “Properties”accounts
Section titled “accounts”accounts:
object[]
Defined in: packages/react/src/context.tsx:63
disabled?
Section titled “disabled?”
optionaldisabled:boolean
externalTxId?
Section titled “externalTxId?”
optionalexternalTxId:string
hint:
string
namespace
Section titled “namespace”namespace:
string
networkId
Section titled “networkId”networkId:
string
partyId
Section titled “partyId”partyId:
string
primary
Section titled “primary”primary:
boolean
publicKey
Section titled “publicKey”publicKey:
string
reason?
Section titled “reason?”
optionalreason:string
signingProviderId
Section titled “signingProviderId”signingProviderId:
string
status
Section titled “status”status:
"initialized"|"allocated"
topologyTransactions?
Section titled “topologyTransactions?”
optionaltopologyTransactions:string
activeAccount
Section titled “activeAccount”activeAccount: {
disabled?:boolean;externalTxId?:string;hint:string;namespace:string;networkId:string;partyId:string;primary:boolean;publicKey:string;reason?:string;signingProviderId:string;status:"initialized"|"allocated";topologyTransactions?:string; } |null
Defined in: packages/react/src/context.tsx:64
connect()
Section titled “connect()”connect: () =>
Promise<void>
Defined in: packages/react/src/context.tsx:69
Returns
Section titled “Returns”Promise<void>
connectionState
Section titled “connectionState”connectionState:
ConnectionState
Defined in: packages/react/src/context.tsx:59
disconnect()
Section titled “disconnect()”disconnect: () =>
Promise<void>
Defined in: packages/react/src/context.tsx:70
Returns
Section titled “Returns”Promise<void>
isConnected
Section titled “isConnected”isConnected:
boolean
Defined in: packages/react/src/context.tsx:61
isConnecting
Section titled “isConnecting”isConnecting:
boolean
Defined in: packages/react/src/context.tsx:62
networkId
Section titled “networkId”networkId:
string|null
Defined in: packages/react/src/context.tsx:66
onTxChanged()
Section titled “onTxChanged()”onTxChanged: (
handler) => () =>void
Defined in: packages/react/src/context.tsx:79
Parameters
Section titled “Parameters”handler
Section titled “handler”(event) => void
Returns
Section titled “Returns”():
void
Returns
Section titled “Returns”void
partyId
Section titled “partyId”partyId:
string|null
Defined in: packages/react/src/context.tsx:65
providerReady
Section titled “providerReady”providerReady:
boolean
Defined in: packages/react/src/context.tsx:67
reconnect()
Section titled “reconnect()”reconnect: () =>
Promise<void>
Defined in: packages/react/src/context.tsx:71
Returns
Section titled “Returns”Promise<void>
request()
Section titled “request()”request: <
M>(method, …params) =>Promise<RpcResult<M>>
Defined in: packages/react/src/context.tsx:74
Type Parameters
Section titled “Type Parameters”M extends keyof RpcMethods
Parameters
Section titled “Parameters”method
Section titled “method”M
params
Section titled “params”…OptionalParams<M>
Returns
Section titled “Returns”Promise<RpcResult<M>>
setActiveAccount()
Section titled “setActiveAccount()”setActiveAccount: (
partyId) =>void
Defined in: packages/react/src/context.tsx:72
Parameters
Section titled “Parameters”partyId
Section titled “partyId”string
Returns
Section titled “Returns”void