Options
All
  • Public
  • Public/Protected
  • All
Menu

@metaplex-foundation/mpl-token-vault

Index

ActivateVault

AddSharesToTreasury

AddTokenToInactiveVault

CombineVault

CreateExternalPriceAccount

InitVault

MintFractionalShares

RedeemShares

SetAuthority

UpdateExternalPriceAccount

WithdrawSharesFromTreasury

WithdrawTokenFromSafetyDepositBox

Accounts

Instructions

Errors

constants

enums

userTypes

sdk

generated

ActivateVault

ActivateVaultAccounts: Optional<ActivateVaultInstructionAccounts, "fractionMintAuthority">

Same as ActivateVaultInstructionAccounts except doesn't require fractionalMintAuthority as that will be derived before passing them to createActivateVaultInstruction.

property

[writable] vault Initialized inactivated fractionalized token vault

property

[writable] fractionMint Fraction mint

property

[writable] fractionTreasury Fraction treasury

property

[] fractionalMintAuthority Fraction mint authority for the program seed of [PREFIX, program_id] (optional)

property

[signer] vaultAuthority Authority on the vault

ActivateVaultInstructionAccounts: { fractionMint: web3.PublicKey; fractionMintAuthority: web3.PublicKey; fractionTreasury: web3.PublicKey; vault: web3.PublicKey; vaultAuthority: web3.PublicKey }

Accounts required by the ActivateVault instruction

property

[writable] vault Initialized inactivated fractionalized token vault

property

[writable] fractionMint Fraction mint

property

[writable] fractionTreasury Fraction treasury

property

[] fractionMintAuthority Fraction mint authority for the program - seed of [PREFIX, program_id]

property

[signer] vaultAuthority Authority on the vault

Type declaration

  • fractionMint: web3.PublicKey
  • fractionMintAuthority: web3.PublicKey
  • fractionTreasury: web3.PublicKey
  • vault: web3.PublicKey
  • vaultAuthority: web3.PublicKey
ActivateVaultInstructionArgs: { numberOfShareArgs: NumberOfShareArgs }

Type declaration

  • activateVault(vault: PublicKey, accounts: ActivateVaultAccounts, numberOfShares: bignum): Promise<TransactionInstruction>

AddSharesToTreasury

AddSharesToTreasuryInstructionAccounts: { fractionTreasury: web3.PublicKey; source: web3.PublicKey; transferAuthority: web3.PublicKey; vault: web3.PublicKey; vaultAuthority: web3.PublicKey }

Accounts required by the AddSharesToTreasury instruction

property

[writable] source Initialized account from which shares will be withdrawn

property

[writable] fractionTreasury Fraction treasury

property

[] vault The initialized active token vault

property

[signer] transferAuthority Transfer authority to move tokens from your account to treasury

property

[signer] vaultAuthority Authority of vault

Type declaration

  • fractionTreasury: web3.PublicKey
  • source: web3.PublicKey
  • transferAuthority: web3.PublicKey
  • vault: web3.PublicKey
  • vaultAuthority: web3.PublicKey
AddSharesToTreasuryInstructionArgs: { numberOfShareArgs: NumberOfShareArgs }

Type declaration

AddTokenToInactiveVault

AddTokenToInactiveVaultInstructionAccounts: { payer: web3.PublicKey; safetyDepositAccount: web3.PublicKey; store: web3.PublicKey; systemAccount: web3.PublicKey; tokenAccount: web3.PublicKey; transferAuthority: web3.PublicKey; vault: web3.PublicKey; vaultAuthority: web3.PublicKey }

Accounts required by the AddTokenToInactiveVault instruction

property

[writable] safetyDepositAccount Uninitialized safety deposit box account address (will be created and allocated by this endpoint) Address should be pda with seed of [PREFIX, vault_address, token_mint_address]

property

[writable] tokenAccount Initialized Token account

property

[writable] store Initialized Token store account with authority of this program, this will get set on the safety deposit box

property

[writable] vault Initialized inactive fractionalized token vault

property

[signer] vaultAuthority Authority on the vault

property

[signer] payer Payer

property

[signer] transferAuthority Transfer Authority to move desired token amount from token account to safety deposit

property

[] systemAccount System account sysvar

Type declaration

  • payer: web3.PublicKey
  • safetyDepositAccount: web3.PublicKey
  • store: web3.PublicKey
  • systemAccount: web3.PublicKey
  • tokenAccount: web3.PublicKey
  • transferAuthority: web3.PublicKey
  • vault: web3.PublicKey
  • vaultAuthority: web3.PublicKey
AddTokenToInactiveVaultInstructionArgs: { amountArgs: AmountArgs }

Type declaration

  • addTokenToInactiveVault(safetyDepositSetup: SafetyDepositSetup, ixAccounts: { payer: PublicKey; vaultAuthority: PublicKey }): Promise<TransactionInstruction>

CombineVault

CombineVaultInstructionAccounts: { externalPricing: web3.PublicKey; fractionBurnAuthority: web3.PublicKey; fractionMint: web3.PublicKey; fractionTreasury: web3.PublicKey; newVaultAuthority: web3.PublicKey; redeemTreasury: web3.PublicKey; transferAuthority: web3.PublicKey; vault: web3.PublicKey; vaultAuthority: web3.PublicKey; yourOutstandingShares: web3.PublicKey; yourPayment: web3.PublicKey }

Accounts required by the CombineVault instruction

property

[writable] vault Initialized activated token vault

property

[writable] yourOutstandingShares Token account containing your portion of the outstanding fraction shares

property

[writable] yourPayment Token account of the redeem_treasury mint type that you will pay with

property

[writable] fractionMint Fraction mint

property

[writable] fractionTreasury Fraction treasury account

property

[writable] redeemTreasury Redeem treasury account

property

[] newVaultAuthority New authority on the vault going forward - can be same authority if you want

