Type aliases
FetchByKeysResult
FetchByKeysResult<T, K, I>: { contracts: ( CreateEvent < T , K , I > | null ) [] ; loading: boolean }
Defined in createLedgerContext.ts:52
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:38
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:63
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 []
Returns 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 >
<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
Returns 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 >
<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
Returns QueryResult < T , K , I >
LedgerProps
LedgerProps: { httpBaseUrl?: string ; party: Party ; reconnectThreshold?: number ; token: string ; wsBaseUrl?: string }
Defined in createLedgerContext.ts:23
Type declaration
Optional httpBaseUrl?: string
party: Party
Optional reconnectThreshold?: number
token: string
Optional wsBaseUrl?: string
The result of a streaming
fetchByKeys
against the ledger.