Subsidy

Represents a Subsidy relationship on chain

Hierarchy

  • Entity‹UniqueIdentifiers, HumanReadable›

    Subsidy

Index

Properties

Methods

Properties

beneficiary

beneficiary: Account

Defined in src/api/entities/Subsidy/index.ts:51

Account whose transactions are being paid for


Protected context

context: Context

Inherited from CheckpointSchedule.context

Defined in src/api/entities/Entity.ts:48


subsidizer

subsidizer: Account

Defined in src/api/entities/Subsidy/index.ts:55

Account that is paying for the transactions


uuid

uuid: string

Inherited from CheckpointSchedule.uuid

Defined in src/api/entities/Entity.ts:46

Methods

decreaseAllowance

decreaseAllowance(args: Pick‹DecreaseAllowanceParams, "allowance"›, opts?: ProcedureOpts): Promise‹TransactionQueue‹void››

Defined in src/api/entities/Subsidy/index.ts:176

Decrease allowance for this Subsidy relationship

note Only the subsidizer is allowed to decrease the allowance

throws if the amount to decrease by is more than the existing allowance

note this method is of type ProcedureMethod, which means you can call decreaseAllowance.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters:

Returns: Promise‹TransactionQueue‹void››


exists

exists(): Promise‹boolean›

Overrides Entity.exists

Defined in src/api/entities/Subsidy/index.ts:183

Determine whether this Subsidy relationship exists on chain

Returns: Promise‹boolean›


getAllowance

getAllowance(): Promise‹BigNumber›

Defined in src/api/entities/Subsidy/index.ts:202

Get amount of POLYX subsidized for this Subsidy relationship

throws if the Subsidy does not exist

Returns: Promise‹BigNumber›


increaseAllowance

increaseAllowance(args: Pick‹IncreaseAllowanceParams, "allowance"›, opts?: ProcedureOpts): Promise‹TransactionQueue‹void››

Defined in src/api/entities/Subsidy/index.ts:162

Increase allowance for this Subsidy relationship

note Only the subsidizer is allowed to increase the allowance

note this method is of type ProcedureMethod, which means you can call increaseAllowance.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters:

Returns: Promise‹TransactionQueue‹void››


isEqual

isEqual(entity: Entity‹unknown, unknown›): boolean

Inherited from CheckpointSchedule.isEqual

Defined in src/api/entities/Entity.ts:61

Determine whether this Entity is the same as another one

Parameters:

Returns: boolean


quit

quit(opts?: ProcedureOpts): Promise‹TransactionQueue‹void››

Defined in src/api/entities/Subsidy/index.ts:136

Terminate this Subsidy relationship. The beneficiary Account will be forced to pay for their own transactions

note both the beneficiary and the subsidizer are allowed to unilaterally quit the Subsidy

note this method is of type NoArgsProcedureMethod, which means you can call quit.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters:

Returns: Promise‹TransactionQueue‹void››


setAllowance

setAllowance(args: Pick‹SetAllowanceParams, "allowance"›, opts?: ProcedureOpts): Promise‹TransactionQueue‹void››

Defined in src/api/entities/Subsidy/index.ts:150

Set allowance for this Subsidy relationship

note Only the subsidizer is allowed to set the allowance

throws if the allowance to set is equal to the current allowance

note this method is of type ProcedureMethod, which means you can call setAllowance.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters:

Returns: Promise‹TransactionQueue‹void››


toHuman

toHuman(): HumanReadable

Overrides Entity.toHuman

Defined in src/api/entities/Subsidy/index.ts:224

Return the Subsidy's static data

Returns: HumanReadable


Static generateUuid

generateUuidIdentifiers›(identifiers: Identifiers): string

Inherited from CheckpointSchedule.generateUuid

Defined in src/api/entities/Entity.ts:14

Generate the Entity's UUID from its identifying properties

Type parameters:

Identifiers

Parameters:

Returns: string


Static unserialize

unserializeIdentifiers›(serialized: string): Identifiers

Inherited from CheckpointSchedule.unserialize

Defined in src/api/entities/Entity.ts:23

Unserialize a UUID into its Unique Identifiers

Type parameters:

Identifiers

Parameters:

Returns: Identifiers

Last updated