property

[signer] vaultAuthority Authority on the vault

property

[signer] transferAuthority Transfer authority for the token account and outstanding fractional shares account you're transferring from

property

[] fractionBurnAuthority PDA-based Burn authority for the fraction treasury account containing the uncirculated shares seed [PREFIX, program_id]

property

[] externalPricing External pricing lookup address

Type declaration

  • externalPricing: web3.PublicKey
  • fractionBurnAuthority: web3.PublicKey
  • fractionMint: web3.PublicKey
  • fractionTreasury: web3.PublicKey
  • newVaultAuthority: web3.PublicKey
  • redeemTreasury: web3.PublicKey
  • transferAuthority: web3.PublicKey
  • vault: web3.PublicKey
  • vaultAuthority: web3.PublicKey
  • yourOutstandingShares: web3.PublicKey
  • yourPayment: web3.PublicKey

CreateExternalPriceAccount

  • createExternalPriceAccount(connection: Connection, payer: PublicKey): Promise<InstructionsWithAccounts<{ externalPriceAccount: PublicKey }>>

InitVault

CompletedVaultSetup: VaultSetup & HasFractionMint & HasFractionTreasury & HasRedeemTreasury

A VaultSetup that has been completed, meaning all necessary accounts were either provided or have been created and initialized.

InitVaultInstructionAccounts: { authority: web3.PublicKey; fractionMint: web3.PublicKey; fractionTreasury: web3.PublicKey; pricingLookupAddress: web3.PublicKey; redeemTreasury: web3.PublicKey; vault: web3.PublicKey }

Accounts required by the InitVault instruction

property

[writable] fractionMint Initialized fractional share mint with 0 tokens in supply, authority on mint must be pda of program with seed [prefix, programid]

property

[writable] redeemTreasury Initialized redeem treasury token account with 0 tokens in supply, owner of account must be pda of program like above

property

[writable] fractionTreasury Initialized fraction treasury token account with 0 tokens in supply, owner of account must be pda of program like above

property

[writable] vault Uninitialized vault account

property

[] authority Authority on the vault

property

[] pricingLookupAddress Pricing Lookup Address

Type declaration

  • authority: web3.PublicKey
  • fractionMint: web3.PublicKey
  • fractionTreasury: web3.PublicKey
  • pricingLookupAddress: web3.PublicKey
  • redeemTreasury: web3.PublicKey
  • vault: web3.PublicKey
InitVaultInstructionArgs: { initVaultArgs: InitVaultArgs }

Type declaration

  • initVault(vaultSetup: VaultSetup, allowFurtherShareCreation: boolean): TransactionInstruction

MintFractionalShares

MintFractionalSharesInstructionAccounts: { fractionMint: web3.PublicKey; fractionTreasury: web3.PublicKey; mintAuthority: web3.PublicKey; vault: web3.PublicKey; vaultAuthority: web3.PublicKey }

Accounts required by the MintFractionalShares instruction

property

[writable] fractionTreasury Fraction treasury

property

[writable] fractionMint Fraction mint

property

[] vault The initialized active token vault

property

[] mintAuthority PDA-based Mint authority to mint tokens to treasury[PREFIX, program_id]

property

[signer] vaultAuthority Authority of vault

Type declaration

  • fractionMint: web3.PublicKey
  • fractionTreasury: web3.PublicKey
  • mintAuthority: web3.PublicKey
  • vault: web3.PublicKey
  • vaultAuthority: web3.PublicKey
MintFractionalSharesInstructionArgs: { numberOfShareArgs: NumberOfShareArgs }

Type declaration

RedeemShares

RedeemSharesInstructionAccounts: { burnAuthority: web3.PublicKey; destination: web3.PublicKey; fractionMint: web3.PublicKey; outstandingShares: web3.PublicKey; redeemTreasury: web3.PublicKey; transferAuthority: web3.PublicKey; vault: web3.PublicKey }

Accounts required by the RedeemShares instruction

property

[writable] outstandingShares Initialized Token account containing your fractional shares

property

[writable] destination Initialized Destination token account where you wish your proceeds to arrive

property

[writable] fractionMint Fraction mint

property

[writable] redeemTreasury Redeem treasury account

property

[] transferAuthority PDA-based Transfer authority for the transfer of proceeds from redeem treasury to destination seed [PREFIX, program_id]

property

[signer] burnAuthority Burn authority for the burning of your shares

property

[] vault Combined token vault

Type declaration

  • burnAuthority: web3.PublicKey
  • destination: web3.PublicKey
  • fractionMint: web3.PublicKey
  • outstandingShares: web3.PublicKey
  • redeemTreasury: web3.PublicKey
  • transferAuthority: web3.PublicKey
  • vault: web3.PublicKey

SetAuthority

SetAuthorityInstructionAccounts: { currentAuthority: web3.PublicKey; newAuthority: web3.PublicKey; vault: web3.PublicKey }

Accounts required by the SetAuthority instruction

property

[writable] vault Vault

property

[signer] currentAuthority Vault authority

property

[] newAuthority New authority

Type declaration

  • currentAuthority: web3.PublicKey
  • newAuthority: web3.PublicKey
  • vault: web3.PublicKey

UpdateExternalPriceAccount

UpdateExternalPriceAccountInstructionAccounts: { externalPriceAccount: web3.PublicKey }

Accounts required by the UpdateExternalPriceAccount instruction

property

[writable] externalPriceAccount External price account

Type declaration

  • externalPriceAccount: web3.PublicKey
UpdateExternalPriceAccountInstructionArgs: { externalPriceAccount: ExternalPriceAccount }

Type declaration

WithdrawSharesFromTreasury

WithdrawSharesFromTreasuryInstructionAccounts: { destination: web3.PublicKey; fractionTreasury: web3.PublicKey; transferAuthority: web3.PublicKey; vault: web3.PublicKey; vaultAuthority: web3.PublicKey }

