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

PreviousSettlementsNextTickerReservation

Last updated 2 years ago

Was this helpful?

Represents a Subsidy relationship on chain

Hierarchy

  • ‹UniqueIdentifiers, HumanReadable›

    ↳ Subsidy

Index

Properties

Methods

Properties

beneficiary

Account whose transactions are being paid for


Protected context

• context: Context


subsidizer

Account that is paying for the transactions


uuid

• uuid: string

Methods

decreaseAllowance

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

Parameters:

Name
Type

args

opts?


exists

▸ exists(): Promise‹boolean›

Determine whether this Subsidy relationship exists on chain

Returns: Promise‹boolean›


getAllowance

▸ getAllowance(): Promise‹BigNumber›

Get amount of POLYX subsidized for this Subsidy relationship

throws if the Subsidy does not exist

Returns: Promise‹BigNumber›


increaseAllowance

Increase allowance for this Subsidy relationship

note Only the subsidizer is allowed to increase the allowance

Parameters:

Name
Type

args

opts?


isEqual

Determine whether this Entity is the same as another one

Parameters:

Name
Type

entity

Returns: boolean


quit

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

Parameters:

Name
Type

opts?


setAllowance

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

Parameters:

Name
Type

args

opts?


toHuman

â–¸ toHuman(): HumanReadable

Return the Subsidy's static data

Returns: HumanReadable


Static generateUuid

▸ generateUuid‹Identifiers›(identifiers: Identifiers): string

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

Unserialize a UUID into its Unique Identifiers

Type parameters:

â–ª Identifiers

Parameters:

Name
Type
Description

serialized

string

UUID to unserialize

Returns: Identifiers

• beneficiary:

Defined in

Inherited from .

Defined in

• subsidizer:

Defined in

Inherited from .

Defined in

▸ decreaseAllowance(args: Pick‹, "allowance"›, opts?: ): Promise‹‹void››

Defined in

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

Pick‹, "allowance"›

Returns: Promise‹‹void››

Overrides .

Defined in

Defined in

▸ increaseAllowance(args: Pick‹, "allowance"›, opts?: ): Promise‹‹void››

Defined in

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

Pick‹, "allowance"›

Returns: Promise‹‹void››

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

Inherited from .

Defined in

‹unknown, unknown›

▸ quit(opts?: ): Promise‹‹void››

Defined in

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

Returns: Promise‹‹void››

▸ setAllowance(args: Pick‹, "allowance"›, opts?: ): Promise‹‹void››

Defined in

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

Pick‹, "allowance"›

Returns: Promise‹‹void››

Overrides .

Defined in

Inherited from .

Defined in

Inherited from .

Defined in

Account
src/api/entities/Subsidy/index.ts:51
src/api/entities/Entity.ts:48
Account
src/api/entities/Subsidy/index.ts:55
src/api/entities/Entity.ts:46
DecreaseAllowanceParams
ProcedureOpts
TransactionQueue
src/api/entities/Subsidy/index.ts:176
ProcedureMethod
decreaseAllowance.checkAuthorization
TransactionQueue
src/api/entities/Subsidy/index.ts:183
src/api/entities/Subsidy/index.ts:202
IncreaseAllowanceParams
ProcedureOpts
TransactionQueue
src/api/entities/Subsidy/index.ts:162
ProcedureMethod
increaseAllowance.checkAuthorization
TransactionQueue
Entity
src/api/entities/Entity.ts:61
ProcedureOpts
TransactionQueue
src/api/entities/Subsidy/index.ts:136
NoArgsProcedureMethod
quit.checkAuthorization
TransactionQueue
SetAllowanceParams
ProcedureOpts
TransactionQueue
src/api/entities/Subsidy/index.ts:150
ProcedureMethod
setAllowance.checkAuthorization
TransactionQueue
src/api/entities/Subsidy/index.ts:224
src/api/entities/Entity.ts:14
src/api/entities/Entity.ts:23
Entity
beneficiary
context
subsidizer
uuid
decreaseAllowance
exists
getAllowance
increaseAllowance
isEqual
quit
setAllowance
toHuman
generateUuid
unserialize
DecreaseAllowanceParams
ProcedureOpts
IncreaseAllowanceParams
ProcedureOpts
Entity
ProcedureOpts
SetAllowanceParams
ProcedureOpts
CheckpointSchedule
CheckpointSchedule
Entity
CheckpointSchedule
Entity
CheckpointSchedule
CheckpointSchedule
exists
toHuman
context
uuid
isEqual
generateUuid
unserialize