new KIP7FeePayerOptions(enableGlobalFeePayeropt, userFeePayeropt)
Creates an instance of KIP7FeePayerOptions.
Example
const options = new caver.kas.kip7.feePayerOptions(enableGlobalFeePayer, userFeePayer)
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
enableGlobalFeePayer |
boolean |
<optional> |
A boolean value of whether KAS Global FeePayer is used. |
||||||||||||
userFeePayer |
object |
<optional> |
The user fee payer object. This will include Properties
|
Members
enableGlobalFeePayer :boolean
Type:
- boolean
userFeePayer :object
Type:
- object
Methods
(static) constructFromObject(obj) → {KIP7FeePayerOptions}
Create an instance of KIP7FeePayerOptions from object.
You can use object instead of KIP7FeePayerOptions instance when using caver.kas.kip7.
Because the function of caver.kas.kip7 internally converts object to KIP7FeePayerOptions instance,
and when converting, validation of the field defined inside Object is performed.
Example
const options = caver.kas.kip7.feePayerOptions.constructFromObject({ enableGlobalFeePayer: true })
const options = caver.kas.kip7.feePayerOptions.constructFromObject({ userFeePayer: { krn, address } })
Parameters:
| Name | Type | Description |
|---|---|---|
obj |
object | An object where query parameters are defined. |
Returns:
- Type
- KIP7FeePayerOptions
toObject() → {object}
Returns an object without '_' prefix at variables.
This function will be used at constructFromObject.
Example
options.toObject()
Returns:
- Type
- object