Accounts required by the WithdrawSharesFromTreasury instruction

property

[writable] destination Initialized Destination account for the shares being withdrawn

property

[writable] fractionTreasury Fraction treasury

property

[] vault The initialized active token vault

property

[] transferAuthority PDA-based Transfer authority to move tokens from treasury to your destination[PREFIX, program_id]

property

[signer] vaultAuthority Authority of vault

Type declaration

  • destination: web3.PublicKey
  • fractionTreasury: web3.PublicKey
  • transferAuthority: web3.PublicKey
  • vault: web3.PublicKey
  • vaultAuthority: web3.PublicKey
WithdrawSharesFromTreasuryInstructionArgs: { numberOfShareArgs: NumberOfShareArgs }

Type declaration

WithdrawTokenFromSafetyDepositBox

WithdrawTokenFromSafetyDepositBoxInstructionAccounts: { destination: web3.PublicKey; fractionMint: web3.PublicKey; safetyDeposit: web3.PublicKey; store: web3.PublicKey; transferAuthority: web3.PublicKey; vault: web3.PublicKey; vaultAuthority: web3.PublicKey }

Accounts required by the WithdrawTokenFromSafetyDepositBox instruction

property

[writable] destination Initialized Destination account for the tokens being withdrawn

property

[writable] safetyDeposit The safety deposit box account key for the tokens

property

[writable] store The store key on the safety deposit box account

property

[writable] vault The initialized combined token vault

property

[] fractionMint Fraction mint

property

[signer] vaultAuthority Authority of vault

property

[] transferAuthority PDA-based Transfer authority to move the tokens from the store to the destination seed [PREFIX, program_id]

Type declaration

  • destination: web3.PublicKey
  • fractionMint: web3.PublicKey
  • safetyDeposit: web3.PublicKey
  • store: web3.PublicKey
  • transferAuthority: web3.PublicKey
  • vault: web3.PublicKey
  • vaultAuthority: web3.PublicKey
WithdrawTokenFromSafetyDepositBoxInstructionArgs: { amountArgs: AmountArgs }

Type declaration

Accounts

ActivateVaultAccounts: Optional<ActivateVaultInstructionAccounts, "fractionMintAuthority">

Same as ActivateVaultInstructionAccounts except doesn't require fractionalMintAuthority as that will be derived before passing them to createActivateVaultInstruction.

property

[writable] vault Initialized inactivated fractionalized token vault

property

[writable] fractionMint Fraction mint

property

[writable] fractionTreasury Fraction treasury

property

[] fractionalMintAuthority Fraction mint authority for the program seed of [PREFIX, program_id] (optional)

property

[signer] vaultAuthority Authority on the vault

ExternalPriceAccountArgs: { allowedToCombine: boolean; key: Key; priceMint: web3.PublicKey; pricePerShare: beet.bignum }

Arguments used to create ExternalPriceAccount

Type declaration

  • allowedToCombine: boolean
  • key: Key
  • priceMint: web3.PublicKey
  • pricePerShare: beet.bignum
SafetyDepositBoxArgs: { key: Key; order: number; store: web3.PublicKey; tokenMint: web3.PublicKey; vault: web3.PublicKey }

Arguments used to create SafetyDepositBox

Type declaration

  • key: Key
  • order: number
  • store: web3.PublicKey
  • tokenMint: web3.PublicKey
  • vault: web3.PublicKey
VaultArgs: { allowFurtherShareCreation: boolean; authority: web3.PublicKey; extraByte: number; fractionMint: web3.PublicKey; fractionTreasury: web3.PublicKey; key: Key; lockedPricePerShare: beet.bignum; pricingLookupAddress: web3.PublicKey; redeemTreasury: web3.PublicKey; state: VaultState; tokenProgram: web3.PublicKey; tokenTypeCount: number }

Arguments used to create Vault

Type declaration

  • allowFurtherShareCreation: boolean
  • authority: web3.PublicKey
  • extraByte: number
  • fractionMint: web3.PublicKey
  • fractionTreasury: web3.PublicKey
  • key: Key
  • lockedPricePerShare: beet.bignum
  • pricingLookupAddress: web3.PublicKey
  • redeemTreasury: web3.PublicKey
  • state: VaultState
  • tokenProgram: web3.PublicKey
  • tokenTypeCount: number
externalPriceAccountBeet: BeetStruct<ExternalPriceAccount, ExternalPriceAccountArgs> = ...
safetyDepositBoxBeet: BeetStruct<SafetyDepositBox, SafetyDepositBoxArgs> = ...
vaultBeet: BeetStruct<Vault, VaultArgs> = ...

Instructions

ActivateVaultInstructionAccounts: { fractionMint: web3.PublicKey; fractionMintAuthority: web3.PublicKey; fractionTreasury: web3.PublicKey; vault: web3.PublicKey; vaultAuthority: web3.PublicKey }

Accounts required by the ActivateVault instruction

property

[writable] vault Initialized inactivated fractionalized token vault

property

[writable] fractionMint Fraction mint

property

[writable] fractionTreasury Fraction treasury

property

[] fractionMintAuthority Fraction mint authority for the program - seed of [PREFIX, program_id]

property

[signer] vaultAuthority Authority on the vault

Type declaration

  • fractionMint: web3.PublicKey
  • fractionMintAuthority: web3.PublicKey
  • fractionTreasury: web3.PublicKey
  • vault: web3.PublicKey
  • vaultAuthority: web3.PublicKey
ActivateVaultInstructionArgs: { numberOfShareArgs: NumberOfShareArgs }

Type declaration

AddSharesToTreasuryInstructionAccounts: { fractionTreasury: web3.PublicKey; source: web3.PublicKey; transferAuthority: web3.PublicKey; vault: web3.PublicKey; vaultAuthority: web3.PublicKey }

