Type aliases
FetchByKeysResult
FetchByKeysResult<T, K, I>: { contracts: ( CreateEvent < T , K , I > | null ) [] ; loading: boolean }
Defined in createLedgerContext.ts:64
Type parameters
Type declaration
contracts: ( CreateEvent < T , K , I > | null ) []
loading: boolean
FetchResult
FetchResult<T, K, I>: { contract: CreateEvent < T , K , I > | null ; loading: boolean }
Defined in createLedgerContext.ts:50
Type parameters
Type declaration
contract: CreateEvent < T , K , I > | null
loading: boolean
LedgerContext
Ledger
Context: { DamlLedger: React.FC < LedgerProps > ; useFetch: <T, K, I>( template: Template < T , K , I > , contractId: ContractId < T > ) => FetchResult < T , K , I > ; useFetchByKey: <T, K, I>( template: Template < T , K , I > , keyFactory: ( ) => K , keyDeps: readonly unknown [] ) => FetchResult < T , K , I > ; useLedger: ( ) => Ledger ; useParty: ( ) => Party ; useQuery: <T, K, I>( template: Template < T , K , I > , queryFactory?: ( ) => Query < T > , queryDeps?: readonly unknown [] ) => QueryResult < T , K , I > ; useReload: ( ) => ( ) => void ; useStreamFetchByKey: <T, K, I>( template: Template < T , K , I > , keyFactory: ( ) => K , keyDeps: readonly unknown [] , closeHandler?: ( e: StreamCloseEvent ) => void ) => FetchResult < T , K , I > ; useStreamFetchByKeys: <T, K, I>( template: Template < T , K , I > , keyFactory: ( ) => K [] , keyDeps: readonly unknown [] , closeHandler?: ( e: StreamCloseEvent ) => void ) => FetchByKeysResult < T , K , I > ; useStreamQueries: <T, K, I>( template: Template < T , K , I > , queryFactory?: ( ) => Query < T > [] , queryDeps?: readonly unknown [] , closeHandler?: ( e: StreamCloseEvent ) => void ) => QueryResult < T , K , I > ; useStreamQuery: <T, K, I>( template: Template < T , K , I > , queryFactory?: ( ) => Query < T > , queryDeps?: readonly unknown [] , closeHandler?: ( e: StreamCloseEvent ) => void ) => QueryResult < T , K , I > }
Defined in createLedgerContext.ts:75
Type declaration
useFetch: <T, K, I>( template: Template < T , K , I > , contractId: ContractId < T > ) => FetchResult < T , K , I >
<T, K, I>( template: Template < T , K , I > , contractId: ContractId < T > ) : FetchResult < T , K , I >
Type parameters
Parameters
template: Template < T , K , I >
contractId: ContractId < T >
useFetchByKey: <T, K, I>( template: Template < T , K , I > , keyFactory: ( ) => K , keyDeps: readonly unknown [] ) => FetchResult < T , K , I >
<T, K, I>( template: Template < T , K , I > , keyFactory: ( ) => K , keyDeps: readonly unknown [] ) : FetchResult < T , K , I >
Type parameters
Parameters
template: Template < T , K , I >
keyFactory: ( ) => K
keyDeps: readonly unknown []
useLedger: ( ) => Ledger
useParty: ( ) => Party
useQuery: <T, K, I>( template: Template < T , K , I > , queryFactory?: ( ) => Query < T > , queryDeps?: readonly unknown [] ) => QueryResult < T , K , I >
<T, K, I>( template: Template < T , K , I > , queryFactory?: ( ) => Query < T > , queryDeps?: readonly unknown [] ) : QueryResult < T , K , I >
Type parameters
Parameters
template: Template < T , K , I >
Optional queryFactory: ( ) => Query < T >
Optional queryDeps: readonly unknown []
useReload: ( ) => ( ) => void
useStreamFetchByKey: <T, K, I>( template: Template < T , K , I > , keyFactory: ( ) => K , keyDeps: readonly unknown [] , closeHandler?: ( e: StreamCloseEvent ) => void ) => FetchResult < T , K , I >
<T, K, I>( template: Template < T , K , I > , keyFactory: ( ) => K , keyDeps: readonly unknown [] , closeHandler?: ( e: StreamCloseEvent ) => void ) : FetchResult < T , K , I >
Type parameters
Parameters
template: Template < T , K , I >
keyFactory: ( ) => K
keyDeps: readonly unknown []
Optional closeHandler: ( e: StreamCloseEvent ) => void
( e: StreamCloseEvent ) : void
useStreamFetchByKeys: <T, K, I>( template: Template < T , K , I > , keyFactory: ( ) => K [] , keyDeps: readonly unknown [] , closeHandler?: ( e: StreamCloseEvent ) => void ) => FetchByKeysResult < T , K , I >
<T, K, I>( template: Template < T , K , I > , keyFactory: ( ) => K [] , keyDeps: readonly unknown [] , closeHandler?: ( e: StreamCloseEvent ) => void ) : FetchByKeysResult < T , K , I >
Type parameters
Parameters
template: Template < T , K , I >
keyFactory: ( ) => K []
keyDeps: readonly unknown []
Optional closeHandler: ( e: StreamCloseEvent ) => void
( e: StreamCloseEvent ) : void
useStreamQueries: <T, K, I>( template: Template < T , K , I > , queryFactory?: ( ) => Query < T > [] , queryDeps?: readonly unknown [] , closeHandler?: ( e: StreamCloseEvent ) => void ) => QueryResult < T , K , I >
<T, K, I>( template: Template < T , K , I > , queryFactory?: ( ) => Query < T > [] , queryDeps?: readonly unknown [] , closeHandler?: ( e: StreamCloseEvent ) => void ) : QueryResult < T , K , I >
Type parameters
Parameters
template: Template < T , K , I >
Optional queryFactory: ( ) => Query < T > []
Optional queryDeps: readonly unknown []
Optional closeHandler: ( e: StreamCloseEvent ) => void
( e: StreamCloseEvent ) : void
useStreamQuery: <T, K, I>( template: Template < T , K , I > , queryFactory?: ( ) => Query < T > , queryDeps?: readonly unknown [] , closeHandler?: ( e: StreamCloseEvent ) => void ) => QueryResult < T , K , I >
<T, K, I>( template: Template < T , K , I > , queryFactory?: ( ) => Query < T > , queryDeps?: readonly unknown [] , closeHandler?: ( e: StreamCloseEvent ) => void ) : QueryResult < T , K , I >
Type parameters
Parameters
template: Template < T , K , I >
Optional queryFactory: ( ) => Query < T >
Optional queryDeps: readonly unknown []
Optional closeHandler: ( e: StreamCloseEvent ) => void
( e: StreamCloseEvent ) : void
LedgerProps
LedgerProps: { httpBaseUrl?: string ; party: Party ; reconnectThreshold?: number ; token: string ; wsBaseUrl?: string }
Defined in createLedgerContext.ts:21
Type declaration
Optional httpBaseUrl?: string
party: Party
Optional reconnectThreshold?: number
token: string
Optional wsBaseUrl?: string
QueryResult
QueryResult<T, K, I>: { contracts: readonly CreateEvent < T , K , I > [] ; loading: boolean }
Defined in createLedgerContext.ts:36
Type parameters
Type declaration
contracts: readonly CreateEvent < T , K , I > []
loading: boolean
The result of a streaming
fetchByKeys
against the ledger.