new KIP37FeePayerOptions(enableGlobalFeePayeropt, userFeePayeropt)
Creates an instance of KIP37FeePayerOptions.
Example
const options = new caver.kas.kip37.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) → {KIP37FeePayerOptions}
Create an instance of KIP37FeePayerOptions from object.
You can use object instead of KIP37FeePayerOptions instance when using caver.kas.kip37.
Because the function of caver.kas.kip37 internally converts object to KIP37FeePayerOptions instance,
and when converting, validation of the field defined inside Object is performed.
Example
const options = caver.kas.kip37.feePayerOptions.constructFromObject({ enableGlobalFeePayer: true })
const options = caver.kas.kip37.feePayerOptions.constructFromObject({ userFeePayer: { krn, address } })
Parameters:
| Name | Type | Description |
|---|---|---|
obj |
object | An object where query parameters are defined. |
Returns:
- Type
- KIP37FeePayerOptions
toObject() → {object}
Returns an object without '_' prefix at variables.
This function will be used at constructFromObject.
Example
options.toObject()
Returns:
- Type
- object