Accounts required by the AddSharesToTreasury instruction

property

[writable] source Initialized account from which shares will be withdrawn

property

[writable] fractionTreasury Fraction treasury

property

[] vault The initialized active token vault

property

[signer] transferAuthority Transfer authority to move tokens from your account to treasury

property

[signer] vaultAuthority Authority of vault

Type declaration

  • fractionTreasury: web3.PublicKey
  • source: web3.PublicKey
  • transferAuthority: web3.PublicKey
  • vault: web3.PublicKey
  • vaultAuthority: web3.PublicKey
AddSharesToTreasuryInstructionArgs: { numberOfShareArgs: NumberOfShareArgs }

Type declaration

AddTokenToInactiveVaultInstructionAccounts: { payer: web3.PublicKey; safetyDepositAccount: web3.PublicKey; store: web3.PublicKey; systemAccount: web3.PublicKey; tokenAccount: web3.PublicKey; transferAuthority: web3.PublicKey; vault: web3.PublicKey; vaultAuthority: web3.PublicKey }

Accounts required by the AddTokenToInactiveVault instruction

property

[writable] safetyDepositAccount Uninitialized safety deposit box account address (will be created and allocated by this endpoint) Address should be pda with seed of [PREFIX, vault_address, token_mint_address]

property

[writable] tokenAccount Initialized Token account

property

[writable] store Initialized Token store account with authority of this program, this will get set on the safety deposit box

property

[writable] vault Initialized inactive fractionalized token vault

property

[signer] vaultAuthority Authority on the vault

property

[signer] payer Payer

property

[signer] transferAuthority Transfer Authority to move desired token amount from token account to safety deposit

property

[] systemAccount System account sysvar

Type declaration

  • payer: web3.PublicKey
  • safetyDepositAccount: web3.PublicKey
  • store: web3.PublicKey
  • systemAccount: web3.PublicKey
  • tokenAccount: web3.PublicKey
  • transferAuthority: web3.PublicKey
  • vault: web3.PublicKey
  • vaultAuthority: web3.PublicKey
AddTokenToInactiveVaultInstructionArgs: { amountArgs: AmountArgs }

Type declaration

CombineVaultInstructionAccounts: { externalPricing: web3.PublicKey; fractionBurnAuthority: web3.PublicKey; fractionMint: web3.PublicKey; fractionTreasury: web3.PublicKey; newVaultAuthority: web3.PublicKey; redeemTreasury: web3.PublicKey; transferAuthority: web3.PublicKey; vault: web3.PublicKey; vaultAuthority: web3.PublicKey; yourOutstandingShares: web3.PublicKey; yourPayment: web3.PublicKey }

Accounts required by the CombineVault instruction

property

[writable] vault Initialized activated token vault

property

[writable] yourOutstandingShares Token account containing your portion of the outstanding fraction shares

property

[writable] yourPayment Token account of the redeem_treasury mint type that you will pay with

property

[writable] fractionMint Fraction mint

property

[writable] fractionTreasury Fraction treasury account

property

[writable] redeemTreasury Redeem treasury account

property

[] newVaultAuthority New authority on the vault going forward - can be same authority if you want

property

[signer] vaultAuthority Authority on the vault

property

[signer] transferAuthority Transfer authority for the token account and outstanding fractional shares account you're transferring from

property

[] fractionBurnAuthority PDA-based Burn authority for the fraction treasury account containing the uncirculated shares seed [PREFIX, program_id]

property

[] externalPricing External pricing lookup address

Type declaration

  • externalPricing: web3.PublicKey
  • fractionBurnAuthority: web3.PublicKey
  • fractionMint: web3.PublicKey
  • fractionTreasury: web3.PublicKey
  • newVaultAuthority: web3.PublicKey
  • redeemTreasury: web3.PublicKey
  • transferAuthority: web3.PublicKey
  • vault: web3.PublicKey
  • vaultAuthority: web3.PublicKey
  • yourOutstandingShares: web3.PublicKey
  • yourPayment: web3.PublicKey
CompletedVaultSetup: VaultSetup & HasFractionMint & HasFractionTreasury & HasRedeemTreasury

A VaultSetup that has been completed, meaning all necessary accounts were either provided or have been created and initialized.

InitVaultInstructionAccounts: { authority: web3.PublicKey; fractionMint: web3.PublicKey; fractionTreasury: web3.PublicKey; pricingLookupAddress: web3.PublicKey; redeemTreasury: web3.PublicKey; vault: web3.PublicKey }

Accounts required by the InitVault instruction

property

[writable] fractionMint Initialized fractional share mint with 0 tokens in supply, authority on mint must be pda of program with seed [prefix, programid]

property

[writable] redeemTreasury Initialized redeem treasury token account with 0 tokens in supply, owner of account must be pda of program like above

property

[writable] fractionTreasury Initialized fraction treasury token account with 0 tokens in supply, owner of account must be pda of program like above

property

[writable] vault Uninitialized vault account

property

[] authority Authority on the vault

property

[] pricingLookupAddress Pricing Lookup Address

Type declaration

  • authority: web3.PublicKey
  • fractionMint: web3.PublicKey
  • fractionTreasury: web3.PublicKey
  • pricingLookupAddress: web3.PublicKey
  • redeemTreasury: web3.PublicKey
  • vault: web3.PublicKey
InitVaultInstructionArgs: { initVaultArgs: InitVaultArgs }

Type declaration

MintFractionalSharesInstructionAccounts: { fractionMint: web3.PublicKey; fractionTreasury: web3.PublicKey; mintAuthority: web3.PublicKey; vault: web3.PublicKey; vaultAuthority: web3.PublicKey }

Accounts required by the MintFractionalShares instruction

property

[writable] fractionTreasury Fraction treasury

property

[writable] fractionMint Fraction mint

property

[] vault The initialized active token vault

