    import {SystemProgram} from '@solana/web3'

public class | source

# SystemProgram

Factory class for transactions to interact with the System program

## Static Member Summary

Static Public Members
public static get | nonceSpace: number Max space of a Nonce account |
public static get | programId: PublicKey Public key that identifies the System program |

## Static Method Summary

Static Public Methods
public static | assign(from: PublicKey, programId: PublicKey): Transaction Generate a Transaction that assigns an account to a program |
public static | createAccount(from: PublicKey, newAccount: PublicKey, lamports: number, space: number, programId: PublicKey): Transaction Generate a Transaction that creates a new account |
public static | createAccountWithSeed(from: PublicKey, newAccount: PublicKey, base: PublicKey, seed: string, lamports: number, space: number, programId: PublicKey): Transaction Generate a Transaction that creates a new account at an address generated with `from`, a seed, and programId |
public static | createNonceAccount(from: PublicKey, nonceAccount: PublicKey, authorizedPubkey: PublicKey, lamports: number): Transaction Generate a Transaction that creates a new Nonce account |
public static | nonceAdvance(nonceAccount: PublicKey, authorizedPubkey: PublicKey): TransactionInstruction Generate an instruction to advance the nonce in a Nonce account |
public static | nonceAuthorize(nonceAccount: PublicKey, authorizedPubkey: PublicKey, newAuthorized: PublicKey): Transaction Generate a Transaction that authorizes a new PublicKey as the authority on a Nonce account. |
public static | nonceWithdraw(nonceAccount: PublicKey, authorizedPubkey: PublicKey, to: PublicKey, lamports: number): Transaction Generate a Transaction that withdraws lamports from a Nonce account |
public static | transfer(from: PublicKey, to: PublicKey, lamports: number): Transaction Generate a Transaction that transfers lamports from one account to another |

## Static Public Members

### public static get nonceSpace: number source

Max space of a Nonce account

### public static get programId: PublicKey source

Public key that identifies the System program

## Static Public Methods

### public static assign(from: PublicKey, programId: PublicKey): Transaction source

Generate a Transaction that assigns an account to a program

#### Params:

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

#### Return:

Transaction

### public static createAccount(from: PublicKey, newAccount: PublicKey, lamports: number, space: number, programId: PublicKey): Transaction source

Generate a Transaction that creates a new account

#### Params:

Name | Type | Attribute | Description
from | PublicKey |  |
newAccount | PublicKey |  |
lamports | number |  |
space | number |  |
programId | PublicKey |  |

#### Return:

Transaction

### public static createAccountWithSeed(from: PublicKey, newAccount: PublicKey, base: PublicKey, seed: string, lamports: number, space: number, programId: PublicKey): Transaction source

Generate a Transaction that creates a new account at an address generated with `from`, a seed, and programId

#### Params:

Name | Type | Attribute | Description
from | PublicKey |  |
newAccount | PublicKey |  |
base | PublicKey |  |
seed | string |  |
lamports | number |  |
space | number |  |
programId | PublicKey |  |

#### Return:

Transaction

### public static createNonceAccount(from: PublicKey, nonceAccount: PublicKey, authorizedPubkey: PublicKey, lamports: number): Transaction source

Generate a Transaction that creates a new Nonce account

#### Params:

Name | Type | Attribute | Description
from | PublicKey |  |
nonceAccount | PublicKey |  |
authorizedPubkey | PublicKey |  |
lamports | number |  |

#### Return:

Transaction

### public static nonceAdvance(nonceAccount: PublicKey, authorizedPubkey: PublicKey): TransactionInstruction source

Generate an instruction to advance the nonce in a Nonce account

#### Params:

Name | Type | Attribute | Description
nonceAccount | PublicKey |  |
authorizedPubkey | PublicKey |  |

#### Return:

TransactionInstruction

### public static nonceAuthorize(nonceAccount: PublicKey, authorizedPubkey: PublicKey, newAuthorized: PublicKey): Transaction source

Generate a Transaction that authorizes a new PublicKey as the authority on a Nonce account.

#### Params:

Name | Type | Attribute | Description
nonceAccount | PublicKey |  |
authorizedPubkey | PublicKey |  |
newAuthorized | PublicKey |  |

#### Return:

Transaction

### public static nonceWithdraw(nonceAccount: PublicKey, authorizedPubkey: PublicKey, to: PublicKey, lamports: number): Transaction source

Generate a Transaction that withdraws lamports from a Nonce account

#### Params:

Name | Type | Attribute | Description
nonceAccount | PublicKey |  |
authorizedPubkey | PublicKey |  |
to | PublicKey |  |
lamports | number |  |

#### Return:

Transaction

### public static transfer(from: PublicKey, to: PublicKey, lamports: number): Transaction source

Generate a Transaction that transfers lamports from one account to another

#### Params:

Name | Type | Attribute | Description
from | PublicKey |  |
to | PublicKey |  |
lamports | number |  |

#### Return:

Transaction