Options
All
  • Public
  • Public/Protected
  • All
Menu

Holds the data for the Vault Account and provides de/serialization functionality for that data

Hierarchy

  • Vault

Implements

Index

Properties

allowFurtherShareCreation: boolean
authority: PublicKey
extraByte: number
fractionMint: PublicKey
fractionTreasury: PublicKey
key: Key
lockedPricePerShare: bignum
pricingLookupAddress: PublicKey
redeemTreasury: PublicKey
state: VaultState
tokenProgram: PublicKey
tokenTypeCount: number

Accessors

  • get byteSize(): number

Methods

  • pretty(): { allowFurtherShareCreation: boolean; authority: string; extraByte: number; fractionMint: string; fractionTreasury: string; key: string; lockedPricePerShare: bignum; pricingLookupAddress: string; redeemTreasury: string; state: string; tokenProgram: string; tokenTypeCount: number }
  • Returns a readable version of Vault properties and can be used to convert to JSON and/or logging

    Returns { allowFurtherShareCreation: boolean; authority: string; extraByte: number; fractionMint: string; fractionTreasury: string; key: string; lockedPricePerShare: bignum; pricingLookupAddress: string; redeemTreasury: string; state: string; tokenProgram: string; tokenTypeCount: number }

    • allowFurtherShareCreation: boolean
    • authority: string
    • extraByte: number
    • fractionMint: string
    • fractionTreasury: string
    • key: string
    • lockedPricePerShare: bignum
    • pricingLookupAddress: string
    • redeemTreasury: string
    • state: string
    • tokenProgram: string
    • tokenTypeCount: number
  • serialize(): [Buffer, number]
  • deserialize(buf: Buffer, offset?: number): [Vault, number]
  • fromAccountAddress(connection: Connection, address: PublicKey): Promise<Vault>
  • Retrieves the account info from the provided address and deserializes the Vault from its data.

    throws

    Error if no account info is found at the address or if deserialization fails

    Parameters

    • connection: Connection
    • address: PublicKey

    Returns Promise<Vault>

  • fromAccountInfo(accountInfo: AccountInfo<Buffer>, offset?: number): [Vault, number]
  • Deserializes the Vault from the data of the provided {@link web3.AccountInfo}.

    Parameters

    • accountInfo: AccountInfo<Buffer>
    • offset: number = 0

    Returns [Vault, number]

    a tuple of the account data and the offset up to which the buffer was read to obtain it.

  • getMinimumBalanceForRentExemption(connection: Connection, commitment?: Commitment): Promise<number>
  • Fetches the minimum balance needed to exempt an account holding Vault data from rent

    Parameters

    • connection: Connection

      used to retrieve the rent exemption information

    • Optional commitment: Commitment

    Returns Promise<number>

  • hasCorrectByteSize(buf: Buffer, offset?: number): boolean

Generated using TypeDoc