property

[] mintAuthority PDA-based Mint authority to mint tokens to treasury[PREFIX, program_id]

property

[signer] vaultAuthority Authority of vault

Type declaration

  • fractionMint: web3.PublicKey
  • fractionTreasury: web3.PublicKey
  • mintAuthority: web3.PublicKey
  • vault: web3.PublicKey
  • vaultAuthority: web3.PublicKey
MintFractionalSharesInstructionArgs: { numberOfShareArgs: NumberOfShareArgs }

Type declaration

RedeemSharesInstructionAccounts: { burnAuthority: web3.PublicKey; destination: web3.PublicKey; fractionMint: web3.PublicKey; outstandingShares: web3.PublicKey; redeemTreasury: web3.PublicKey; transferAuthority: web3.PublicKey; vault: web3.PublicKey }

Accounts required by the RedeemShares instruction

property

[writable] outstandingShares Initialized Token account containing your fractional shares

property

[writable] destination Initialized Destination token account where you wish your proceeds to arrive

property

[writable] fractionMint Fraction mint

property

[writable] redeemTreasury Redeem treasury account

property

[] transferAuthority PDA-based Transfer authority for the transfer of proceeds from redeem treasury to destination seed [PREFIX, program_id]

property

[signer] burnAuthority Burn authority for the burning of your shares

property

[] vault Combined token vault

Type declaration

  • burnAuthority: web3.PublicKey
  • destination: web3.PublicKey
  • fractionMint: web3.PublicKey
  • outstandingShares: web3.PublicKey
  • redeemTreasury: web3.PublicKey
  • transferAuthority: web3.PublicKey
  • vault: web3.PublicKey
SetAuthorityInstructionAccounts: { currentAuthority: web3.PublicKey; newAuthority: web3.PublicKey; vault: web3.PublicKey }

Accounts required by the SetAuthority instruction

property

[writable] vault Vault

property

[signer] currentAuthority Vault authority

property

[] newAuthority New authority

Type declaration

  • currentAuthority: web3.PublicKey
  • newAuthority: web3.PublicKey
  • vault: web3.PublicKey
UpdateExternalPriceAccountInstructionAccounts: { externalPriceAccount: web3.PublicKey }

Accounts required by the UpdateExternalPriceAccount instruction

property

[writable] externalPriceAccount External price account

Type declaration

  • externalPriceAccount: web3.PublicKey
UpdateExternalPriceAccountInstructionArgs: { externalPriceAccount: ExternalPriceAccount }

Type declaration

WithdrawSharesFromTreasuryInstructionAccounts: { destination: web3.PublicKey; fractionTreasury: web3.PublicKey; transferAuthority: web3.PublicKey; vault: web3.PublicKey; vaultAuthority: web3.PublicKey }

Accounts required by the WithdrawSharesFromTreasury instruction

property

[writable] destination Initialized Destination account for the shares being withdrawn

property

[writable] fractionTreasury Fraction treasury

property

[] vault The initialized active token vault

property

[] transferAuthority PDA-based Transfer authority to move tokens from treasury to your destination[PREFIX, program_id]

property

[signer] vaultAuthority Authority of vault

Type declaration

  • destination: web3.PublicKey
  • fractionTreasury: web3.PublicKey
  • transferAuthority: web3.PublicKey
  • vault: web3.PublicKey
  • vaultAuthority: web3.PublicKey
WithdrawSharesFromTreasuryInstructionArgs: { numberOfShareArgs: NumberOfShareArgs }

Type declaration

WithdrawTokenFromSafetyDepositBoxInstructionAccounts: { destination: web3.PublicKey; fractionMint: web3.PublicKey; safetyDeposit: web3.PublicKey; store: web3.PublicKey; transferAuthority: web3.PublicKey; vault: web3.PublicKey; vaultAuthority: web3.PublicKey }

Accounts required by the WithdrawTokenFromSafetyDepositBox instruction

property

[writable] destination Initialized Destination account for the tokens being withdrawn

property

[writable] safetyDeposit The safety deposit box account key for the tokens

property

[writable] store The store key on the safety deposit box account

property

[writable] vault The initialized combined token vault

property

[] fractionMint Fraction mint

property

[signer] vaultAuthority Authority of vault

property

[] transferAuthority PDA-based Transfer authority to move the tokens from the store to the destination seed [PREFIX, program_id]

Type declaration

  • destination: web3.PublicKey
  • fractionMint: web3.PublicKey
  • safetyDeposit: web3.PublicKey
  • store: web3.PublicKey
  • transferAuthority: web3.PublicKey
  • vault: web3.PublicKey
  • vaultAuthority: web3.PublicKey
WithdrawTokenFromSafetyDepositBoxInstructionArgs: { amountArgs: AmountArgs }

Type declaration

  • activateVault(vault: PublicKey, accounts: ActivateVaultAccounts, numberOfShares: bignum): Promise<TransactionInstruction>
  • createExternalPriceAccount(connection: Connection, payer: PublicKey): Promise<InstructionsWithAccounts<{ externalPriceAccount: PublicKey }>>
  • initVault(vaultSetup: VaultSetup, allowFurtherShareCreation: boolean): TransactionInstruction

Errors

  • errorFromCode(code: number): MaybeErrorWithCode
  • errorFromName(name: string): MaybeErrorWithCode

constants

PROGRAM_ADDRESS: "vau1zxA2LbssAUEF7Gpw91zMM1LvXrvpzJtmZ58rPsn" = 'vau1zxA2LbssAUEF7Gpw91zMM1LvXrvpzJtmZ58rPsn'

Program address

PROGRAM_ID: PublicKey = ...

Program publick key

userTypes

