- useConsent(): {
allow: ((addresses: string[], skipPublish?: boolean) => Promise<void>);
consentState: ((address: string) => Promise<ConsentState>);
deny: ((addresses: string[], skipPublish?: boolean) => Promise<void>);
entries: Partial<CachedConsentEntryMap>;
isAllowed: ((address: string) => Promise<boolean>);
isDenied: ((address: string) => Promise<boolean>);
loadConsentList: ((startTime?: Date) => Promise<Map<string, ConsentState>>);
refreshConsentList: (() => Promise<Map<string, ConsentState>>);
} Returns {
allow: ((addresses: string[], skipPublish?: boolean) => Promise<void>);
consentState: ((address: string) => Promise<ConsentState>);
deny: ((addresses: string[], skipPublish?: boolean) => Promise<void>);
entries: Partial<CachedConsentEntryMap>;
isAllowed: ((address: string) => Promise<boolean>);
isDenied: ((address: string) => Promise<boolean>);
loadConsentList: ((startTime?: Date) => Promise<Map<string, ConsentState>>);
refreshConsentList: (() => Promise<Map<string, ConsentState>>);
}
allow: ((addresses: string[], skipPublish?: boolean) => Promise<void>)
- (addresses, skipPublish?): Promise<void>
Parameters
- addresses: string[]
- skipPublish: boolean = false
Returns Promise<void>
consentState: ((address: string) => Promise<ConsentState>)
- (address): Promise<ConsentState>
Returns Promise<ConsentState>
deny: ((addresses: string[], skipPublish?: boolean) => Promise<void>)
- (addresses, skipPublish?): Promise<void>
Parameters
- addresses: string[]
- skipPublish: boolean = false
Returns Promise<void>
isAllowed: ((address: string) => Promise<boolean>)
- (address): Promise<boolean>
Returns Promise<boolean>
isDenied: ((address: string) => Promise<boolean>)
- (address): Promise<boolean>
Returns Promise<boolean>
loadConsentList: ((startTime?: Date) => Promise<Map<string, ConsentState>>)
- (startTime?): Promise<Map<string, ConsentState>>
Returns Promise<Map<string, ConsentState>>
refreshConsentList: (() => Promise<Map<string, ConsentState>>)
- (): Promise<Map<string, ConsentState>>
Returns Promise<Map<string, ConsentState>>
This hook returns helper functions for working with consent