KIP17FeePayerOptions

KIP17FeePayerOptions

new KIP17FeePayerOptions(enableGlobalFeePayeropt, userFeePayeropt)

Creates an instance of KIP17FeePayerOptions.

Example
const options = new caver.kas.kip17.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 krn and address of the fee payer.

Properties
Name Type Attributes Description
krn string <optional>

The feepayer-pool KRN of the FeePayer account.

address string <optional>

Klaytn FeePayer account address.

Members

enableGlobalFeePayer :boolean

Type:
  • boolean

userFeePayer :object

Type:
  • object

Methods

(static) constructFromObject(obj) → {KIP17FeePayerOptions}

Create an instance of KIP17FeePayerOptions from object.
You can use object instead of KIP17FeePayerOptions instance when using caver.kas.kip17.
Because the function of caver.kas.kip17 internally converts object to KIP17FeePayerOptions instance, and when converting, validation of the field defined inside Object is performed.

Example
const options = caver.kas.kip17.feePayerOptions.constructFromObject({ enableGlobalFeePayer: true })
const options = caver.kas.kip17.feePayerOptions.constructFromObject({ userFeePayer: { krn, address } })
Parameters:
Name Type Description
obj object

An object where query parameters are defined.

Returns:
Type
KIP17FeePayerOptions

toObject() → {object}

Returns an object without '_' prefix at variables. This function will be used at constructFromObject.

Example
options.toObject()
Returns:
Type
object