amountArgsBeet: BeetArgsStruct<AmountArgs> = ...
initVaultArgsBeet: BeetArgsStruct<InitVaultArgs> = ...
keyBeet: FixedSizeBeet<Key, Key> = ...
mintEditionProxyArgsBeet: BeetArgsStruct<MintEditionProxyArgs> = ...
numberOfShareArgsBeet: BeetArgsStruct<NumberOfShareArgs> = ...
vaultStateBeet: FixedSizeBeet<VaultState, VaultState> = ...

sdk

AmountArgs: { amount: beet.bignum }

Type declaration

  • amount: beet.bignum
CombineVaultAccounts: Omit<CombineVaultInstructionAccounts, "fractionBurnAuthority">
CompletedCombineVaultSetup: CombineVaultSetup & HasOutstandingShares & HasPayment & HasTransferAuthority
InitVaultArgs: { allowFurtherShareCreation: boolean }

Type declaration

  • allowFurtherShareCreation: boolean
MintEditionProxyArgs: { edition: beet.bignum }

Type declaration

  • edition: beet.bignum
NumberOfShareArgs: { numberOfShares: beet.bignum }

Type declaration

  • numberOfShares: beet.bignum
WithdrawSharesFromTreasuryAccounts: Omit<WithdrawSharesFromTreasuryInstructionAccounts, "transferAuthority">
WithdrawTokenFromSafetyDepositBoxAccounts: Omit<WithdrawTokenFromSafetyDepositBoxInstructionAccounts, "transferAuthority">
QUOTE_MINT: PublicKey = WRAPPED_SOL_MINT
VAULT_PREFIX: "vault" = 'vault'
VAULT_PROGRAM_ADDRESS: "vau1zxA2LbssAUEF7Gpw91zMM1LvXrvpzJtmZ58rPsn" = PROGRAM_ADDRESS
VAULT_PROGRAM_ID: PublicKey = PROGRAM_ID
cusper: ErrorResolver = ...
  • setupWithdrawFromSafetyDestinationAccount(connection: Connection, args: { mint: PublicKey; payer: PublicKey }): Promise<InstructionsWithAccounts<{ destination: PublicKey; destinationPair: Keypair }>>
  • Sets up a token account and required instructions that can be used as the {@link WithdrawSharesFromTreasuryInstructionAccounts.destination}.

    Parameters

    • connection: Connection
    • args: { mint: PublicKey; payer: PublicKey }
      • mint: PublicKey
      • payer: PublicKey

    Returns Promise<InstructionsWithAccounts<{ destination: PublicKey; destinationPair: Keypair }>>

  • setupWithdrawSharesDestinationAccount(connection: Connection, args: { fractionMint: PublicKey; payer: PublicKey }): Promise<InstructionsWithAccounts<{ destination: PublicKey; destinationPair: Keypair }>>
  • Sets up a token account and required instructions that can be used as the {@link WithdrawSharesFromTreasuryInstructionAccounts.destination}.

    Parameters

    • connection: Connection
    • args: { fractionMint: PublicKey; payer: PublicKey }
      • fractionMint: PublicKey
      • payer: PublicKey

    Returns Promise<InstructionsWithAccounts<{ destination: PublicKey; destinationPair: Keypair }>>

generated

ActivateVaultInstructionAccounts: { fractionMint: web3.PublicKey; fractionMintAuthority: web3.PublicKey; fractionTreasury: web3.PublicKey; vault: web3.PublicKey; vaultAuthority: web3.PublicKey }

Accounts required by the ActivateVault instruction

property

[writable] vault Initialized inactivated fractionalized token vault

property

[writable] fractionMint Fraction mint

property

[writable] fractionTreasury Fraction treasury

property

[] fractionMintAuthority Fraction mint authority for the program - seed of [PREFIX, program_id]

property

[signer] vaultAuthority Authority on the vault

Type declaration

  • fractionMint: web3.PublicKey
  • fractionMintAuthority: web3.PublicKey
  • fractionTreasury: web3.PublicKey
  • vault: web3.PublicKey
  • vaultAuthority: web3.PublicKey
ActivateVaultInstructionArgs: { numberOfShareArgs: NumberOfShareArgs }

Type declaration

AddSharesToTreasuryInstructionAccounts: { fractionTreasury: web3.PublicKey; source: web3.PublicKey; transferAuthority: web3.PublicKey; vault: web3.PublicKey; vaultAuthority: web3.PublicKey }

Accounts required by the AddSharesToTreasury instruction

property

[writable] source Initialized account from which shares will be withdrawn

property

[writable] fractionTreasury Fraction treasury

property

[] vault The initialized active token vault

property

[signer] transferAuthority Transfer authority to move tokens from your account to treasury

property

[signer] vaultAuthority Authority of vault

Type declaration

  • fractionTreasury: web3.PublicKey
  • source: web3.PublicKey
  • transferAuthority: web3.PublicKey
  • vault: web3.PublicKey
  • vaultAuthority: web3.PublicKey
AddSharesToTreasuryInstructionArgs: { numberOfShareArgs: NumberOfShareArgs }

Type declaration

AddTokenToInactiveVaultInstructionAccounts: { payer: web3.PublicKey; safetyDepositAccount: web3.PublicKey; store: web3.PublicKey; systemAccount: web3.PublicKey; tokenAccount: web3.PublicKey; transferAuthority: web3.PublicKey; vault: web3.PublicKey; vaultAuthority: web3.PublicKey }

Accounts required by the AddTokenToInactiveVault instruction

property

[writable] safetyDepositAccount Uninitialized safety deposit box account address (will be created and allocated by this endpoint) Address should be pda with seed of [PREFIX, vault_address, token_mint_address]

property

[writable] tokenAccount Initialized Token account

property

[writable] store Initialized Token store account with authority of this program, this will get set on the safety deposit box

property

[writable] vault Initialized inactive fractionalized token vault

property

[signer] vaultAuthority Authority on the vault

property

[signer] payer Payer

property

[signer] transferAuthority Transfer Authority to move desired token amount from token account to safety deposit

