api.entities.Subsidy - PolymeshAssociation/polymesh-sdk GitHub Wiki
@polymeshassociation/polymesh-sdk / api/entities/Subsidy
Defined in: api/entities/Subsidy/index.ts:39
Represents a Subsidy relationship on chain
-
Entity<UniqueIdentifiers,HumanReadable>
beneficiary:
Account
Defined in: api/entities/Subsidy/index.ts:53
Account whose transactions are being paid for
subsidizer:
Account
Defined in: api/entities/Subsidy/index.ts:57
Account that is paying for the transactions
uuid:
string
Defined in: api/entities/Entity.ts:46
decreaseAllowance(
args,opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/Subsidy/index.ts:160
Decrease allowance for this Subsidy relationship
| Parameter | Type |
|---|---|
args |
Pick<DecreaseAllowanceParams, "allowance"> |
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<void, void>>
Only the subsidizer is allowed to decrease the allowance
if the amount to decrease by is more than the existing allowance
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
exists():
Promise<boolean>
Defined in: api/entities/Subsidy/index.ts:165
Determine whether this Subsidy relationship exists on chain
Promise<boolean>
getAllowance():
Promise<BigNumber>
Defined in: api/entities/Subsidy/index.ts:184
Get amount of POLYX subsidized for this Subsidy relationship
Promise<BigNumber>
if the Subsidy does not exist
increaseAllowance(
args,opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/Subsidy/index.ts:151
Increase allowance for this Subsidy relationship
| Parameter | Type |
|---|---|
args |
Pick<IncreaseAllowanceParams, "allowance"> |
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<void, void>>
Only the subsidizer is allowed to increase the allowance
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
isEqual(
entity):boolean
Defined in: api/entities/Entity.ts:61
Determine whether this Entity is the same as another one
| Parameter | Type |
|---|---|
entity |
Entity<unknown, unknown> |
boolean
quit(
opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/Subsidy/index.ts:135
Terminate this Subsidy relationship. The beneficiary Account will be forced to pay for their own transactions
| Parameter | Type |
|---|---|
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<void, void>>
both the beneficiary and the subsidizer are allowed to unilaterally quit the Subsidy
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
setAllowance(
args,opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/Subsidy/index.ts:144
Set allowance for this Subsidy relationship
| Parameter | Type |
|---|---|
args |
Pick<SetAllowanceParams, "allowance"> |
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<void, void>>
Only the subsidizer is allowed to set the allowance
if the allowance to set is equal to the current allowance
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
toHuman():
UniqueIdentifiers
Defined in: api/entities/Subsidy/index.ts:206
Return the Subsidy's static data
staticgenerateUuid<Identifiers>(identifiers):string
Defined in: api/entities/Entity.ts:14
Generate the Entity's UUID from its identifying properties
| Type Parameter |
|---|
Identifiers |
| Parameter | Type | Description |
|---|---|---|
identifiers |
Identifiers |
- |
string
staticunserialize<Identifiers>(serialized):Identifiers
Defined in: api/entities/Entity.ts:23
Unserialize a UUID into its Unique Identifiers
| Type Parameter |
|---|
Identifiers |
| Parameter | Type | Description |
|---|---|---|
serialized |
string |
UUID to unserialize |
Identifiers
Defined in: api/entities/Subsidy/index.ts:23
beneficiary:
string
Defined in: api/entities/Subsidy/index.ts:27
beneficiary address
subsidizer:
string
Defined in: api/entities/Subsidy/index.ts:31
subsidizer address