# Subsidy

Represents a Subsidy relationship on chain

## Hierarchy

* [Entity](/polymesh-sdk-api-reference/docs-beta/classes/entity.md)‹UniqueIdentifiers, HumanReadable›

  ↳ **Subsidy**

## Index

### Properties

* [beneficiary](#beneficiary)
* [context](#protected-context)
* [subsidizer](#subsidizer)
* [uuid](#uuid)

### Methods

* [decreaseAllowance](#decreaseallowance)
* [exists](#exists)
* [getAllowance](#getallowance)
* [increaseAllowance](#increaseallowance)
* [isEqual](#isequal)
* [quit](#quit)
* [setAllowance](#setallowance)
* [toHuman](#tohuman)
* [generateUuid](#static-generateuuid)
* [unserialize](#static-unserialize)

## Properties

### beneficiary

• **beneficiary**: [*Account*](/polymesh-sdk-api-reference/docs-beta/classes/account.md)

*Defined in* [*src/api/entities/Subsidy/index.ts:51*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Subsidy/index.ts#L51)

Account whose transactions are being paid for

***

### `Protected` context

• **context**: *Context*

*Inherited from* [*CheckpointSchedule*](/polymesh-sdk-api-reference/docs-beta/classes/checkpointschedule.md)*.*[*context*](/polymesh-sdk-api-reference/docs-beta/classes/checkpointschedule.md#protected-context)

*Defined in* [*src/api/entities/Entity.ts:48*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Entity.ts#L48)

***

### subsidizer

• **subsidizer**: [*Account*](/polymesh-sdk-api-reference/docs-beta/classes/account.md)

*Defined in* [*src/api/entities/Subsidy/index.ts:55*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Subsidy/index.ts#L55)

Account that is paying for the transactions

***

### uuid

• **uuid**: *string*

*Inherited from* [*CheckpointSchedule*](/polymesh-sdk-api-reference/docs-beta/classes/checkpointschedule.md)*.*[*uuid*](/polymesh-sdk-api-reference/docs-beta/classes/checkpointschedule.md#uuid)

*Defined in* [*src/api/entities/Entity.ts:46*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Entity.ts#L46)

## Methods

### decreaseAllowance

▸ **decreaseAllowance**(`args`: Pick‹[DecreaseAllowanceParams](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/decreaseallowanceparams.md), "allowance"›, `opts?`: [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-beta/classes/transactionqueue.md)*‹void››*

*Defined in* [*src/api/entities/Subsidy/index.ts:176*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Subsidy/index.ts#L176)

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](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/proceduremethod.md), which means you can call [decreaseAllowance.checkAuthorization](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/proceduremethod.md#checkauthorization) on it to see whether the signing Account and Identity have the required roles and permissions to run it

**Parameters:**

| Name    | Type                                                                                                                                                    |
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `args`  | Pick‹[DecreaseAllowanceParams](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/decreaseallowanceparams.md), "allowance"› |
| `opts?` | [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/procedureopts.md)                                        |

**Returns:** *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-beta/classes/transactionqueue.md)*‹void››*

***

### exists

▸ **exists**(): *Promise‹boolean›*

*Overrides* [*Entity*](/polymesh-sdk-api-reference/docs-beta/classes/entity.md)*.*[*exists*](/polymesh-sdk-api-reference/docs-beta/classes/entity.md#abstract-exists)

*Defined in* [*src/api/entities/Subsidy/index.ts:183*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Subsidy/index.ts#L183)

Determine whether this Subsidy relationship exists on chain

**Returns:** *Promise‹boolean›*

***

### getAllowance

▸ **getAllowance**(): *Promise‹BigNumber›*

*Defined in* [*src/api/entities/Subsidy/index.ts:202*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Subsidy/index.ts#L202)

Get amount of POLYX subsidized for this Subsidy relationship

**`throws`** if the Subsidy does not exist

**Returns:** *Promise‹BigNumber›*

***

### increaseAllowance

▸ **increaseAllowance**(`args`: Pick‹[IncreaseAllowanceParams](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/increaseallowanceparams.md), "allowance"›, `opts?`: [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-beta/classes/transactionqueue.md)*‹void››*

*Defined in* [*src/api/entities/Subsidy/index.ts:162*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Subsidy/index.ts#L162)

Increase allowance for this Subsidy relationship

**`note`** Only the subsidizer is allowed to increase the allowance

**`note`** this method is of type [ProcedureMethod](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/proceduremethod.md), which means you can call [increaseAllowance.checkAuthorization](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/proceduremethod.md#checkauthorization) on it to see whether the signing Account and Identity have the required roles and permissions to run it

**Parameters:**

| Name    | Type                                                                                                                                                    |
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `args`  | Pick‹[IncreaseAllowanceParams](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/increaseallowanceparams.md), "allowance"› |
| `opts?` | [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/procedureopts.md)                                        |

**Returns:** *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-beta/classes/transactionqueue.md)*‹void››*

***

### isEqual

▸ **isEqual**(`entity`: [Entity](/polymesh-sdk-api-reference/docs-beta/classes/entity.md)‹unknown, unknown›): *boolean*

*Inherited from* [*CheckpointSchedule*](/polymesh-sdk-api-reference/docs-beta/classes/checkpointschedule.md)*.*[*isEqual*](/polymesh-sdk-api-reference/docs-beta/classes/checkpointschedule.md#isequal)

*Defined in* [*src/api/entities/Entity.ts:61*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Entity.ts#L61)

Determine whether this Entity is the same as another one

**Parameters:**

| Name     | Type                                                                                |
| -------- | ----------------------------------------------------------------------------------- |
| `entity` | [Entity](/polymesh-sdk-api-reference/docs-beta/classes/entity.md)‹unknown, unknown› |

**Returns:** *boolean*

***

### quit

▸ **quit**(`opts?`: [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-beta/classes/transactionqueue.md)*‹void››*

*Defined in* [*src/api/entities/Subsidy/index.ts:136*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Subsidy/index.ts#L136)

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](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/noargsproceduremethod.md), which means you can call [quit.checkAuthorization](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/noargsproceduremethod.md#checkauthorization) on it to see whether the signing Account and Identity have the required roles and permissions to run it

**Parameters:**

| Name    | Type                                                                                                             |
| ------- | ---------------------------------------------------------------------------------------------------------------- |
| `opts?` | [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/procedureopts.md) |

**Returns:** *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-beta/classes/transactionqueue.md)*‹void››*

***

### setAllowance

▸ **setAllowance**(`args`: Pick‹[SetAllowanceParams](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/setallowanceparams.md), "allowance"›, `opts?`: [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-beta/classes/transactionqueue.md)*‹void››*

*Defined in* [*src/api/entities/Subsidy/index.ts:150*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Subsidy/index.ts#L150)

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](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/proceduremethod.md), which means you can call [setAllowance.checkAuthorization](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/proceduremethod.md#checkauthorization) on it to see whether the signing Account and Identity have the required roles and permissions to run it

**Parameters:**

| Name    | Type                                                                                                                                          |
| ------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `args`  | Pick‹[SetAllowanceParams](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/setallowanceparams.md), "allowance"› |
| `opts?` | [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/procedureopts.md)                              |

**Returns:** *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-beta/classes/transactionqueue.md)*‹void››*

***

### toHuman

▸ **toHuman**(): *HumanReadable*

*Overrides* [*Entity*](/polymesh-sdk-api-reference/docs-beta/classes/entity.md)*.*[*toHuman*](/polymesh-sdk-api-reference/docs-beta/classes/entity.md#abstract-tohuman)

*Defined in* [*src/api/entities/Subsidy/index.ts:224*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Subsidy/index.ts#L224)

Return the Subsidy's static data

**Returns:** *HumanReadable*

***

### `Static` generateUuid

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

*Inherited from* [*CheckpointSchedule*](/polymesh-sdk-api-reference/docs-beta/classes/checkpointschedule.md)*.*[*generateUuid*](/polymesh-sdk-api-reference/docs-beta/classes/checkpointschedule.md#static-generateuuid)

*Defined in* [*src/api/entities/Entity.ts:14*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Entity.ts#L14)

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*](/polymesh-sdk-api-reference/docs-beta/classes/checkpointschedule.md)*.*[*unserialize*](/polymesh-sdk-api-reference/docs-beta/classes/checkpointschedule.md#static-unserialize)

*Defined in* [*src/api/entities/Entity.ts:23*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Entity.ts#L23)

Unserialize a UUID into its Unique Identifiers

**Type parameters:**

▪ **Identifiers**

**Parameters:**

| Name         | Type   | Description         |
| ------------ | ------ | ------------------- |
| `serialized` | string | UUID to unserialize |

**Returns:** *Identifiers*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/subsidy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
