new TokenHistoryQueryOptions(kind, range, size, cursor, caFilter, status, type)
Creates an instance of TokenHistoryQueryOptions.
Example
const options = new caver.kas.tokenHistory.queryOptions(kind, range, size, cursor, caFilter, status, type)
Parameters:
Name | Type | Description |
---|---|---|
kind |
Array.<string> | Indicate the [“klay”, “ft”, “nft”, "mt"] type. All types will be searched if no type is specified. You can use |
range |
string | Search range (block number of Unix time). |
size |
number | Maximum number of items to retrieve (min=1, max=1000, default=100). |
cursor |
string | Information of the last retrieved cursor. |
caFilter |
string | The token contract address to filter from the result. |
status |
string | Labeling status [completed, processing, failed, cancelled]. You can use |
type |
string | Contract type. If not set, return all types. You can use |
Members
kind :Array.<string>
Type:
- Array.<string>
range :string
Type:
- string
size :number
Type:
- number
cursor :string
Type:
- string
caFilter :string
Type:
- string
status :string
Type:
- string
type :string
Type:
- string
Methods
(static) constructFromObject(obj) → {TokenHistoryQueryOptions}
Create an instance of TokenHistoryQueryOptions from object.
You can use object instead of TokenHistoryQueryOptions instance when using caver.kas.tokenHistory
.
Because the function of caver.kas.tokenHistory
internally converts object to TokenHistoryQueryOptions instance,
and when converting, validation of the field defined inside Object is performed.
Example
const options = caver.kas.tokenHistory.queryOptions.constructFromObject({ kind, range, size, cursor, ... })
Parameters:
Name | Type | Description |
---|---|---|
obj |
object | An object where query parameters are defined. |
Returns:
isValidOptions(options) → {boolean}
Make sure that only essential ones are defined for the option values defined in TokenHistoryQueryOptions.
Example
const options = caver.kas.tokenHistory.queryOptions.constructFromObject({ ... })
const isValid = options.isValidOptions(['kind', 'range'])
Parameters:
Name | Type | Description |
---|---|---|
options |
Array.<string> | An array containing the names of options used in the function. |
Returns:
- Type
- boolean