GLAMIDL Reference

borrow_operate

Operate a Jupiter Borrow position. Required permissions are derived from signed deltas: positive collateral = deposit, negative collateral = withdraw, positive debt = borrow, negative debt = repay.

Accounts

AccountRoleDescription
glam_statewritable`glam_state` account required by the `borrow_operate` instruction (see program source for the full constraint).
glam_vaultwritable`glam_vault` account required by the `borrow_operate` instruction (see program source for the full constraint).
glam_signersigner, writable`glam_signer` account required by the `borrow_operate` instruction (see program source for the full constraint).
integration_authorityread-only`integration_authority` account required by the `borrow_operate` instruction (see program source for the full constraint).
cpi_programread-only`cpi_program` account required by the `borrow_operate` instruction (see program source for the full constraint).
glam_protocol_programread-only`glam_protocol_program` account required by the `borrow_operate` instruction (see program source for the full constraint).
system_programread-only`system_program` account required by the `borrow_operate` instruction (see program source for the full constraint).
signer_supply_token_accountwritable`signer_supply_token_account` account required by the `borrow_operate` instruction (see program source for the full constraint).
signer_borrow_token_accountwritable`signer_borrow_token_account` account required by the `borrow_operate` instruction (see program source for the full constraint).
recipientoptional`recipient` account required by the `borrow_operate` instruction (see program source for the full constraint).
recipient_borrow_token_accountwritable, optional`recipient_borrow_token_account` account required by the `borrow_operate` instruction (see program source for the full constraint).
recipient_supply_token_accountwritable, optional`recipient_supply_token_account` account required by the `borrow_operate` instruction (see program source for the full constraint).
vault_configread-only`vault_config` account required by the `borrow_operate` instruction (see program source for the full constraint).
vault_statewritable`vault_state` account required by the `borrow_operate` instruction (see program source for the full constraint).
supply_tokenread-only`supply_token` account required by the `borrow_operate` instruction (see program source for the full constraint).
borrow_tokenread-only`borrow_token` account required by the `borrow_operate` instruction (see program source for the full constraint).
oracleread-only`oracle` account required by the `borrow_operate` instruction (see program source for the full constraint).
positionwritable`position` account required by the `borrow_operate` instruction (see program source for the full constraint).
position_token_accountread-only`position_token_account` account required by the `borrow_operate` instruction (see program source for the full constraint).
current_position_tickwritable`current_position_tick` account required by the `borrow_operate` instruction (see program source for the full constraint).
final_position_tickwritable`final_position_tick` account required by the `borrow_operate` instruction (see program source for the full constraint).
current_position_tick_idread-only`current_position_tick_id` account required by the `borrow_operate` instruction (see program source for the full constraint).
final_position_tick_idwritable`final_position_tick_id` account required by the `borrow_operate` instruction (see program source for the full constraint).
new_branchwritable`new_branch` account required by the `borrow_operate` instruction (see program source for the full constraint).
supply_token_reserves_liquiditywritable`supply_token_reserves_liquidity` account required by the `borrow_operate` instruction (see program source for the full constraint).
borrow_token_reserves_liquiditywritable`borrow_token_reserves_liquidity` account required by the `borrow_operate` instruction (see program source for the full constraint).
vault_supply_position_on_liquiditywritable`vault_supply_position_on_liquidity` account required by the `borrow_operate` instruction (see program source for the full constraint).
vault_borrow_position_on_liquiditywritable`vault_borrow_position_on_liquidity` account required by the `borrow_operate` instruction (see program source for the full constraint).
supply_rate_modelread-only`supply_rate_model` account required by the `borrow_operate` instruction (see program source for the full constraint).
borrow_rate_modelread-only`borrow_rate_model` account required by the `borrow_operate` instruction (see program source for the full constraint).
vault_supply_token_accountwritable`vault_supply_token_account` account required by the `borrow_operate` instruction (see program source for the full constraint).
vault_borrow_token_accountwritable`vault_borrow_token_account` account required by the `borrow_operate` instruction (see program source for the full constraint).
supply_token_claim_accountwritable, optional`supply_token_claim_account` account required by the `borrow_operate` instruction (see program source for the full constraint).
borrow_token_claim_accountwritable, optional`borrow_token_claim_account` account required by the `borrow_operate` instruction (see program source for the full constraint).
liquidityread-only`liquidity` account required by the `borrow_operate` instruction (see program source for the full constraint).
liquidity_programread-only`liquidity_program` account required by the `borrow_operate` instruction (see program source for the full constraint).
oracle_programread-only`oracle_program` account required by the `borrow_operate` instruction (see program source for the full constraint).
supply_token_programread-only`supply_token_program` account required by the `borrow_operate` instruction (see program source for the full constraint).
borrow_token_programread-only`borrow_token_program` account required by the `borrow_operate` instruction (see program source for the full constraint).
associated_token_programread-only`associated_token_program` account required by the `borrow_operate` instruction (see program source for the full constraint).

Arguments

ArgumentTypeNotes
new_coli128
new_debti128
transfer_typeoption<TransferType>
remaining_accounts_indicesbytes