CandyGuardProgram: {
    availableGuards: string[];
    getErrorFromCode: ((code: number, cause?: Error) => null | ProgramError);
    getErrorFromName: ((name: string, cause?: Error) => null | ProgramError);
    isOnCluster: ((cluster: Cluster) => boolean);
    name: string;
    publicKey: PublicKey<string>;
}

Type declaration

  • availableGuards: string[]
  • getErrorFromCode: ((code: number, cause?: Error) => null | ProgramError)
      • (code: number, cause?: Error): null | ProgramError
      • Retrieves a ProgramError from a given error code or null if the error code is not recognized.

        Parameters

        • code: number
        • Optional cause: Error

        Returns null | ProgramError

  • getErrorFromName: ((name: string, cause?: Error) => null | ProgramError)
      • (name: string, cause?: Error): null | ProgramError
      • Retrieves a ProgramError from a given error name or null if the error name is not recognized.

        Parameters

        • name: string
        • Optional cause: Error

        Returns null | ProgramError

  • isOnCluster: ((cluster: Cluster) => boolean)
      • (cluster: Cluster): boolean
      • A method that returns true if the program is available on the given cluster.

        If the same program is available on multiple clusters but using different public keys, multiple Program instances must be registered such that the isOnCluster method returns true for the appropriate cluster.

        Parameters

        Returns boolean

  • name: string
  • publicKey: PublicKey<string>

Generated using TypeDoc