Whitelist
Hierarchy
- any
- Whitelist
Index
Constructors
Methods
Constructors
constructor
Returns Whitelist
Methods
getWhitelistedAmount
Parameters
address: PublicKey
The
addressparameter is of typePublicKey, used to retrieve a whitelisted amount for the given address.name: string = "whitelist"
Returns Promise<UInt64Option>
The
fetchWhitelistedAmountfunction returns aPromisethat resolves to aUInt64Optionobject. This object contains avalueproperty representing the amount retrieved from a map based on the provided address. TheisSomeproperty indicates whether the value is present or not. The value is not present if the whitelist is NOT empty and the address is NOT whitelisted. The value is present if the whitelist is NOT empty or the address IS whitelisted. The value is present and equals to UInt64.MAXINT() if the whitelist IS empty.
isNone
Returns Bool
isSome
Returns Bool
load
Returns Promise<OffchainMapOption>
toString
Returns string
staticcreate
Creates a new whitelist and pins it to IPFS.
Parameters
params: { attempts?: number; auth?: string; filename?: string; json?: OffchainMapSerialized; keyvalues?: object; list: WhitelistedAddress[]; name?: string; pin?: boolean; timeout?: number }
The parameters for creating the whitelist.
optionalattempts: number
optionalauth: string
optionalfilename: string
optionaljson: OffchainMapSerialized
optionalkeyvalues: object
list: WhitelistedAddress[]
optionalname: string
optionalpin: boolean
optionaltimeout: number
Returns Promise<{ json: OffchainMapSerialized; whitelist: Whitelist }>
A new
Whitelistinstance.
staticempty
Returns Whitelist
staticfromString
Parameters
str: string
Returns Whitelist
The function fetches a whitelisted amount associated with a given address using a map and returns it as a UInt64Option.