property

[] systemAccount System account sysvar

Type declaration

  • payer: web3.PublicKey
  • safetyDepositAccount: web3.PublicKey
  • store: web3.PublicKey
  • systemAccount: web3.PublicKey
  • tokenAccount: web3.PublicKey
  • transferAuthority: web3.PublicKey
  • vault: web3.PublicKey
  • vaultAuthority: web3.PublicKey
AddTokenToInactiveVaultInstructionArgs: { amountArgs: AmountArgs }

Type declaration

CombineVaultInstructionAccounts: { externalPricing: web3.PublicKey; fractionBurnAuthority: web3.PublicKey; fractionMint: web3.PublicKey; fractionTreasury: web3.PublicKey; newVaultAuthority: web3.PublicKey; redeemTreasury: web3.PublicKey; transferAuthority: web3.PublicKey; vault: web3.PublicKey; vaultAuthority: web3.PublicKey; yourOutstandingShares: web3.PublicKey; yourPayment: web3.PublicKey }

Accounts required by the CombineVault instruction

property

[writable] vault Initialized activated token vault

property

[writable] yourOutstandingShares Token account containing your portion of the outstanding fraction shares

property

[writable] yourPayment Token account of the redeem_treasury mint type that you will pay with

property

[writable] fractionMint Fraction mint

property

[writable] fractionTreasury Fraction treasury account

property

[writable] redeemTreasury Redeem treasury account

property

[] newVaultAuthority New authority on the vault going forward - can be same authority if you want

property

[signer] vaultAuthority Authority on the vault

property

[signer] transferAuthority Transfer authority for the token account and outstanding fractional shares account you're transferring from

property

[] fractionBurnAuthority PDA-based Burn authority for the fraction treasury account containing the uncirculated shares seed [PREFIX, program_id]

property

[] externalPricing External pricing lookup address

Type declaration

  • externalPricing: web3.PublicKey
  • fractionBurnAuthority: web3.PublicKey
  • fractionMint: web3.PublicKey
  • fractionTreasury: web3.PublicKey
  • newVaultAuthority: web3.PublicKey
  • redeemTreasury: web3.PublicKey
  • transferAuthority: web3.PublicKey
  • vault: web3.PublicKey
  • vaultAuthority: web3.PublicKey
  • yourOutstandingShares: web3.PublicKey
  • yourPayment: web3.PublicKey
ExternalPriceAccountArgs: { allowedToCombine: boolean; key: Key; priceMint: web3.PublicKey; pricePerShare: beet.bignum }

Arguments used to create ExternalPriceAccount

Type declaration

  • allowedToCombine: boolean
  • key: Key
  • priceMint: web3.PublicKey
  • pricePerShare: beet.bignum
InitVaultInstructionAccounts: { authority: web3.PublicKey; fractionMint: web3.PublicKey; fractionTreasury: web3.PublicKey; pricingLookupAddress: web3.PublicKey; redeemTreasury: web3.PublicKey; vault: web3.PublicKey }

Accounts required by the InitVault instruction

property

[writable] fractionMint Initialized fractional share mint with 0 tokens in supply, authority on mint must be pda of program with seed [prefix, programid]

property

[writable] redeemTreasury Initialized redeem treasury token account with 0 tokens in supply, owner of account must be pda of program like above

property

[writable] fractionTreasury Initialized fraction treasury token account with 0 tokens in supply, owner of account must be pda of program like above

property

[writable] vault Uninitialized vault account

property

[] authority Authority on the vault

property

[] pricingLookupAddress Pricing Lookup Address

Type declaration

  • authority: web3.PublicKey
  • fractionMint: web3.PublicKey
  • fractionTreasury: web3.PublicKey
  • pricingLookupAddress: web3.PublicKey
  • redeemTreasury: web3.PublicKey
  • vault: web3.PublicKey
InitVaultInstructionArgs: { initVaultArgs: InitVaultArgs }

Type declaration

MintFractionalSharesInstructionAccounts: { fractionMint: web3.PublicKey; fractionTreasury: web3.PublicKey; mintAuthority: web3.PublicKey; vault: web3.PublicKey; vaultAuthority: web3.PublicKey }

Accounts required by the MintFractionalShares instruction

property

[writable] fractionTreasury Fraction treasury

property

[writable] fractionMint Fraction mint

property

[] vault The initialized active token vault

property

[] mintAuthority PDA-based Mint authority to mint tokens to treasury[PREFIX, program_id]

property

[signer] vaultAuthority Authority of vault

Type declaration

  • fractionMint: web3.PublicKey
  • fractionTreasury: web3.PublicKey
  • mintAuthority: web3.PublicKey
  • vault: web3.PublicKey
  • vaultAuthority: web3.PublicKey
MintFractionalSharesInstructionArgs: { numberOfShareArgs: NumberOfShareArgs }

Type declaration

RedeemSharesInstructionAccounts: { burnAuthority: web3.PublicKey; destination: web3.PublicKey; fractionMint: web3.PublicKey; outstandingShares: web3.PublicKey; redeemTreasury: web3.PublicKey; transferAuthority: web3.PublicKey; vault: web3.PublicKey }

Accounts required by the RedeemShares instruction

property

[writable] outstandingShares Initialized Token account containing your fractional shares

property

[writable] destination Initialized Destination token account where you wish your proceeds to arrive

property

[writable] fractionMint Fraction mint

property

[writable] redeemTreasury Redeem treasury account

property

[] transferAuthority PDA-based Transfer authority for the transfer of proceeds from redeem treasury to destination seed [PREFIX, program_id]

property

[signer] burnAuthority Burn authority for the burning of your shares

property

[] vault Combined token vault

