Polymesh SDK API Reference
beta
beta
  • Globals
  • Classes
    • Account
    • AccountManagement
    • Asset
    • AssetHolders
    • AssetPermissions
    • Assets
    • AuthorizationRequest
    • Authorizations
    • Checkpoint
    • CheckpointSchedule
    • Checkpoints
    • Claims
    • Compliance
    • CorporateAction
    • CorporateActionBase
    • CorporateActions
    • Count
    • CustomPermissionGroup
    • DefaultPortfolio
    • DefaultTrustedClaimIssuer
    • Distributions
    • DividendDistribution
    • Documents
    • Entity
    • Identities
    • Identity
    • IdentityAuthorizations
    • Instruction
    • Issuance
    • KnownPermissionGroup
    • Network
    • NumberedPortfolio
    • Offering
    • Offerings
    • Percentage
    • PermissionGroup
    • Permissions
    • Polymesh
    • PolymeshError
    • PolymeshTransaction
    • PolymeshTransactionBase
    • PolymeshTransactionBatch
    • Portfolio
    • Portfolios
    • Requirements
    • Schedules
    • Settlements
    • Subsidy
    • TickerReservation
    • TransactionQueue
    • TransferRestrictionBase
    • TransferRestrictions
    • TrustedClaimIssuers
    • Venue
  • Enums
  • Interfaces
Powered by GitBook
On this page
  • Hierarchy
  • Index
  • Properties
  • Methods
  • Properties
  • beneficiary
  • Protected context
  • subsidizer
  • uuid
  • Methods
  • decreaseAllowance
  • exists
  • getAllowance
  • increaseAllowance
  • isEqual
  • quit
  • setAllowance
  • toHuman
  • Static generateUuid
  • Static unserialize

Was this helpful?

  1. Classes

Subsidy

Represents a Subsidy relationship on chain

Hierarchy

  • Entity‹UniqueIdentifiers, HumanReadable›

    ↳ Subsidy

Index

Properties

  • beneficiary

  • context

  • subsidizer

  • uuid

Methods

  • decreaseAllowance

  • exists

  • getAllowance

  • increaseAllowance

  • isEqual

  • quit

  • setAllowance

  • toHuman

  • generateUuid

  • unserialize

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:

Name
Type

args

opts?

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:

Name
Type

args

opts?

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:

Name
Type

entity

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:

Name
Type

opts?

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:

Name
Type

args

opts?

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

▸ generateUuid‹Identifiers›(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:

Name
Type
Description

identifiers

Identifiers

Returns: string


Static unserialize

▸ unserialize‹Identifiers›(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:

Name
Type
Description

serialized

string

UUID to unserialize

Returns: Identifiers

PreviousSettlementsNextTickerReservation

Last updated 2 years ago

Was this helpful?

Pick‹, "allowance"›

Pick‹, "allowance"›

‹unknown, unknown›

Pick‹, "allowance"›

DecreaseAllowanceParams
ProcedureOpts
IncreaseAllowanceParams
ProcedureOpts
Entity
ProcedureOpts
SetAllowanceParams
ProcedureOpts