export declare enum Rarity { basic = "basic",// - 8-15 characters common = "common",// - 4-7 characters rare = "rare",// - 3 characters ultra_rare = "ultra_rare",// - 2 characters legendary = "legendary" } export type BoolInt = 0 | 1; export type HexString = `0x${string}`; export type HexStringOrEmpty = HexString | ''; /** * The asset label is a string that is used to identify the asset type. * First, remove the first and last 0. * Next, use the first 4 characters as the hex and convert to decimal. https://www.rapidtables.com/convert/number/hex-to-decimal.html * Finally, use the decimal number and convert to CRC8. It should match the last 2 characters. https://crccalc.com/ */ export declare enum AssetNameLabel { LABEL_000 = "00000000",// 0 LABEL_100 = "000643b0",// 100 LABEL_222 = "000de140",// 222 LABEL_333 = "0014df10",// 333 LABEL_444 = "001bc280" } export declare enum HandleType { VIRTUAL_SUBHANDLE = "virtual_subhandle", NFT_SUBHANDLE = "nft_subhandle", HANDLE = "handle" } /** * Classification of a holder/resolved address. * - `wallet` - Shelley address, not a script, has a stake key * - `script` - Shelley address that is a script * - `enterprise` - Shelley address, not a script, no stake key * - `other` - not a Shelley address */ export declare enum AddressType { wallet = "wallet", script = "script", enterprise = "enterprise", other = "other" } /** Encoding requested from the `/datum` endpoints. */ export declare enum DatumType { json = "json", tx_metadata_json = "tx_metadata_json", tx_metadata_cbor = "tx_metadata_cbor", plutus_data_json = "plutus_data_json", plutus_data_cbor = "plutus_data_cbor" } /** Lookup key used by the handle filter/search endpoints. */ export declare enum FilterType { handle = "handle", handlehex = "handlehex", assetname = "assetname", holder = "holder", bech32stake = "bech32stake", bech32address = "bech32address", hexaddress = "hexaddress", paymentkeyhash = "paymentkeyhash", stakekeyhash = "stakekeyhash" } /** SubHandle minting type filter. */ export declare enum MintingType { nft = "nft", virtual = "virtual" } /** Index/sync health status reported by the health endpoint. */ export declare enum HealthStatus { current = "current", updating = "updating", ogmios_behind = "ogmios_behind", storage_behind = "storage_behind", waiting_on_cardano_node = "waiting_on_cardano_node" } export interface KeyPair { key: string; value: any; } export interface SocialItem { display: string; url: string; } interface ISharedPzDesigner { pfp_border_color?: HexStringOrEmpty; qr_inner_eye?: string; qr_outer_eye?: string; qr_dot?: string; qr_bg_color?: HexStringOrEmpty; qr_image?: string; pfp_zoom?: number; pfp_offset?: number[]; font?: string; font_color?: HexStringOrEmpty; font_shadow_size?: number[]; text_ribbon_colors?: HexStringOrEmpty[]; text_ribbon_gradient?: string; } export interface IPersonalizationDesigner extends ISharedPzDesigner { font_shadow_color?: HexStringOrEmpty; bg_color?: HexStringOrEmpty; bg_border_color?: HexStringOrEmpty; qr_link?: string; socials?: SocialItem[]; socials_color?: string; circuit_color?: string; creator_defaults_enabled?: BoolInt; } export interface ICreatorDefaults extends ISharedPzDesigner { bg_border_colors?: HexStringOrEmpty[]; pfp_border_colors?: HexStringOrEmpty[]; font_shadow_colors?: HexStringOrEmpty[]; require_pfp_collections?: HexStringOrEmpty[]; require_pfp_attributes?: string[]; require_pfp_displayed?: BoolInt; price?: number; force_creator_settings?: BoolInt; custom_dollar_symbol?: BoolInt; } export interface IPersonalizationPortal { type: string; domain?: string | null; custom_settings?: string[] | null; default?: boolean; } export interface ScriptDetails { handle: string; handleHex: string; refScriptUtxo?: string; refScriptAddress?: string; cbor?: string; unoptimizedCbor?: string; validatorHash: string; latest?: boolean; type?: string; } export interface IReferenceToken { tx_id: string; index: number; lovelace: number; datum: string; address: string; script?: ScriptDetails; } /** A UTxO as exposed by the public API (`UTxO` swagger schema). */ export interface IUTxO { tx_id: string; index: number; lovelace: number; datum?: string; address: string; script?: ScriptDetails; reference_script?: string; } export interface IPersonalization { portal?: IPersonalizationPortal; designer?: IPersonalizationDesigner; socials?: SocialItem[]; validated_by: string; trial: boolean; nsfw: boolean; } export interface IHandle { hex: string; name: string; handle_type: HandleType; holder: string; holder_type: AddressType; length: number; og_number: number; og?: boolean; rarity: Rarity; characters: string; numeric_modifiers: string; default_in_wallet: string; image: string; image_hash: string; standard_image: string; standard_image_hash: string; pfp_image?: string; pfp_asset?: string; bg_image?: string; bg_asset?: string; resolved_addresses: { ada: string; eth?: string; btc?: string; }; created_slot_number: number; updated_slot_number: number; utxo: string; lovelace?: number; has_datum: boolean; datum?: string; script?: { type: string; cbor: string; }; sub_length?: number; sub_rarity?: Rarity; sub_characters?: string; sub_numeric_modifiers?: string; original_address?: string; virtual?: { expires_time?: number; public_mint?: boolean; }; pz_enabled?: boolean; last_update_address?: string; last_edited_time?: number; payment_key_hash?: string; policy?: string; svg_version: string | number; version: number; } export interface ICip68Handle extends IHandle { reference_token?: IReferenceToken; } export interface IPersonalizedHandle extends ICip68Handle { personalization?: IPersonalization; } /** Aggregate counts exposed by the public `/stats` endpoint. */ export interface IStats { total_handles: number; total_holders: number; } /** A holder/owner as exposed by the public `/holders` endpoints. */ export interface IHolder { total_handles: number; address: string; type: AddressType; known_owner_name?: string; default_handle?: string; manually_set?: boolean; } /** SubHandle configuration set by a root Handle owner. */ export interface ISubHandleSettings { nft?: Record; virtual?: Record; buy_down_paid?: number; buy_down_price?: number; buy_down_percent?: number; agreed_terms?: string; payment_address?: string; migrate_sig_required?: boolean; } /** Uniform error envelope returned by every 4xx/5xx response. */ export interface IApiError { error: string; message: string; docs: string; } /** Response from the API health endpoint. */ export interface IHealthResponse { status: HealthStatus; ogmios?: Record | null; stats: { percentage_complete?: number; index_memory_size?: number; slot_date?: string; handle_count?: number; holder_count?: number; memory_size?: number; current_slot?: number; last_slot?: number; current_block_hash?: string; tip_block_hash?: string; utxo_schema_version?: number; index_schema_version?: number; lock_lambdas?: any | null; estimated_sync_time?: string; }; } export interface IHandleStats { percentage_complete: string; current_memory_used: number; ogmios_elapsed: string; building_elapsed: string; handle_count: number; slot_date: Date; memory_size: number; current_slot: number; current_block_hash: string; schema_version: number; } export interface IHandleMetadata { name: string; image: string; mediaType: string; og: BoolInt; og_number: number; rarity: string; length: number; characters: string; numeric_modifiers: string; version: number; sub_rarity?: string; sub_length?: number; sub_characters?: string; sub_numeric_modifiers?: string; handle_type: HandleType; } export interface IPzDatum { standard_image: string; image_hash: HexStringOrEmpty; standard_image_hash: HexStringOrEmpty; bg_image?: string; pfp_image?: string; pfp_asset?: HexStringOrEmpty; bg_asset?: HexStringOrEmpty; portal: string; designer: string; socials: string; vendor: string; default: BoolInt; last_update_address: HexStringOrEmpty; validated_by: HexStringOrEmpty; resolved_addresses?: { ada: HexStringOrEmpty; }; trial: BoolInt; nsfw: BoolInt; svg_version: string; agreed_terms: string; migrate_sig_required: BoolInt; } export interface IHandleFileContent { slot: number; hash: string; schemaVersion?: number; handles: Record; } export interface IHandleSvgOptions extends IPersonalizationDesigner { pfp_image?: string; pfp_asset?: string; bg_image?: string; bg_asset?: string; og_number?: number; } export interface PzSettings { treasury_fee: number; treasury_cred: HexStringOrEmpty; pz_min_fee: number; pz_providers: { [pubKeyHashBytes: HexString]: HexStringOrEmpty; }; valid_contracts: HexStringOrEmpty[]; admin_creds: HexStringOrEmpty[]; settings_cred: HexStringOrEmpty; } export interface ApprovedPolicies { [policyId: HexString]: { [patternMatch: HexString]: [number, number, number?]; }; } export declare enum OAuthSocial { 'twitter' = 0, 'facebook' = 1, 'discord' = 2, 'instagram' = 3, 'tiktok' = 4, 'youtube' = 5, 'twitch' = 6, 'linkedin' = 7, 'snapchat' = 8, 'telegram' = 9, 'whatsapp' = 10, 'medium' = 11, 'github' = 12, 'reddit' = 13, 'pinterest' = 14, 'pin' = 15, 'spotify' = 16, 'soundcloud' = 17, 'paypal' = 18 } export interface OAuthTokenMessage { error?: string; username?: string; token?: string; identifier?: string; social: OAuthSocial; } export interface OAuthToken { identifier: string; username: string; token: string; social: OAuthSocial; } export {};