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

Hierarchy

  • Project

Implements

Properties

allowedPrograms: PublicKey[]
authority: PublicKey
bump: number
collections: PublicKey[]
creators: PublicKey[]
driver: PublicKey
key: PublicKey
mintIndexing: Indexing
name: string
profileDataConfig: Map<string, ProfileDataType>
services: Service[]

Methods

  • Returns a readable version of Project properties and can be used to convert to JSON and/or logging

    Returns {
        allowedPrograms: PublicKey[];
        authority: string;
        bump: number;
        collections: PublicKey[];
        creators: PublicKey[];
        driver: string;
        key: string;
        mintIndexing: Indexing;
        name: string;
        profileDataConfig: Map<string, ProfileDataType>;
        services: Service[];
    }

    • allowedPrograms: PublicKey[]
    • authority: string
    • bump: number
    • collections: PublicKey[]
    • creators: PublicKey[]
    • driver: string
    • key: string
    • mintIndexing: Indexing
    • name: string
    • profileDataConfig: Map<string, ProfileDataType>
    • services: Service[]
  • Serializes the Project into a Buffer.

    Returns [Buffer, number]

    a tuple of the created Buffer and the offset up to which the buffer was written to store it.

  • Returns the byteSize of a Buffer holding the serialized data of Project for the provided args.

    Parameters

    • args: ProjectArgs

      need to be provided since the byte size for this account depends on them

    Returns number

  • Deserializes the Project from the provided data Buffer.

    Parameters

    • buf: Buffer
    • Optional offset: number

    Returns [Project, number]

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

  • Retrieves the account info from the provided address and deserializes the Project from its data.

    Parameters

    • connection: Connection
    • address: PublicKey
    • Optional commitmentOrConfig: Commitment | GetAccountInfoConfig

    Returns Promise<Project>

    Throws

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

  • Deserializes the Project from the data of the provided web3.AccountInfo.

    Parameters

    • accountInfo: AccountInfo<Buffer>
    • Optional offset: number

    Returns [Project, number]

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

  • Creates a Project instance from the provided args.

    Parameters

    Returns Project

  • Fetches the minimum balance needed to exempt an account holding Project data from rent

    Parameters

    • args: ProjectArgs

      need to be provided since the byte size for this account depends on them

    • connection: Connection

      used to retrieve the rent exemption information

    • Optional commitment: Commitment

    Returns Promise<number>

  • Provides a web3.Connection.getProgramAccounts config builder, to fetch accounts matching filters that can be specified via that builder.

    Parameters

    • Optional programId: PublicKey

      the program that owns the accounts we are filtering

    Returns GpaBuilder<ProjectArgs & {
        accountDiscriminator: number[];
    }>

Generated using TypeDoc