pub fn create_account(
ctx: Context<'_, '_, '_, '_, CreateAccount<'_>>,
seed: u16
) -> Result<()>
Expand description
Create a new margin account for a user
seed
- An abritrary integer used to derive the new account address. This allows
a user to own multiple margin accounts, by creating new accounts with different
seed values.
| | |
Name | Type | Description |
owner | signer | The owner of the new margin account. |
payer | signer | The pubkey paying rent for the new margin account opening. |
margin_account | writable | The margin account to initialize for the owner. |
system_program | read_only | The system native program. |