    import {BudgetProgram} from '@solana/web3'

public class | source

# BudgetProgram

Factory class for transactions to interact with the Budget program

## Static Member Summary

Static Public Members
public static get | programId: PublicKey Public key that identifies the Budget program |
public static get | space: number The amount of space this program requires |

## Static Method Summary

Static Public Methods
public static | applySignature(from: PublicKey, program: PublicKey, to: PublicKey): Transaction Generates a transaction that applies a signature, which could enable a pending payment to proceed. |
public static | applyTimestamp(from: PublicKey, program: PublicKey, to: PublicKey, when: Date): Transaction Generates a transaction that applies a timestamp, which could enable a pending payment to proceed. |
public static | pay(from: PublicKey, program: PublicKey, to: PublicKey, amount: number, conditions: ...Array<BudgetCondition>): Transaction Generates a transaction that transfers tokens once any of the conditions are met |
public static | payOnBoth(from: PublicKey, program: PublicKey, to: PublicKey, amount: number, condition1: BudgetCondition, condition2: BudgetCondition): Transaction Generates a transaction that transfers tokens once both conditions are met |
public static | signatureCondition(from: PublicKey): SignatureCondition Creates a signature condition |
public static | timestampCondition(from: PublicKey, when: Date): TimestampCondition Creates a timestamp condition |

## Static Public Members

### public static get programId: PublicKey source

Public key that identifies the Budget program

### public static get space: number source

The amount of space this program requires

## Static Public Methods

### public static applySignature(from: PublicKey, program: PublicKey, to: PublicKey): Transaction source

Generates a transaction that applies a signature, which could enable a pending payment to proceed.

#### Params:

Name | Type | Attribute | Description
from | PublicKey |  |
program | PublicKey |  |
to | PublicKey |  |

#### Return:

Transaction

### public static applyTimestamp(from: PublicKey, program: PublicKey, to: PublicKey, when: Date): Transaction source

Generates a transaction that applies a timestamp, which could enable a pending payment to proceed.

#### Params:

Name | Type | Attribute | Description
from | PublicKey |  |
program | PublicKey |  |
to | PublicKey |  |
when | Date |  |

#### Return:

Transaction

### public static pay(from: PublicKey, program: PublicKey, to: PublicKey, amount: number, conditions: ...Array<BudgetCondition>): Transaction source

Generates a transaction that transfers tokens once any of the conditions are met

#### Params:

Name | Type | Attribute | Description
from | PublicKey |  |
program | PublicKey |  |
to | PublicKey |  |
amount | number |  |
conditions | ...Array<BudgetCondition> |  |

#### Return:

Transaction

### public static payOnBoth(from: PublicKey, program: PublicKey, to: PublicKey, amount: number, condition1: BudgetCondition, condition2: BudgetCondition): Transaction source

Generates a transaction that transfers tokens once both conditions are met

#### Params:

Name | Type | Attribute | Description
from | PublicKey |  |
program | PublicKey |  |
to | PublicKey |  |
amount | number |  |
condition1 | BudgetCondition |  |
condition2 | BudgetCondition |  |

#### Return:

Transaction

### public static signatureCondition(from: PublicKey): SignatureCondition source

Creates a signature condition

#### Params:

Name | Type | Attribute | Description
from | PublicKey |  |

#### Return:

SignatureCondition

### public static timestampCondition(from: PublicKey, when: Date): TimestampCondition source

Creates a timestamp condition

#### Params:

Name | Type | Attribute | Description
from | PublicKey |  |
when | Date |  |

#### Return:

TimestampCondition