import { HplCurrency } from "@honeycomb-protocol/currency-manager"; import { Operation } from "@honeycomb-protocol/hive-control"; import { AddressLookupTableAccount, ConfirmOptions, PublicKey } from "@solana/web3.js"; import { BrightSwitch, Burner, Switch } from "."; import { ArtistAccountArgs, UpdateBurnerArgs, UpdateSwitchParams } from "../generated"; import { CreateBurnerIxArgs, CreateSwitchIxArgs } from "../operations"; /** * Represents an Artist and provides methods for managing the artist's data. */ export declare class Artist { private _brightswitch; private _data; private _currency; private _artistAddress; private _metadata; private _lookupTable?; private _create; private _update; private _remove; private _userBlanaces; private _burners; private _switches; /** * Creates an instance of Artist. * @param _brightswitch - An instance of BrightSwitch for managing the artist. * @param _data - The artist's account data. * @param _currency - The currency associated with the artist. * @param _artistAddress - The public key of the artist's account. * @param _metadata - The artist's metadata. * @param _lookupTable - The address lookup table for the artist. */ constructor(_brightswitch: BrightSwitch, _data: ArtistAccountArgs, _currency: HplCurrency, _artistAddress: PublicKey, _metadata: any | null, _lookupTable?: AddressLookupTableAccount); /** * Get the currency associated with the artist. * @returns The currency instance. */ currency(): HplCurrency; /** * Get the public key of the artist's account. * @returns The artist's account public key. */ address(): PublicKey; /** * Get the artist's account data. * @returns The artist's account data. */ data(): ArtistAccountArgs; /** * Get an instance of ArtistCreate for creating switches and burners. * @returns An instance of ArtistCreate. */ create(): ArtistCreate; /** * Get an instance of ArtistUpdate for updating switches and burners. * @returns An instance of ArtistUpdate. */ update(): ArtistUpdate; /** * Get an instance of ArtistRemove for removing switches and burners. * @returns An instance of ArtistRemove. */ remove(): ArtistRemove; /** * Get an instance of BrightSwitch for managing the artist. * @returns An instance of BrightSwitch. */ brightswitch(): BrightSwitch; /** * Get the lookup table of the artist. * @returns - The serialized lookup table for the artist. */ lookupTable(): AddressLookupTableAccount | undefined; /** * Get the metadata associated with the artist URI. * @returns - The metadata for the artist. */ metadata(): any; /** * Retrieve the burners associated with this artist. * @param fetch - Whether to fetch the burners if not already fetched. * @returns A promise that resolves to an array of Burner instances. */ burners(fetch?: boolean, onChain?: boolean): Promise; /** * Retrieve the switches associated with this artist. * @param fetch - Whether to fetch the switches if not already fetched. * @returns A promise that resolves to an array of Switch instances. */ switches(fetch?: boolean, onChain?: boolean): Promise; /** * * @param owner - THE OWNER PUBLIC KEY FOR FETCHING OR INITIALIZING THE TOKEN ACCOUNT * @param payer - THE PAYER PUBLIC KEY FOR INITIALIZING THE TOKEN ACCOUNT BY DEFAULT IT IS THE OWNER * @returns - THE TOKEN ACCOUNT AND THE HOLDER ACCOUNT PLUS THE OPERATION TO INITIALIZE THE TOKEN ACCOUNT */ initCurrencyTokenAccount(owner: PublicKey, payer?: PublicKey): { operation: Operation; holderAccount: PublicKey; tokenAccount: PublicKey; }; /** * Retrieve the user balance associated with this artist. * @param fetch - Whether to fetch the user balance if not already fetched. * @returns A promise that resolves to the user balance as a number. */ userBalance(fetch?: boolean): Promise; /** * Create a new instance of the Artist class. * @param _brightswitch - An instance of BrightSwitch for managing the artist. * @param _artist - The artist's account data. * @param _artistAddress - The public key of the artist's account. * @returns A promise that resolves to a new Artist instance. */ static new(_brightswitch: BrightSwitch, _artist: ArtistAccountArgs, _artistAddress: PublicKey): Promise; /** * Create an Artist instance from a given address. * @param address - The public key of the artist's account. * @param brightswitch - An instance of BrightSwitch for managing the artist. * @param refetch - Whether to refetch the artist data if cached. * @returns A promise that resolves to an Artist instance. */ static fromAddress(address: PublicKey, brightswitch: BrightSwitch, refetch?: boolean, onChain?: boolean): Promise; /** * Retrieve all artists based on specified filters. * @param brightswitch - An instance of BrightSwitch for managing the artist. * @param filters - Optional filters for querying artists. * @returns A promise that resolves to an array of Artist instances. */ static allWithFilter(brightswitch: BrightSwitch, filters?: Partial, onChain?: boolean): Promise; } /** * Represents an object responsible for creating switches and burners for an artist. */ export declare class ArtistCreate { private _artist; private _brightswitch; /** * Creates an instance of ArtistCreate. * @param _artist - The associated Artist instance. * @param _brightswitch - An instance of BrightSwitch for managing the artist. */ constructor(_artist: Artist, _brightswitch: BrightSwitch); /** * Create a new switch for the artist. * @param args - Configuration options for creating the switch. * @param confirmOptions - Options for confirming the switch operation. * @returns A promise that resolves to a new Switch instance. */ switch(args: Omit, confirmOptions: Omit): Promise; /** * Create a new burner for the artist. * @param args - Configuration options for creating the burner. * @param confirmOptions - Options for confirming the burner operation. * @returns A promise that resolves to a new Burner instance. */ burner(args: Omit, confirmOptions?: Omit): Promise; } /** * Represents an object responsible for updating switches and burners for an artist. */ declare class ArtistUpdate { private _artist; private _brightswitch; /** * Creates an instance of ArtistUpdate. * @param _artist - The associated Artist instance. * @param _brightswitch - An instance of BrightSwitch for managing the artist. */ constructor(_artist: Artist, _brightswitch: BrightSwitch); /** * Update a switch for the artist. * @param args - Configuration options for updating the switch. * @param _switch - The Switch instance to be updated. * @param confirmOptions - Options for confirming the switch operation. * @returns A promise that resolves to a new Switch instance after the update. */ switch(address: PublicKey, args: UpdateSwitchParams, confirmOptions?: Omit): Promise; /** * Update a burner for the artist. * @param args - Configuration options for updating the burner. * @param confirmOptions - Options for confirming the burner operation. * @returns A promise that resolves to a new Burner instance after the update. */ burner(address: PublicKey, args: UpdateBurnerArgs, confirmOptions?: Omit): Promise; } /** * Represents an object responsible for removing switches and burners for an artist. */ declare class ArtistRemove { private _artist; private _brightswitch; /** * Creates an instance of ArtistRemove. * @param _artist - The associated Artist instance. * @param _brightswitch - An instance of BrightSwitch for managing the artist. */ constructor(_artist: Artist, _brightswitch: BrightSwitch); /** * Remove a switch for the artist. * @param args - Args for removing a switch. * @param confirmOptions - Options for confirming the switch removal operation. * @returns A promise that resolves to a string indicating the removed switch. */ switch(address: PublicKey, confirmOptions: Omit): Promise; burner(address: PublicKey, confirmOptions: Omit): Promise; } export {}; //# sourceMappingURL=artist.d.ts.map