Type declaration

  • burnAuthority: web3.PublicKey
  • destination: web3.PublicKey
  • fractionMint: web3.PublicKey
  • outstandingShares: web3.PublicKey
  • redeemTreasury: web3.PublicKey
  • transferAuthority: web3.PublicKey
  • vault: web3.PublicKey
SafetyDepositBoxArgs: { key: Key; order: number; store: web3.PublicKey; tokenMint: web3.PublicKey; vault: web3.PublicKey }

Arguments used to create SafetyDepositBox

Type declaration

  • key: Key
  • order: number
  • store: web3.PublicKey
  • tokenMint: web3.PublicKey
  • vault: web3.PublicKey
SetAuthorityInstructionAccounts: { currentAuthority: web3.PublicKey; newAuthority: web3.PublicKey; vault: web3.PublicKey }

Accounts required by the SetAuthority instruction

property

[writable] vault Vault

property

[signer] currentAuthority Vault authority

property

[] newAuthority New authority

Type declaration

  • currentAuthority: web3.PublicKey
  • newAuthority: web3.PublicKey
  • vault: web3.PublicKey
UpdateExternalPriceAccountInstructionAccounts: { externalPriceAccount: web3.PublicKey }

Accounts required by the UpdateExternalPriceAccount instruction

property

[writable] externalPriceAccount External price account

Type declaration

  • externalPriceAccount: web3.PublicKey
UpdateExternalPriceAccountInstructionArgs: { externalPriceAccount: ExternalPriceAccount }

Type declaration

VaultArgs: { allowFurtherShareCreation: boolean; authority: web3.PublicKey; extraByte: number; fractionMint: web3.PublicKey; fractionTreasury: web3.PublicKey; key: Key; lockedPricePerShare: beet.bignum; pricingLookupAddress: web3.PublicKey; redeemTreasury: web3.PublicKey; state: VaultState; tokenProgram: web3.PublicKey; tokenTypeCount: number }

Arguments used to create Vault

Type declaration

  • allowFurtherShareCreation: boolean
  • authority: web3.PublicKey
  • extraByte: number
  • fractionMint: web3.PublicKey
  • fractionTreasury: web3.PublicKey
  • key: Key
  • lockedPricePerShare: beet.bignum
  • pricingLookupAddress: web3.PublicKey
  • redeemTreasury: web3.PublicKey
  • state: VaultState
  • tokenProgram: web3.PublicKey
  • tokenTypeCount: number
WithdrawSharesFromTreasuryInstructionAccounts: { destination: web3.PublicKey; fractionTreasury: web3.PublicKey; transferAuthority: web3.PublicKey; vault: web3.PublicKey; vaultAuthority: web3.PublicKey }

Accounts required by the WithdrawSharesFromTreasury instruction

property

[writable] destination Initialized Destination account for the shares being withdrawn

property

[writable] fractionTreasury Fraction treasury

property

[] vault The initialized active token vault

property

[] transferAuthority PDA-based Transfer authority to move tokens from treasury to your destination[PREFIX, program_id]

property

[signer] vaultAuthority Authority of vault

Type declaration

  • destination: web3.PublicKey
  • fractionTreasury: web3.PublicKey
  • transferAuthority: web3.PublicKey
  • vault: web3.PublicKey
  • vaultAuthority: web3.PublicKey
WithdrawSharesFromTreasuryInstructionArgs: { numberOfShareArgs: NumberOfShareArgs }

Type declaration

WithdrawTokenFromSafetyDepositBoxInstructionAccounts: { destination: web3.PublicKey; fractionMint: web3.PublicKey; safetyDeposit: web3.PublicKey; store: web3.PublicKey; transferAuthority: web3.PublicKey; vault: web3.PublicKey; vaultAuthority: web3.PublicKey }

Accounts required by the WithdrawTokenFromSafetyDepositBox instruction

property

[writable] destination Initialized Destination account for the tokens being withdrawn

property

[writable] safetyDeposit The safety deposit box account key for the tokens

property

[writable] store The store key on the safety deposit box account

property

[writable] vault The initialized combined token vault

property

[] fractionMint Fraction mint

property

[signer] vaultAuthority Authority of vault

property

[] transferAuthority PDA-based Transfer authority to move the tokens from the store to the destination seed [PREFIX, program_id]

Type declaration

  • destination: web3.PublicKey
  • fractionMint: web3.PublicKey
  • safetyDeposit: web3.PublicKey
  • store: web3.PublicKey
  • transferAuthority: web3.PublicKey
  • vault: web3.PublicKey
  • vaultAuthority: web3.PublicKey
WithdrawTokenFromSafetyDepositBoxInstructionArgs: { amountArgs: AmountArgs }

Type declaration

PROGRAM_ADDRESS: "vau1zxA2LbssAUEF7Gpw91zMM1LvXrvpzJtmZ58rPsn" = 'vau1zxA2LbssAUEF7Gpw91zMM1LvXrvpzJtmZ58rPsn'

Program address

PROGRAM_ID: PublicKey = ...

Program publick key

amountArgsBeet: BeetArgsStruct<AmountArgs> = ...
externalPriceAccountBeet: BeetStruct<ExternalPriceAccount, ExternalPriceAccountArgs> = ...
initVaultArgsBeet: BeetArgsStruct<InitVaultArgs> = ...
keyBeet: FixedSizeBeet<Key, Key> = ...
mintEditionProxyArgsBeet: BeetArgsStruct<MintEditionProxyArgs> = ...
numberOfShareArgsBeet: BeetArgsStruct<NumberOfShareArgs> = ...
safetyDepositBoxBeet: BeetStruct<SafetyDepositBox, SafetyDepositBoxArgs> = ...
vaultBeet: BeetStruct<Vault, VaultArgs> = ...
vaultStateBeet: FixedSizeBeet<VaultState, VaultState> = ...
  • errorFromCode(code: number): MaybeErrorWithCode
  • errorFromName(name: string): MaybeErrorWithCode

Generated using TypeDoc