import * as viem from 'viem';
import { Address, PublicClient, WalletClient, Hex, Transport, Account as Account$1 } from 'viem';
import * as _privy_io_react_auth_smart_wallets from '@privy-io/react-auth/smart-wallets';
import { Client } from '@urql/core';

/**
 * Basic types used across the SDK
 */
type TokenAmountInput = bigint | number;
type AttestationData = {
    recipient: Address;
    expirationTime: bigint;
    revocable: boolean;
    refUID: `0x${string}`;
    data: `0x${string}`;
    value?: bigint;
};
type SignatureParams = {
    signature: `0x${string}`;
    signer: Address;
    v: number;
    r: `0x${string}`;
    s: `0x${string}`;
};
type AttestationRequest = {
    schema: `0x${string}`;
    data: {
        recipient: Address;
        expirationTime: bigint;
        revocable: boolean;
        refUID: `0x${string}`;
        data: `0x${string}`;
    };
};
type ChallengeRequest = {
    attestation: `0x${string}`;
    data: AttestationData & {
        value: bigint;
    };
};
type Attestation = {
    uid: `0x${string}`;
    schema: `0x${string}`;
    time: bigint;
    expirationTime: bigint;
    revocationTime: bigint;
    refUID: `0x${string}`;
    recipient: Address;
    verifier: Address;
    verifierCount: bigint;
    revocable: boolean;
    data: `0x${string}`;
    bondedAmount: bigint;
    nftAddress: Address;
    nftId: bigint;
};
type SchemaRecord = {
    uid: `0x${string}`;
    revocable: boolean;
    schema: string;
};
type TransactionResponse = {
    txHash?: `0x${string}`;
    encodedTxData?: `0x${string}`;
};
type AttestationResponse = TransactionResponse & {
    attestationId?: `0x${string}`;
};
type ChallengeResponse = TransactionResponse & {
    challengeId?: `0x${string}`;
};

/**
 * Client for interacting with the Cultura Attestation Service.
 *
 * The Attestation Service manages the creation and verification of attestations
 * that prove digital asset ownership and rights. The attestation process is a crucial
 * first step after minting a digital asset, where creators bond tokens to validate their
 * ownership claims.
 *
 * @group Attestation Service
 */
declare class AttestationServiceClient {
    private readonly publicClient;
    private readonly walletClient;
    private readonly contractAddress;
    constructor(publicClient: PublicClient, walletClient: WalletClient, contractAddress: `0x${string}`);
    /**
     * Create an attestation for a digital asset
     *
     * @param attestationRequest - Object containing attestation details
     * @param digitalAssetAddress - Address of the digital asset token contract
     * @param digitalAssetId - Token ID of the digital asset being attested
     * @param assetClass - Asset class ID for the attestation (affects fees and requirements)
     * @param bondAmount - Amount of tokens to bond for the attestation
     *
     * @returns An object containing the unique identifier (UID) of the created attestation and the address of the deployed Rights Bound Account.
     *
     * @example
     * ```typescript
     * const attestationRequest = {
     *   schema: schemaHash,
     *   data: {
     *     recipient: userAddress,
     *     expirationTime: BigInt(Math.floor(Date.now() / 1000) + 365 * 24 * 60 * 60),
     *     revocable: true,
     *     refUID: "0x0000000000000000000000000000000000000000000000000000000000000000",
     *     data: "0x"
     *   }
     * }
     *
     * const attestationData = await sdk.attestationService.attest(
     *   attestationRequest,
     *   tokenAddress,
     *   tokenId,
     *   assetClass,
     *   bondAmount
     * );
     * ```
     */
    attest(attestationRequest: AttestationRequest, digitalAssetAddress: `0x${string}`, digitalAssetId: bigint, assetClass: bigint, bondAmount: bigint): Promise<{
        attestationUid: `0x${string}`;
        rightsBoundAccount: `0x${string}`;
    }>;
    /**
     * Create a sponsored attestation for a digital asset paid by a third party
     *
     * @param attestationRequest - Object containing attestation details
     * @param digitalAssetAddress - Address of the digital asset token contract
     * @param digitalAssetId - Token ID of the digital asset being attested
     * @param assetClass - Asset class ID for the attestation (affects fees and requirements)
     * @param bondAmount - Amount of tokens to bond for the attestation
     * @param payer - Address of the sponsor/payer
     *
     * @returns An object containing the unique identifier (UID) of the created attestation and the address of the deployed Rights Bound Account.
     *
     * @example
     * ```typescript
     * const attestationRequest = {
     *   schema: schemaHash,
     *   data: {
     *     recipient: userAddress,
     *     expirationTime: BigInt(Math.floor(Date.now() / 1000) + 365 * 24 * 60 * 60),
     *     revocable: true,
     *     refUID: "0x0000000000000000000000000000000000000000000000000000000000000000",
     *     data: "0x"
     *   }
     * }
     *
     * const attestationData = await sdk.attestationService.sponsoredAttest(
     *   attestationRequest,
     *   tokenAddress,
     *   tokenId,
     *   assetClass,
     *   bondAmount,
     *   payer
     * );
     * ```
     */
    sponsoredAttest(attestationRequest: AttestationRequest, digitalAssetAddress: `0x${string}`, digitalAssetId: bigint, assetClass: bigint, bondAmount: bigint, payer: `0x${string}`): Promise<{
        attestationUid: `0x${string}`;
        rightsBoundAccount: `0x${string}`;
    }>;
    /**
     * Create a delegated attestation
     *
     * This method allows a user to create an attestation on behalf of another account,
     * using a signature from that account for authorization.
     *
     * @param signatureParams - Parameters for the signature verification
     * @param attestationRequest - Object containing attestation details
     * @param digitalAssetAddress - Address of the digital asset token contract
     * @param digitalAssetId - Token ID of the digital asset being attested
     * @param assetClass - Asset class ID for the attestation (affects fees and requirements)
     * @param bondAmount - Amount of tokens to bond for the attestation
     * @param delegatedAddress - Address that will perform the attestation on behalf of the signer
     * @returns An object containing the unique identifier (UID) of the created attestation and the address of the deployed Rights Bound Account.
     */
    delegatedAttest(signatureParams: SignatureParams, attestationRequest: AttestationRequest, digitalAssetAddress: `0x${string}`, digitalAssetId: bigint, assetClass: bigint, bondAmount: bigint, delegatedAddress: `0x${string}`): Promise<{
        attestationUid: `0x${string}`;
        rightsBoundAccount: `0x${string}`;
    }>;
    /**
     * Create a delegated attestation
     *
     * This method allows a user to create an attestation on behalf of another account,
     * using a signature from that account for authorization.
     *
     * @param signatureParams - Parameters for the signature verification
     * @param attestationRequest - Object containing attestation details
     * @param digitalAssetAddress - Address of the digital asset token contract
     * @param digitalAssetId - Token ID of the digital asset being attested
     * @param assetClass - Asset class ID for the attestation (affects fees and requirements)
     * @param bondAmount - Amount of tokens to bond for the attestation
     * @param delegatedAddress - Address that will perform the attestation on behalf of the signer
     * @returns An object containing the unique identifier (UID) of the created attestation and the address of the deployed Rights Bound Account.
     */
    sponsoredDelegatedAttest(signatureParams: SignatureParams, attestationRequest: AttestationRequest, digitalAssetAddress: `0x${string}`, digitalAssetId: bigint, assetClass: bigint, bondAmount: bigint, delegatedAddress: `0x${string}`, payer: `0x${string}`): Promise<{
        attestationUid: `0x${string}`;
        rightsBoundAccount: `0x${string}`;
    }>;
    /**
     * Verify an attestation by bonding tokens
     *
     * This method allows a verifier to stake tokens against an attestation,
     * supporting its validity. Verifiers receive rewards for accurate verifications.
     *
     * A digital asset can achieve Verified Rights status when it meets either of these thresholds:
     * 1. Total bonded tokens reach the level requirement
     * 2. Number of unique verifiers reaches the minimum threshold
     *
     * @param attestationUID - Unique identifier of the attestation to verify
     * @param bondAmount - Amount of tokens to bond for the verification
     * @returns Transaction hash of the verification transaction
     *
     * @remarks
     * Important notes about the Verified Rights promotion process:
     * - Only one endorsement per address is counted towards the verifier threshold
     * - Endorsement amounts are cumulative for the token threshold
     * - Once Verified Rights level 2 is achieved, the digital asset can be used in licensing and other trust-dependent transactions
     * - Professional verifiers' endorsements may carry additional weight in the verification process
     * - The level system reflects the trust and verification achieved by the digital asset
     *
     * @example
     * ```typescript
     * const txHash = await attestationService.verifyAttestation(
     *   attestationUID,
     *   ethers.utils.parseEther("10")
     * );
     * ```
     */
    verifyAttestation(attestationUID: `0x${string}`, bondAmount: bigint): Promise<`0x${string}`>;
    /**
     * Check if an address is a whitelisted verifier
     * @param address The address to check
     * @returns True if the address is a whitelisted verifier, false otherwise
     */
    isWhitelistedVerifier(address: `0x${string}`): Promise<boolean>;
    /**
     * Add a new whitelisted verifier
     * @param verifierAddress The address to add as a whitelisted verifier
     * @returns The transaction hash
     */
    addWhitelistVerifier(verifierAddress: `0x${string}`): Promise<`0x${string}`>;
    /**
     * Check if an address is the owner of the contract
     * @param address The address to check
     * @returns True if the address is the owner, false otherwise
     */
    isOwner(address: `0x${string}`): Promise<boolean>;
    /**
     * Get the current nonce for an address
     * @param address The address to get the nonce for
     * @returns The current nonce as a bigint
     */
    getNonce(address: `0x${string}`): Promise<bigint>;
    /**
     * Gets the current classId of a digital asset.
     *
     * The classId is selected by the digital asset minter during attestation and determines
     * both the initial bond requirement and the thresholds for verified rights promotion.
     *
     * @param digitalAssetAddress - Address of the digital asset contract
     * @param digitalAssetId - Token ID of the digital asset to check
     *
     * @remarks
     * The classId cannot be changed after attestation and determines the requirements for verified rights level.
     * Currently, there is one asset class defined, with each class having its own specific requirements
     * for initial bonds, verification thresholds, and trust factors in the verification process.
     *
     * @group Attestation Service
     */
    getDigitalAssetClassId(digitalAssetAddress: `0x${string}`, digitalAssetId: bigint): Promise<number>;
    /**
     * Get the level of a digital asset
     * @param digitalAssetAddress The address of the digital asset contract
     * @param digitalAssetId The token ID of the digital asset
     * @returns The level of the digital asset (0 = unverified, 1 = basic, 2 = verified/licensable)
     *
     * @remarks
     * The level system represents the verification status of a digital asset:
     * - Level 0: Just minted - Initial state of any newly minted digital asset
     * - Level 1: Attested - Digital asset creator has completed attestation, initial bond and fee paid
     * - Level 2: Verified Rights - Achieved through community endorsements, meets token threshold or unique verifiers requirement
     *
     * Important Notes:
     * - All digital assets, regardless of classId, can achieve Verified Rights status
     * - Verified Rights level 2 is required for licensing and other trust-dependent operations
     * - Level status is independent of the digital asset's classId
     *
     * @example
     * ```typescript
     * const level = await sdk.attestationService.getDigitalAssetLevel(digitalAssetAddress, tokenId);
     * console.log('Digital Asset Level Status:',
     *   level === 0 ? 'Just Minted' :
     *   level === 1 ? 'Attested' :
     *   level === 2 ? 'Verified Rights (Licensable)' : 'Unknown'
     * );
     * ```
     */
    getDigitalAssetLevel(digitalAssetAddress: `0x${string}`, digitalAssetId: bigint): Promise<number>;
    /**
     * Remove a whitelisted verifier
     * @param verifierAddress The address to remove from the whitelist
     * @returns The transaction hash
     */
    removeWhitelistedVerifier(verifierAddress: `0x${string}`): Promise<`0x${string}`>;
    /**
     * Retrieves detailed information about an attestation by its unique identifier.
     *
     * Use this method to get complete information about a specific attestation,
     * including the recipient, verifier, schema reference, and associated data.
     *
     * @param uid - Unique identifier of the attestation to retrieve
     *
     * @returns Complete attestation data including recipient, verifier, schema, digital asset details, and bond amounts
     *
     * @example
     * ```typescript
     * const attestation = await sdk.attestationService.getAttestation(attestationUID);
     * console.log('Attestation details:', attestation);
     * ```
     *
     * @group Attestation Service
     */
    getAttestation(uid: `0x${string}`): Promise<{
        uid: `0x${string}`;
        schema: `0x${string}`;
        time: bigint;
        expirationTime: bigint;
        revocationTime: bigint;
        refUID: `0x${string}`;
        recipient: `0x${string}`;
        attester: `0x${string}`;
        verifierCount: bigint;
        revocable: boolean;
        data: `0x${string}`;
        bondedAmount: bigint;
        digitalAssetAddress: `0x${string}`;
        digitalAssetId: bigint;
        communityUserCount: bigint;
        WLVerifierCount: bigint;
    }>;
    /**
     * Extracts the rights bound account from a transaction receipt.
     *
     * @param receipt - The transaction receipt to extract the rights bound account from
     * @returns The rights bound account address if found, zero address otherwise
     */
    getRightsBoundAccountFromReceipt(receipt: {
        logs: {
            data: `0x${string}`;
            topics: readonly `0x${string}`[];
        }[];
    }): `0x${string}`;
    /**
     * Extracts attestation data from a transaction receipt.
     *
     * @param receipt - The transaction receipt to extract the attestation data from
     * @returns The attestation data including UID and rights bound account
     * @throws Error if the attestation UID is not found in the logs
     */
    getAttestationDataFromReceipt(receipt: {
        logs: {
            data: `0x${string}`;
            topics: readonly `0x${string}`[];
        }[];
    }): {
        attestationUid: `0x${string}`;
        rightsBoundAccount: `0x${string}`;
    };
    /**
     * Generates signature parameters required for delegated attestation
     *
     * @param signature - The signed message signature
     * @param signerAddress - The address of the signer
     * @returns Signature parameters object with signature, signer, v, r, and s values
     */
    generateSignatureParams(signature: `0x${string}`, signerAddress: `0x${string}`): {
        signature: `0x${string}`;
        signer: `0x${string}`;
        v: number;
        r: `0x${string}`;
        s: `0x${string}`;
    };
    /**
     * Signs a message for delegated attestation and returns the signature parameters
     *
     * @param account - The account performing the signature
     * @returns Signature parameters object with signature, signer, v, r, and s values
     */
    signForDelegatedAttestation(account: `0x${string}`): Promise<{
        signature: `0x${string}`;
        signer: `0x${string}`;
        v: number;
        r: `0x${string}`;
        s: `0x${string}`;
    }>;
    /**
     * Generates multiple signatures for delegated attestations in bulk.
     * This is useful when you need to sign for several attestations upfront,
     * as each signature will use an incrementing nonce starting from the signer's current nonce.
     *
     * @param account - The account performing the signatures.
     * @param numberOfSignatures - The total number of signatures to generate.
     * @returns A promise that resolves to an array of signature parameters objects.
     *          Each object contains the signature, signer, v, r, and s values.
     *          These signatures must be used in the order they are returned,
     *          as they correspond to sequential nonces.
     * @throws Error if the wallet client is not available or if numberOfSignatures is not positive.
     */
    signForBulkDelegatedAttestations(account: `0x${string}`, numberOfSignatures: number): Promise<Array<{
        signature: `0x${string}`;
        signer: `0x${string}`;
        v: number;
        r: `0x${string}`;
        s: `0x${string}`;
    }>>;
}

/**
 * Client for interacting with the Schema Registry contract
 *
 * The Schema Registry contract is used to register and manage the schemas for digital asset attestations.
 * It provides a method to register a new schema or get the hash of an existing schema.
 *
 * @group Schema Registry
 */
declare class SchemaRegistryClient {
    private readonly publicClient;
    private readonly walletClient;
    private readonly contractAddress;
    constructor(publicClient: PublicClient, walletClient: WalletClient, contractAddress: `0x${string}`);
    /**
     * Register a new schema
     * @param schema The schema string to register
     * @param revocable Whether attestations using this schema can be revoked
     * @returns The schema UID (hash)
     */
    register(schema: string, revocable: boolean): Promise<`0x${string}`>;
    /**
     * Get schema by UID
     * @param uid The unique identifier (hash) of the schema
     * @returns The schema data including the schema string and revocable flag
     */
    getSchema(uid: `0x${string}`): Promise<{
        uid: `0x${string}`;
        revocable: boolean;
        schema: string;
    }>;
    /**
     * Check if a schema is revocable
     * @param uid The unique identifier (hash) of the schema
     * @returns Boolean indicating if attestations using this schema can be revoked
     */
    isRevocable(uid: `0x${string}`): Promise<boolean>;
    /**
     * Calculate schema hash using the same method as the contract
     * @param schema The schema string
     * @param revocable Whether the schema is revocable
     * @returns The calculated schema hash
     */
    private calculateSchemaHash;
    /**
     * Register a new schema or get existing schema hash
     * @param schema The schema string to register
     * @param revocable Whether the schema is revocable
     * @returns The schema hash
     *
     * @remarks
     * This function is fundamental to the attestation process as it:
     * 1. Defines the data structure for digital asset attestations
     * 2. Ensures consistency in how digital asset data is stored and verified
     * 3. Controls whether attestations can be revoked
     *
     * Schema Structure:
     * The schema string follows Solidity's parameter encoding format and typically includes:
     * - `digitalAssetName`: Name of the digital asset
     * - `digitalAssetDescription`: Detailed description of the digital asset
     * - `grade`: Numerical grade/rating of the digital asset
     *
     * @example
     * ```typescript
     * // Define a schema for digital asset attestations
     * const schemaStr = 'string digitalAssetName, string digitalAssetDescription, uint256 grade';
     * const isRevocable = true;
     *
     * // Register or get the schema
     * const schemaHash = await sdk.schemaRegistry.getOrRegisterSchema(schemaStr, isRevocable);
     * ```
     */
    getOrRegisterSchema(schema: string, revocable: boolean): Promise<`0x${string}`>;
}

/**
 * Represents a parent digital asset for inheritance tracking
 */
type ParentInfo = Readonly<{
    rightsBoundAccount: `0x${string}`;
    /** Royalty split allocated to this parent, expressed as a whole number percentage (e.g., 10 for 10%). */
    royaltySplit: bigint;
}>;
/**
 * Represents the complete license information for a digital asset token
 */
type LicenseInfo = Readonly<{
    digitalAssetName: string;
    digitalAssetDescription: string;
    creator: `0x${string}`;
    parentDigitalAsset: readonly ParentInfo[];
    termsURI: string;
}>;

/**
 * Client for interacting with the CulturaDigitalAsset NFT contract
 *
 * Functions for managing Cultura Digital Assets (implemented as ERC721 tokens with extended licensing capabilities)
 *
 * @group Cultura Digital Asset
 */
declare class CulturaDigitalAssetClient {
    private readonly publicClient;
    private readonly walletClient;
    private readonly contractAddress;
    constructor(publicClient: PublicClient, walletClient: WalletClient, contractAddress: `0x${string}`);
    /**
     * Mints a new digital asset token with specified metadata (Script version using low-level transaction handling)
     * @param to Address that will receive the minted token
     * @param digitalAssetName Name of the digital asset
     * @param digitalAssetDescription Description of the digital asset
     * @param parentInfo Array of parent digital asset information for derivative works
     * @param termsURI URI pointing to the detailed terms of the digital asset
     * @param tokenURI Token URI for the ERC-721 metadata
     * @returns The ID of the newly minted token
     * @private
     */
    private _safeMint;
    /**
     * Mints a new digital asset token with specified metadata (React version using high-level contract interaction)
     * @param to Address that will receive the minted token
     * @param digitalAssetName Name of the digital asset
     * @param digitalAssetDescription Description of the digital asset
     * @param parentInfo Array of parent digital asset information for derivative works
     * @param terms Terms for the digital asset - can be a JSON object (to be uploaded to IPFS) or a string URI (pre-hosted)
     * @param tokenURI Token URI for the ERC-721 metadata - can be a JSON object (to be uploaded to IPFS) or a string URI (pre-hosted)
     * @returns The ID of the newly minted token
     *
     * @remarks
     * This method mints a new digital asset token with licensing information. For derivative works,
     * the parentInfo array should contain:
     * - rightsBoundAccount: Address of parent digital asset collection (0x0 for original asset)
     * - digitalAssetClass: Token ID of parent digital asset (0 for original asset)
     * - royaltySplit: Percentage of royalties allocated to parent digital asset, expressed as a whole number (e.g., 10 for 10%).
     *
     * **Important:** The sum of `royaltySplit` values across all `parentInfo` must equal exactly 75.
     * (Note: This 75% value is currently hardcoded in the contract and may change in future versions).
     */
    mintDigitalAsset(to: `0x${string}`, digitalAssetName: string, digitalAssetDescription: string, parentInfo: readonly ParentInfo[], terms: Record<string, any> | string, tokenURI: Record<string, any> | string): Promise<bigint>;
    /**
     * Gets the complete license information for a token
     * @param tokenId The identifier of the token
     * @returns Complete license information including name, description, creator, parent Digital Assets, and terms URI
     *
     * @remarks
     * Returns a complete object containing:
     * ```typescript
     * {
     *   digitalAssetName: string
     *   digitalAssetDescription: string
     *   creator: address
     *   parentInfo: ParentInfo[]
     *   termsURI: string
     * }
     * ```
     */
    getLicenseInfo(tokenId: bigint): Promise<LicenseInfo>;
    /**
     * Get token owner
     */
    ownerOf(tokenId: bigint): Promise<`0x${string}`>;
    /**
     * Get token URI
     */
    tokenURI(tokenId: bigint): Promise<string>;
    /**
     * Approve an address to transfer a token
     */
    approve(to: `0x${string}`, tokenId: bigint): Promise<`0x${string}`>;
    /**
     * Set approval for all tokens
     */
    setApprovalForAll(operator: `0x${string}`, approved: boolean): Promise<`0x${string}`>;
    /**
     * Get the total supply of tokens
     * @returns The total supply as a BigInt
     */
    totalSupply(): Promise<bigint>;
    /**
     * Get a token by its index
     * @param index The index of the token
     * @returns Token ID at the specified index
     */
    tokenByIndex(index: bigint): Promise<bigint>;
}

/**
 * Client for interacting with the Cultura Rights Bound Account contract
 * Handles payment distributions, royalty claims, and account management
 *
 * These accounts manage digital asset-related functions and handle royalty distributions to various
 * stakeholders including verifiers, Cultura Treasury, and parent digital asset owners.
 * They are automatically deployed during the attestation process.
 *
 * @group Rights Bound Account
 */
declare class RightsBoundAccountClient {
    private readonly publicClient;
    private readonly walletClient;
    private readonly contractAddress;
    constructor(publicClient: PublicClient, walletClient: WalletClient, contractAddress: `0x${string}`);
    getContractAddress(): `0x${string}`;
    /**
     * Claim rewards for a period
     * @param period The period to claim rewards for
     * @returns Transaction hash
     *
     * @remarks
     * Allows stakeholders to claim their share of royalties for a specific period.
     *
     * @example
     * ```typescript
     * // Stakeholders can claim their share
     * await rightsBoundAccount.claim(currentPeriod);
     * ```
     */
    claim(period: bigint): Promise<`0x${string}`>;
    /**
     * Claim from a child bound account
     * @param childBoundAccount The address of the child bound account to claim from (the derivative bound account)
     * @param period The period to claim for
     * @returns Transaction hash
     *
     * @remarks
     * This function allows a parent bound account to claim its allocated share from a downstream
     * (child) bound account. This is part of the hierarchical royalty distribution system where
     * VR (child) bound accounts distribute payments to their parent bound accounts.
     * Important Notes:
     * - Cannot override fixed distributions to:
     *   - Verifier module (for verifiers who helped achieve Verified Rights status)
     *   - Cultura Treasury
     * - Used by protocols to define custom royalty distribution logic
     * - Must include parent digital asset owners if the digital asset is a derivative work
     *
     * @example
     * ```typescript
     * // Parent bound account claims from VR bound account
     * await parentBoundAccount.claimFromChild(vrBoundAccountAddress, period);
     * ```
     */
    claimFromChild(childBoundAccount: `0x${string}`, period: bigint): Promise<`0x${string}`>;
    /**
     * Set payment info for a period. This function is used to distribute royalties.
     *
     * @remarks
     * The new simplified flow automatically calculates splits for parents, the Cultura Treasury,
     * and the verifier module based on the total amount.
     *
     * @param info Payment information including total amount, sponsor, and authorization signature.
     * @returns Transaction hash
     */
    setPaymentInfo(info: {
        totalAmount: bigint;
        sponsor: `0x${string}`;
        signature: `0x${string}`;
        signer: `0x${string}`;
    }): Promise<`0x${string}`>;
    /**
     * Generates a signature for setting payment info on a RightsBoundAccount.
     *
     * @param period - The period index of the royalty payment.
     * @param totalAmount - The total amount of the payment.
     * @param sponsor - The address that will sponsor the token transfer.
     * @returns Signature for setting the payment info.
     */
    signForSetPaymentInfo(period: bigint, totalAmount: bigint, sponsor: `0x${string}`): Promise<`0x${string}`>;
    /**
     * Get current period
     * @returns The current period as a bigint
     */
    getCurrentPeriod(): Promise<bigint>;
    /**
     * Get payment amount for a beneficiary in a specific period
     * This can be used to determine if a royalty has been claimed
     * @param period The payment period
     * @param beneficiary The address of the beneficiary
     * @returns The payment amount for the beneficiary in the specified period
     */
    getPaymentAmount(period: bigint, beneficiary: `0x${string}`): Promise<bigint>;
    /**
     * Get verifier module address
     * @returns The address of the verifier module contract
     */
    getVerifierModule(): Promise<`0x${string}`>;
    /**
     * Get Cultura treasury address
     * @returns The address of the Cultura treasury
     */
    getCulturaTreasury(): Promise<`0x${string}`>;
    /**
     * Get rights bound account asset address and token id
     * @returns The address of the parent bound account
     */
    getRightsBoundAccountAsset(): Promise<{
        assetAddress: `0x${string}`;
        tokenId: bigint;
    }>;
}

type RoyaltyInfoPeriod = {
    periodStart: bigint;
    periodEnd: bigint;
    amountDue: bigint;
    amountPaid: bigint;
    parentPendingClaims: bigint[];
};
/**
 * Enum for tracking the status of off-chain payments
 */
declare enum OffChainPaymentStatus {
    NONE = 0,
    PENDING = 1,
    ACCEPTED = 2,
    DENIED = 3
}
/**
 * Struct representing individual parent acceptance information
 */
type ParentAcceptanceInfo = {
    allocatedAmount: bigint;
    status: OffChainPaymentStatus;
    signature: `0x${string}`;
    timestamp: bigint;
};
/**
 * Struct representing off-chain payment details for a specific period (internal state)
 */
type OffChainPaymentInfo = {
    reportedAmount: bigint;
    metadata: string;
    reporter: `0x${string}`;
};

/**
 * Client for interacting with the Cultura Royalty System contract
 *
 * This client provides a reference implementation for managing and calculating royalty
 * distributions in the Cultura ecosystem. This module can be customized or replaced
 * to accommodate different royalty calculation needs.
 *
 * @remarks
 * Protocols can:
 * 1. Use this implementation as-is for basic royalty management
 * 2. Extend it with additional calculation logic
 * 3. Create their own royalty module with custom distribution rules
 * 4. Skip the royalty module entirely and interact directly with Rights Bound Accounts
 */
declare class RoyaltyClient {
    private readonly publicClient;
    private readonly walletClient;
    private readonly contractAddress;
    constructor(publicClient: PublicClient, walletClient: WalletClient, contractAddress: `0x${string}`);
    /**
     * Get the number of royalty info periods for a token
     * @param tokenId The ID of the token to get royalty period count for
     * @returns The number of royalty periods for the token
     */
    getRoyaltyInfoCount(tokenId: bigint): Promise<bigint>;
    /**
     * Get royalty info for a specific period
     * @param tokenId The ID of the token to get royalty period info for
     * @param index The index of the royalty period
     * @returns Detailed information about the royalty period
     */
    getRoyaltyInfoPeriod(tokenId: bigint, index: bigint): Promise<RoyaltyInfoPeriod>;
    /**
     * Register royalty due for a period
     * @param tokenId The ID of the token to register royalty for
     * @param amountDue The amount of royalty due for the period
     * @param startDate The start date of the royalty period (as Unix timestamp)
     * @param endDate The end date of the royalty period (as Unix timestamp)
     * @param royaltyInfoIndex The index of the royalty info
     * @returns Transaction hash
     *
     * @remarks
     * This is an optional step that protocols can use for tracking and transparency.
     * This function is part of the reference implementation and can be skipped if
     * protocols have their own royalty calculation mechanisms.
     */
    registerRoyaltyDue(tokenId: bigint, amountDue: bigint, startDate: bigint, endDate: bigint, royaltyInfoIndex: bigint): Promise<`0x${string}`>;
    /**
     * Register royalty due for a period on behalf of a third party
     * @param tokenId The ID of the token to register royalty for
     * @param amountDue The amount of royalty due for the period
     * @param startDate The start date of the royalty period (as Unix timestamp)
     * @param endDate The end date of the royalty period (as Unix timestamp)
     * @param royaltyInfoIndex The index of the royalty info
     * @param signature Signature authorizing the registration
     * @returns Transaction hash
     *
     */
    delegatedRegisterRoyaltyDue(tokenId: bigint, amountDue: bigint, startDate: bigint, endDate: bigint, royaltyInfoIndex: bigint, signature: `0x${string}`): Promise<`0x${string}`>;
    /**
     * Pay royalty for a period
     * @param tokenId The ID of the token to pay royalty for
     * @param amountPaid The amount of royalty being paid
     * @param periodIndex The index of the royalty period being paid
     * @param culturaBoundAccount The Cultura bound account address
     * @param signature Signature authorizing the payment
     * @returns Transaction hash
     *
     */
    payRoyalty(tokenId: bigint, amountPaid: bigint, periodIndex: bigint, culturaBoundAccount: `0x${string}`, signature: `0x${string}`): Promise<`0x${string}`>;
    /**
     * Pay royalty for a period on behalf of a third party
     * @param tokenId The ID of the token to pay royalty for
     * @param amountPaid The amount of royalty being paid
     * @param periodIndex The index of the royalty period being paid
     * @param culturaBoundAccount The Cultura bound account address
     * @param signature Signature authorizing the payment
     * @param delegatedSignature Signature authorizing the payment on behalf of a third party
     * @returns Transaction hash
     *
     */
    delegatedPayRoyalty(tokenId: bigint, amountPaid: bigint, periodIndex: bigint, culturaBoundAccount: `0x${string}`, signature: `0x${string}`, delegatedSignature: `0x${string}`): Promise<`0x${string}`>;
    /**
     * Report an off-chain payment for a royalty period
     * @param tokenId The ID of the token the payment is for
     * @param periodIndex The period index the payment applies to
     * @param amount The amount of the off-chain payment
     * @param metadata Additional information about the payment
     * @returns Transaction hash
     */
    reportOffChainPayment(tokenId: bigint, periodIndex: bigint, amount: bigint, metadata: string): Promise<`0x${string}`>;
    /**
     * Report an off-chain payment for a royalty period on behalf of a third party
     * @param tokenId The ID of the token the payment is for
     * @param periodIndex The period index the payment applies to
     * @param amount The amount of the off-chain payment
     * @param metadata Additional information about the payment
     * @param signature Signature authorizing the payment
     * @returns Transaction hash
     */
    delegatedReportOffChainPayment(tokenId: bigint, periodIndex: bigint, amount: bigint, metadata: string, signature: `0x${string}`): Promise<`0x${string}`>;
    /**
     * Accept an off-chain payment that was previously reported by a parent.
     * @param tokenId The ID of the token the payment is for
     * @param periodIndex The period index the payment applies to
     * @param parentBoundAccount The bound account address of the parent for payment processing
     * @param signature Signature from the parent's owner authorizing the acceptance against the parent's bound account.
     * @param signerAddress The address of the signer.
     * @param sponsorAddress The address of the sponsor.
     * @returns Transaction hash
     */
    acceptOffChainPaymentByParent(tokenId: bigint, periodIndex: bigint, parentBoundAccount: `0x${string}`, signature: `0x${string}`, signerAddress: `0x${string}`, sponsorAddress: `0x${string}`): Promise<`0x${string}`>;
    /**
     * Deny an off-chain payment that was previously reported by a parent.
     * @param tokenId The ID of the token the payment is for
     * @param periodIndex The period index the payment applies to
     * @param parentBoundAccount The bound account of the parent denying the payment.
     * @param signature Signature authorizing the denial.
     * @param signerAddress The address of the signer.
     * @returns Transaction hash
     */
    denyOffChainPaymentByParent(tokenId: bigint, periodIndex: bigint, parentBoundAccount: `0x${string}`, signature: `0x${string}`, signerAddress: `0x${string}`): Promise<`0x${string}`>;
    /**
     * Create a signature for an off-chain payment acceptance by a parent.
     * The signature is created for the `CulturaRightsBoundAccount` of the parent.
     * @param rightsBoundAccount The address of the parent's RightsBoundAccount.
     * @param totalAmount The total amount of the payment being accepted.
     * @param period The royalty period index.
     * @param sponsor The address sponsoring the transaction (usually the parent's owner).
     * @param chainId Optional chain ID for the signature domain.
     * @returns A promise that resolves to the payment signature.
     */
    signForAcceptOffChainPaymentByParent(rightsBoundAccount: `0x${string}`, totalAmount: bigint, period: bigint, sponsor: `0x${string}`): Promise<`0x${string}`>;
    /**
     * Generates a signature for delegated royalty registration
     * This allows a third party to register royalty due on behalf of the signer
     *
     * @param tokenId - The ID of the token to register royalty for
     * @param amountDue - The amount of royalty due for the period
     * @param startDate - The start date of the royalty period (as Unix timestamp)
     * @param endDate - The end date of the royalty period (as Unix timestamp)
     * @param royaltyInfoIndex - The index of the royalty info
     * @returns The signature that can be used for delegated royalty registration
     */
    signForDelegatedRegisterRoyaltyDue(tokenId: bigint, amountDue: bigint, startDate: bigint, endDate: bigint, royaltyInfoIndex: bigint): Promise<`0x${string}`>;
    /**
     * Generates a signature for delegated royalty payment
     * This allows a third party to pay royalty on behalf of the signer
     *
     * @param tokenId - The ID of the token to pay royalty for
     * @param amountDue - The amount of royalty being paid
     * @param royaltyInfoIndex - The index of the royalty period being paid
     * @returns The signature that can be used for delegated royalty payment
     */
    signForDelegatedPayRoyalty(tokenId: bigint, amountDue: bigint, royaltyInfoIndex: bigint): Promise<`0x${string}`>;
    /**
     * Generates signature for denying an off-chain payment by a parent.
     *
     * @param tokenId - The ID of the token the payment is for
     * @param periodIndex - The period index of the royalty payment
     * @param parentBoundAccount - The bound account of the parent denying the payment.
     * @returns Signature for denying the off-chain payment
     */
    signForDenyOffChainPaymentByParent(tokenId: bigint, periodIndex: bigint, parentBoundAccount: `0x${string}`): Promise<`0x${string}`>;
    /**
     * Generates a signature for delegated off-chain royalty payment
     * This allows a third party to pay royalty on behalf of the signer
     *
     * @param tokenId - The ID of the token to pay royalty for
     * @param amountDue - The amount of royalty being paid
     * @param royaltyInfoIndex - The index of the royalty period being paid
     * @returns The signature that can be used for delegated royalty payment
     */
    signForDelegatedOffchainReportRoyalty(tokenId: bigint, royaltyInfoIndex: bigint, amount: bigint): Promise<`0x${string}`>;
    /**
     * Generates a signature for delegated acceptance of an off-chain payment
     * This allows a third party to accept an off-chain payment on behalf of the signer
     *
     * @param tokenId - The ID of the token to accept the off-chain payment for
     * @param royaltyInfoIndex - The index of the royalty period being accepted
     * @returns The signature that can be used for delegated acceptance of an off-chain payment
     */
    signForDelegatedOffchainAcceptRoyalty(tokenId: bigint, royaltyInfoIndex: bigint): Promise<`0x${string}`>;
    /**
     * Generates signature parameters required for delegated operations
     *
     * @param signature - The signed message signature
     * @param signerAddress - The address of the signer
     * @returns Signature parameters object with signature, signer, v, r, and s values
     */
    generateSignatureParams(signature: `0x${string}`, signerAddress: `0x${string}`): {
        signature: `0x${string}`;
        signer: `0x${string}`;
        v: number;
        r: `0x${string}`;
        s: `0x${string}`;
    };
    getParentAcceptanceInfo(tokenId: bigint, periodIndex: bigint, parentBoundAccount: `0x${string}`): Promise<ParentAcceptanceInfo>;
    /**
     * Get information about an off-chain payment
     * @param tokenId The ID of the token to check
     * @param periodIndex The period index to check
     * @returns Information about the off-chain payment
     */
    getOffChainPaymentInfo(tokenId: bigint, periodIndex: bigint): Promise<OffChainPaymentInfo>;
    /**
     * Get all parent acceptance information for an off-chain payment
     * @param tokenId The ID of the token to check
     * @param periodIndex The period index to check
     * @param culturaDigitalAssetAddress The address of the Cultura Digital Asset contract
     * @returns Array of parent acceptance info with their bound account addresses
     */
    getAllParentAcceptanceInfo(tokenId: bigint, periodIndex: bigint, culturaDigitalAssetAddress: `0x${string}`): Promise<Array<{
        parentBoundAccount: `0x${string}`;
        acceptanceInfo: ParentAcceptanceInfo;
    }>>;
    /**
     * Get the full royalty information for a token
     * @param tokenId The ID of the token to get all royalty info for
     * @returns Array of royalty info periods
     */
    getFullRoyaltyInfo(tokenId: bigint): Promise<Array<RoyaltyInfoPeriod>>;
}

/**
 * Client for interacting with the SignatureUtils contract
 *
 * @group Signature Utils
 */
declare class SignatureUtilsClient {
    private readonly publicClient;
    private readonly contractAddress;
    constructor(publicClient: PublicClient, contractAddress: `0x${string}`);
    /**
     * Get the delegated self attest typehash
     */
    getDelegatedSelfAttestTypeHash(): Promise<Hex>;
}

/**
 * Client for interacting with the Bond Token (ERC20) contract
 *
 * Provides an interface for interacting with ERC20 tokens used for bonding in self-attestations
 * and other platform functions. This client handles token operations like approvals and balance checks,
 * with a test-only minting function.
 *
 * @remarks
 * Token approvals are required before any operation that needs to transfer tokens
 * (self-attestation, endorsements, etc.)
 *
 * @group Bond Token
 */
declare class BondTokenClient {
    private readonly publicClient;
    private readonly walletClient;
    private readonly contractAddress;
    constructor(publicClient: PublicClient, walletClient: WalletClient, contractAddress: `0x${string}`);
    /**
     * Mints new bond tokens to a specified account (only for testing)
     * @param account Address that will receive the minted tokens
     * @param amount Amount of tokens to mint
     * @returns Transaction hash
     *
     * @remarks
     * This function is only available on test networks. In production/mainnet,
     * tokens must be acquired through proper channels (exchanges, transfers, etc).
     */
    mint(account: `0x${string}`, amount: bigint): Promise<`0x${string}`>;
    /**
     * Approves an address to spend tokens on behalf of the caller
     * @param spender Address that will be approved to spend tokens
     * @param amount Amount of tokens to approve
     * @returns Transaction hash
     *
     * @example
     * ```typescript
     * // Approve tokens for self-attestation
     * const bondAmount = parseEther('0.0001');
     * await sdk.bondToken.approve(attestationServiceAddress, bondAmount);
     * ```
     */
    approve(spender: `0x${string}`, amount: bigint): Promise<`0x${string}`>;
    /**
     * Gets the balance of an account
     * @param account Address to check balance of
     * @returns Balance of the account
     *
     * @example
     * ```typescript
     * // Check account balance
     * const balance = await sdk.bondToken.balanceOf(userAddress);
     * ```
     */
    balanceOf(account: `0x${string}`): Promise<bigint>;
    /**
     * Gets the allowance of an account to spend another account's tokens
     * @param owner Address of the token owner
     * @param spender Address of the token spender
     * @returns Amount of tokens the spender is allowed to spend
     *
     * @example
     * ```typescript
     * // Check if contract has enough allowance
     * const currentAllowance = await sdk.bondToken.allowance(userAddress, contractAddress);
     * if (currentAllowance < requiredAmount) {
     *   await sdk.bondToken.approve(contractAddress, requiredAmount);
     * }
     * ```
     */
    allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint>;
}

type SupportedChainIds = 1 | 26156 | 61892;
/**
 * Represents the different chain environments supported by Cultura
 */
type CulturaChainType = 'local' | 'devnet' | 'testnet';
interface CulturaConfig {
    transport?: Transport;
    /**
     * Chain identifier. Can be either a chain name ('local', 'devnet', 'testnet')
     * or a chain ID number.
     */
    chain?: CulturaChainType | number;
    wallet?: WalletClient;
    account?: Account$1 | Address;
    /**
     * Optional contract addresses. If not provided, addresses will be determined based on the chain.
     * You can provide specific addresses to override the default ones for your chain.
     */
    contracts?: {
        attestationService?: Address;
        schemaRegistry?: Address;
        culturaDigitalAsset?: Address;
        royaltyModule?: Address;
        signatureUtils?: Address;
        bondToken?: Address;
        mockLicensingProtocol?: Address;
        verifierModule?: Address;
        POP?: Address;
    };
}
type ContractAddresses = Required<NonNullable<CulturaConfig['contracts']>>;
type SmartWalletClientType = NonNullable<ReturnType<(typeof _privy_io_react_auth_smart_wallets)['useSmartWallets']>['client']>;

type SelfAttestParams = {
    request: AttestationRequest;
    nftAddress: Address;
    nftId: bigint;
    grade: bigint;
    amount: bigint;
};
type DelegatedSelfAttestParams = SelfAttestParams & {
    delegatedSignature: SignatureParams;
    verifier: Address;
};
type VerifyAttestationParams = {
    attestationUID: Address;
    bondedAmount: bigint;
};
type ChallengeAttestationParams = {
    request: {
        attestation: Address;
        data: AttestationRequest['data'] & {
            value: bigint;
        };
    };
    challengeAmount: bigint;
};
type SelfAttestResponse = TransactionResponse & {
    attestationId?: string;
};
type VerifyAttestationResponse = TransactionResponse & {
    verificationId?: string;
};
type ChallengeAttestationResponse = TransactionResponse & {
    challengeId?: string;
};

type DigitalAssetLevel = {
    active: boolean;
    minTokensLocked: bigint;
    minVerifiers: bigint;
    minCouncilVerifiers: bigint;
};
type Grade = {
    name: string;
    fee: bigint;
    requiredTokens: bigint;
    requiredWLVerifiers: bigint;
    requiredCommunityVerifiers: bigint;
};
type SetLevelParams = {
    level: number;
    levelData: DigitalAssetLevel;
};
type UpdateLevelParams = SetLevelParams;
type DeactivateLevelParams = {
    level: number;
};
type WithdrawBondTokenParams = {
    amount: bigint;
};
type SetLevelResponse = TransactionResponse;
type UpdateLevelResponse = TransactionResponse;
type DeactivateLevelResponse = TransactionResponse;
type WithdrawBondTokenResponse = TransactionResponse & {
    amount?: bigint;
};

/**
 * Types for DigitalAsset from the subgraph
 */
type DigitalAsset = {
    id: string;
    contractAddress: string;
    tokenId: string;
    owner: Account;
    mintedAt: string;
    tokenURI?: string | null;
    termsURI?: string | null;
    verifiedRights?: VerifiedRights;
    isLicensedAsset: boolean;
    parentDigitalAssets?: ParentDigitalAssetEntity[];
    metadata?: DigitalAssetMetadata;
    rightsBoundAccount?: string;
};
/**
 * Types for DigitalAssetMetadata from the subgraph
 */
type DigitalAssetMetadata = {
    id: string;
    name?: string;
    description?: string;
    image?: string;
    externalURL?: string;
};
/**
 * Types for VerifiedRights from the subgraph
 */
type VerifiedRights = {
    id: string;
    digitalAssetAddress: string;
    digitalAssetId: string;
    attestationUID: string;
    owner: string;
    assetClass: string;
    initialBondAmount: string;
    currentBondAmount: string;
    verifierCount: string;
    createdAt: string;
    updatedAt: string;
    isVerified: boolean;
    whitelistedVerifierCount: string;
    communityVerifierCount: string;
    verifications: Verification[];
    digitalAsset?: DigitalAsset;
    rightsBoundAccount?: string;
};
/**
 * Types for Verification from the subgraph
 */
interface Verification {
    id: string;
    verifier: {
        id: string;
        address: string;
        totalBondAmount: string;
        verificationCount: string;
        isWhitelisted: boolean;
    };
    verifiedRights: {
        id: string;
    };
    bondAmount: string;
    timestamp: string;
}
/**
 * Types for Account from the subgraph
 */
interface Account {
    id: string;
    address: string;
    tokenCount: string;
}
/**
 * Query response types
 */
interface DigitalAssetsResponse {
    digitalAssets: DigitalAsset[];
}
interface DigitalAssetResponse {
    digitalAsset: DigitalAsset;
}
/**
 * Query response types for verifiedRights endpoints
 */
interface VerifiedRightsResponse {
    [key: string]: VerifiedRights[];
}
interface VerifiedRightsItemResponse {
    [key: string]: VerifiedRights;
}
interface AccountResponse {
    account: Account;
}
interface AccountsResponse {
    accounts: Account[];
}
/**
 * Types for ParentDigitalAsset from the subgraph using Entity suffix to avoid collection with onchain type
 */
type ParentDigitalAssetEntity = {
    id: string;
    parentCollection: string;
    parentDigitalAssetId: string;
    owner: string;
    rightsBoundAccount?: string;
    royaltySplit: string;
};
/**
 * Types for ProofOfPopularity from the subgraph
 */
type ProofOfPopularity = {
    id: string;
    totalVotedAmount: string;
    popularityScore: string;
    isTopAttestation: boolean;
    topAttestationRank?: number;
    topAttestationScore?: string;
    userVotes?: POPUserVote[];
};
/**
 * Types for POPUserVote from the subgraph
 */
type POPUserVote = {
    id: string;
    user: string;
    amount: string;
    unlockTime?: string;
    attestation?: ProofOfPopularity;
};
/**
 * Query response types for Proof of Popularity endpoints
 */
interface ProofOfPopularitiesResponse {
    popAttestations: ProofOfPopularity[];
}
interface ProofOfPopularityResponse {
    popAttestation: ProofOfPopularity;
}
/**
 * Query response types for POP user votes endpoints
 */
interface POPUserVotesResponse {
    popUserVotes: POPUserVote[];
}
interface POPUserVoteResponse {
    popUserVote: POPUserVote;
}

/**
 * Client for the Mock Licensing Protocol contract.
 * Used for testing and development purposes on Cultura testnets.
 *
 * This client interacts with a mock contract that simulates the actions a real
 * licensing protocol might take. It allows developers to test the end-to-end flow
 * of licensing a Level 2 asset and creating/verifying a Licensed Creative Asset
 * without needing a fully functional external protocol.
 * @remarks
 * This client is for testing and demonstration purposes only.
 * Should not be used in production environments.
 */
declare class MockLicensingProtocolClient {
    private readonly publicClient;
    private readonly walletClient;
    private readonly contractAddress;
    private readonly culturaDigitalAssetAddress;
    private readonly attestationServiceAddress;
    private readonly chainType;
    private attestationServiceClient;
    private culturaDigitalAssetClient;
    private queryClient;
    constructor(publicClient: PublicClient, walletClient: WalletClient, contractAddress: `0x${string}`, culturaDigitalAssetAddress: `0x${string}`, attestationServiceAddress: `0x${string}`, chainType: CulturaChainType);
    /**
     * Simulate registering a token ID as licensed within the mock protocol.
     * @param collectionAddress The address of the collection that the token is licensed from
     * @param tokenId The ID of the token to license
     * @returns Transaction hash
     *
     * @remarks
     * This method simulates the action of a licensing protocol granting a license
     * for a specific parent token. It records this "license granted" status within
     * the mock contract's state for the given `collectionAddress` and `tokenId`.
     *
     * This should typically be called _before_ minting the Licensed Creative Asset.
     * It represents securing the rights needed for the next step.
     *
     * In a real-world scenario, this step would involve interacting with an actual
     * licensing protocol, potentially involving off-chain agreements, payments,
     * and specific license term negotiations.
     *
     * @example
     * ```typescript
     * // License an existing token
     * const collectionAddress = "0xcollection123...";
     * const tokenId = BigInt(42);
     *
     * const txHash = await mockLicensingClient.licenseDigitalAsset(
     *   collectionAddress,
     *   tokenId
     * );
     *
     * console.log(`Token licensed with transaction: ${txHash}`);
     * ```
     */
    licenseDigitalAsset(collectionAddress: `0x${string}`, tokenId: bigint): Promise<`0x${string}`>;
    /**
     * Simulate verifying the attestation of a Licensed Creative Asset.
     * @param attestationUID The attestation UID to verify
     * @param bondedAmount The amount to bond for verification
     * @returns Transaction hash
     *
     * @remarks
     * This method simulates a licensing protocol performing a verification check on an
     * _attestation_ associated with a Licensed Creative Asset. It takes the
     * `attestationUID` (obtained after calling `sdk.attestationService.attest` on the
     * _new_ Licensed Creative Asset) and a `bondAmount`.
     *
     * In the context of the mock protocol, this function likely interacts with the main
     * `CAS.verifyAttestation` function, effectively acting as a verifier endorsing the
     * new asset's attestation. It represents the final step where the licensing body
     * confirms the validity of the newly created and attested licensed asset.
     *
     * The `bondedAmount` is used for the underlying CAS verification.
     *
     * @example
     * ```typescript
     * // Verify a licensed asset
     * const attestationUID = "0xattestation123...";
     * const bondAmount = BigInt("500000000000000000"); // 0.5 tokens
     *
     * const txHash = await mockLicensingClient.verifyLicensedAsset(
     *   attestationUID,
     *   bondAmount
     * );
     *
     * console.log(`Asset verification initiated with transaction: ${txHash}`);
     * ```
     */
    verifyLicensedAsset(attestationUID: `0x${string}`, bondedAmount: bigint): Promise<`0x${string}`>;
    /**
     * Get licensed tokens for a specific address.
     * @param address The address to check licensed tokens for
     * @returns Array of licensed tokens with their collection addresses and token IDs
     */
    getLicensedTokens(address: `0x${string}`): Promise<Array<{
        collectionAddress: `0x${string}`;
        tokenId: bigint;
    }>>;
    /**
     * Check if a specific address has licensed a specific token.
     * @param address The address to check
     * @param collectionAddress The collection address to check
     * @param tokenId The token ID to check
     * @returns Boolean indicating whether the address has licensed the token
     */
    isTokenLicensedByAddress(address: `0x${string}`, collectionAddress: `0x${string}`, tokenId: bigint): Promise<boolean>;
    /**
     * Check if a token is properly licensed by the current wallet
     * @param collectionAddress The collection address to check
     * @param tokenId The token ID to check
     * @returns Boolean indicating whether the token is properly licensed by the current wallet
     */
    isLicensedToken(collectionAddress: `0x${string}`, tokenId: bigint): Promise<boolean>;
    /**
     * Check if a Rights Bound Account corresponds to a verified asset
     * @param rightsBoundAccount The Rights Bound Account address to check
     * @returns Boolean indicating whether the RBA corresponds to a verified asset
     *
     * @remarks
     * This method uses the RightsBoundAccountClient to get the associated
     * digital asset information, then checks the on-chain verification level.
     * This approach is more reliable than depending on subgraph indexing.
     */
    isRightsBoundAccountVerified(rightsBoundAccount: `0x${string}`): Promise<boolean>;
    /**
     * (Convenience Function) Create and attest a Licensed Creative Asset in one step.
     * This method allows for creation of licenses for both Cultura and external NFTs.
     *
     * @param licensedAssetDetails License details including name, description, and terms
     * @param licenseeSignature The licensee's signature validating acceptance of terms
     * @param schemaUID Schema UID to use for the attestation
     * @param bondAmount Amount to bond for the attestation (defaults to 1.1 tokens in wei)
     * @param assetClass The asset class assigned to this license (higher means more permissions)
     * @param parentRights Array of parent rights information for derivative works
     * @param externalNFT Optional information about an external NFT being licensed
     * @param termsURI Optional URI pointing to the terms document (defaults to the imageUrl or a dummy value)
     * @returns Object containing the newly created asset details, attestation info, and compliance status
     *
     * @remarks
     * **Note:** This is a **convenience function** specific to the mock protocol that
     * combines the minting and attestation steps for a Licensed Creative Asset.
     * **Crucially, it requires that `licenseDigitalAsset` has already been called**
     * for each parent asset involved to register the license grant within the mock contract.
     * This function *checks* for that pre-existing license state; it does *not* perform
     * the initial licensing simulation itself.
     *
     * For a clearer understanding of the individual protocol interactions, refer to the
     * step-by-step flow:
     * 1. `licenseDigitalAsset` (for each parent)
     * 2. `sdk.culturaDigitalAsset.mintDigitalAsset`
     * 3. `sdk.attestationService.attest`
     *
     * This function performs the following actions:
     * 1. **Checks** if a license has been registered for the parent asset(s) via prior
     *    calls to `licenseDigitalAsset` for the current wallet address.
     * 2. Mints a new **Licensed Creative Asset** NFT via the `CulturaDigitalAsset` contract,
     *    linking it to the parents.
     * 3. Immediately creates an **attestation** for the _newly minted_ asset via the `CAS`
     *    contract, using the provided `licenseeSignature`, `schemaUID`, `bondAmount`, and `assetClass`.
     * 4. Returns the `licensedAssetId` (the tokenId of the new asset) and `attestationInfo`
     *    (including the `attestationUid`).
     *
     * It includes transaction state tracking (`transactionState`) to indicate success or failure.
     * Use the `externalNFT` parameter if the license pertains to an asset outside the
     * Cultura `CulturaDigitalAsset` contract.
     *
     * @example
     * ```typescript
     * // Create a license for a derivative work
     * const result = await mockLicensingClient.createLicensedAsset(
     *   {
     *     name: "Derivative Artwork License",
     *     description: "License for derivative work based on CryptoKitty #123",
     *     imageUrl: "https://example.com/license-image.jpg"
     *   },
     *   {
     *     // Licensee signature details
     *     signer: "0xabc...",
     *     signature: "0x123...",
     *     deadline: BigInt(Date.now() + 3600000) // 1 hour from now
     *   },
     *   "0xschema123...", // Schema UID
     *   BigInt("1100000000000000000"), // 1.1 tokens bond amount
     *   BigInt(2), // Asset class 2
     *   [
     *     {
     *       rightsBoundAccount: "0xRightsBoundAccount...",
     *       royaltySplit: BigInt(10) // 10% royalty split
     *     }
     *   ]
     * );
     *
     * console.log(`New licensed asset created with ID: ${result.licensedAssetId}`);
     * console.log(`Attestation UID: ${result.attestationInfo.attestationUid}`);
     * ```
     */
    createLicensedAsset(licensedAssetDetails: {
        name: string;
        description: string;
        imageUrl?: string;
    }, licenseeSignature: SignatureParams, schemaUID: `0x${string}`, bondAmount: bigint | undefined, // Default 1.1 tokens in wei
    classId: bigint, parentRights: readonly ParentInfo[], externalNFT?: {
        collection: `0x${string}`;
        tokenId: bigint;
        owner: `0x${string}`;
    }, termsURI?: string): Promise<{
        licensedAssetId: bigint;
        attestationInfo: {
            attestationUid: `0x${string}`;
            rightsBoundAccount: `0x${string}`;
        };
        transactionState: 'complete' | 'failed';
    }>;
    /**
     * Get assets with verified rights.
     * @param limit Optional limit for the number of results to return (defaults to 20)
     * @param offset Optional offset for pagination (defaults to 0)
     * @returns Object containing an array of verified assets and the total count.
     *
     * @remarks
     * This method uses the query system to retrieve digital assets that have been
     * verified (e.g., reached a certain level or status within the protocol).
     * The method returns details about each asset including its tokenId, name,
     * description, collection address, owner, attestation UID, and assetClass.
     *
     * Verified assets are those that have successfully passed the verification process,
     * meaning they comply with all licensing terms of their parent assets (if applicable).
     * These assets can potentially be used as parent assets for further derivative works,
     * depending on the protocol rules.
     *
     * @example
     * ```typescript
     * // Get verified licensed assets with pagination
     * const result = await mockLicensingClient.getVerifiedLicensedAssets(10, 0);
     *
     * console.log(`Found ${result.total} verified assets`);
     *
     * // Display the assets
     * result.assets.forEach(asset => {
     *   console.log(`Asset ID: ${asset.tokenId}`);
     *   console.log(`Name: ${asset.name}`);
     *   console.log(`Owner: ${asset.owner}`);
     * });
     * ```
     */
    getVerifiedLicensedAssets(limit?: number, offset?: number): Promise<{
        assets: DigitalAsset[];
        total: number;
    }>;
}

/**
 * Client for interacting with the VerifierModule contract
 * Manages reward distribution to verifiers based on their bonded tokens for verified rights
 */
declare class VerifierModuleClient {
    private readonly publicClient;
    private readonly walletClient;
    private readonly contractAddress;
    constructor(publicClient: PublicClient, walletClient: WalletClient, contractAddress: `0x${string}`);
    /**
     * Distributes rewards from the bound account to the verifier module
     * @param digitalAssetAddress The address of the digital asset contract
     * @param digitalAssetId The token ID of the digital asset
     * @param boundAccount The address of the CulturaRightsBoundAccount
     * @param period The payment period to claim from
     * @returns Transaction hash
     */
    distributeRewards(digitalAssetAddress: `0x${string}`, digitalAssetId: bigint, boundAccount: `0x${string}`, period: bigint): Promise<`0x${string}`>;
    /**
     * Allows a verifier to claim their rewards for a specific verified right
     * @param digitalAssetAddress The address of the digital asset contract
     * @param digitalAssetId The token ID of the digital asset
     * @returns Transaction hash
     */
    claimRewards(digitalAssetAddress: `0x${string}`, digitalAssetId: bigint): Promise<`0x${string}`>;
    /**
     * Calculate the claimable rewards for a verifier for a specific verified right
     * @param digitalAssetAddress The address of the digital asset contract
     * @param digitalAssetId The token ID of the digital asset
     * @param verifier The address of the verifier
     * @returns The amount of tokens the verifier can claim
     */
    calculateClaimableRewards(digitalAssetAddress: `0x${string}`, digitalAssetId: bigint, verifier: `0x${string}`): Promise<bigint>;
    /**
     * Get the amount of tokens a verifier has bonded for a specific verified right
     * @param digitalAssetAddress The address of the digital asset contract
     * @param digitalAssetId The token ID of the digital asset
     * @param verifier The address of the verifier
     * @returns The amount of tokens bonded by the verifier
     */
    getVerifierBond(digitalAssetAddress: `0x${string}`, digitalAssetId: bigint, verifier: `0x${string}`): Promise<bigint>;
    /**
     * Get the total amount of tokens bonded for a specific verified right
     * @param digitalAssetAddress The address of the digital asset contract
     * @param digitalAssetId The token ID of the digital asset
     * @returns The total amount of tokens bonded for the verified right
     */
    getTotalBondedAmount(digitalAssetAddress: `0x${string}`, digitalAssetId: bigint): Promise<bigint>;
    /**
     * Get the total rewards (collected fees) for a specific verified right
     * @param digitalAssetAddress The address of the digital asset contract
     * @param digitalAssetId The token ID of the digital asset
     * @returns The total amount of rewards accumulated for the verified right
     */
    getTotalRewards(digitalAssetAddress: `0x${string}`, digitalAssetId: bigint): Promise<bigint>;
    /**
     * Manually send fees to the verifier module for a specific verified right
     * @param digitalAssetAddress The address of the digital asset contract
     * @param digitalAssetId The token ID of the digital asset
     * @param amount The amount of fees to send
     * @param sender The address of the sender
     * @returns Transaction hash
     */
    receiveFees(digitalAssetAddress: `0x${string}`, digitalAssetId: bigint, amount: bigint, sender: `0x${string}`): Promise<`0x${string}`>;
    /**
     * Allows a verifier to bond tokens for a specific digital asset
     * @param digitalAssetAddress The address of the digital asset contract
     * @param digitalAssetId The token ID of the digital asset
     * @param amount The amount of tokens to bond
     * @returns Transaction hash
     */
    bondTokens(digitalAssetAddress: `0x${string}`, digitalAssetId: bigint, amount: bigint): Promise<`0x${string}`>;
}

/**
 * Methods for querying digital assets from The Graph
 *
 * The DigitalAssetMethods class provides specialized queries for retrieving digital asset
 * data from The Graph subgraph. These methods allow efficient read-only access to digital
 * asset data without requiring direct blockchain calls, which improves performance and
 * reduces costs.
 *
 * @group Query
 */
declare class DigitalAssetMethods {
    private client;
    constructor(client: QueryClientInterface);
    /**
     * Get a digital asset by unique asset ID
     *
     * @param uid The ID of the digital asset
     * @returns The digital asset data or null if not found
     *
     * @example
     * ```typescript
     * // Get a digital asset by its UID
     * const asset = await queryClient.digitalAsset.getByUID("1")
     * if (asset) {
     *   console.log(`Found asset: ${asset.assetName}`)
     *   console.log(`Owner: ${asset.owner.address}`)
     * } else {
     *   console.log("Asset not found")
     * }
     * ```
     *
     * @remarks
     * This method fetches a single digital asset by its unique asset ID. It returns null if no matching
     * asset is found. The response includes detailed information about the asset, including
     * its metadata, ownership, and any associated verified rights.
     */
    getByUID(uid: string): Promise<DigitalAsset | null>;
    /**
     * Get a digital asset by its contract address and token ID
     *
     * @param contractAddress The contract address of the digital asset
     * @param tokenId The token ID of the digital asset
     * @returns The digital asset data or null if not found
     *
     * @example
     * ```typescript
     * // Get a digital asset by its contract address and token ID
     * const asset = await queryClient.digitalAsset.getByContractAndTokenId("0x123...", "1")
     * if (asset) {
     *   console.log(`Found asset: ${asset.metadata?.name}`)
     * } else {
     *   console.log("Asset not found")
     * }
     * ```
     */
    getByContractAndTokenId(contractAddress: string, tokenId: bigint): Promise<DigitalAsset | null>;
    /**
     * Get digital assets owned by a specific address
     *
     * @param ownerAddress The owner's address
     * @param first Number of items to fetch (default: 100)
     * @param skip Number of items to skip (default: 0)
     * @returns Array of digital assets
     *
     * @example
     * ```typescript
     * // Get all digital assets owned by an address
     * const assets = await queryClient.digitalAsset.getByOwner("0x123...789")
     * console.log(`Found ${assets.length} assets owned by this address`)
     *
     * // With pagination
     * const firstPage = await queryClient.digitalAsset.getByOwner("0x123...789", 10, 0)
     * const secondPage = await queryClient.digitalAsset.getByOwner("0x123...789", 10, 10)
     *
     * // Display asset names
     * assets.forEach(asset => {
     *   console.log(`Asset: ${asset.assetName || "Unnamed asset"} (ID: ${asset.tokenId})`)
     * })
     * ```
     *
     * @remarks
     * This method returns all digital assets owned by a specific address. The address must be
     * a valid Ethereum address. Results can be paginated using the first and skip parameters.
     * This is particularly useful for creating user dashboards or galleries showing all assets
     * owned by a particular user.
     */
    getByOwner(ownerAddress: string, first?: number, skip?: number): Promise<DigitalAsset[]>;
    /**
     * Get licensed assets derived from a parent asset
     *
     * @param parentAssetId The parent asset ID
     * @param parentAssetAddress The parent asset contract address
     * @param first Number of items to fetch (default: 100)
     * @param skip Number of items to skip (default: 0)
     * @returns Array of digital assets
     *
     * @example
     * ```typescript
     * // Get licensed assets derived from a parent asset
     * const assets = await queryClient.digitalAsset.getLicensedAssets(
     *   "1", // parent asset ID
     *   "0x456...789" // parent asset contract address
     * )
     * console.log(`Found ${assets.length} licensed assets derived from this parent`)
     *
     * // Display license information
     * assets.forEach(asset => {
     *   console.log(`Licensed asset: ${asset.metadata?.name} (ID: ${asset.tokenId})`)
     *   console.log(`Parent asset details: ${asset.parentDigitalAssets?.[0]?.parentCollection}`)
     * })
     * ```
     *
     * @remarks
     * This method returns all licensed assets that were derived from a specific parent asset.
     * This is useful for tracking all licensing activity for a given intellectual property.
     * For example, you can use this to see all derivative works that have been properly
     * licensed from an original creation. The parent asset address must be a valid Ethereum address.
     */
    getLicensedAssets(parentAssetId: string, parentAssetAddress: string, first?: number, skip?: number): Promise<DigitalAsset[]>;
    /**
     * Get all digital assets
     *
     * @param first Number of items to fetch (default: 100)
     * @param skip Number of items to skip (default: 0)
     * @returns Array of digital assets
     *
     * @example
     * ```typescript
     * // Get the first 10 digital assets
     * const assets = await queryClient.digitalAsset.getAll(10, 0)
     * console.log(`Retrieved ${assets.length} digital assets`)
     *
     * // Iterate through pages of results
     * let allAssets = []
     * let pageSize = 50
     * let currentPage = 0
     *
     * while (true) {
     *   const batch = await queryClient.digitalAsset.getAll(pageSize, currentPage * pageSize)
     *   if (batch.length === 0) break
     *   allAssets = [...allAssets, ...batch]
     *   currentPage++
     * }
     * console.log(`Total digital assets collected: ${allAssets.length}`)
     * ```
     *
     * @remarks
     * This method returns all digital assets in the system, ordered by mint date (newest first).
     * Use pagination parameters to efficiently handle large result sets. This query is useful
     * for creating explorers or galleries that display all assets in the system. For large
     * collections, it's recommended to use pagination to improve performance and user experience.
     */
    getAll(first?: number, skip?: number): Promise<DigitalAsset[]>;
}

/**
 * Methods for querying verified rights from The Graph
 *
 * The VerifiedRightsMethods class provides specialized queries for retrieving verified rights
 * data from The Graph subgraph. These methods allow you to efficiently access rights
 * attestation data without making direct blockchain calls.
 *
 * @group Query
 */
declare class VerifiedRightsMethods {
    private client;
    private readonly SINGLE;
    private readonly COLLECTION;
    constructor(client: QueryClientInterface);
    /**
     * Get verified rights by ID
     *
     * @param id The ID of the verified rights
     * @returns The verified rights data or null if not found
     *
     * @example
     * ```typescript
     * // Get verified rights by ID
     * const rights = await queryClient.verifiedRights.getById("1")
     * if (rights) {
     *   console.log(`Found verified rights with asset class ${rights.assetClass}`)
     * } else {
     *   console.log("No verified rights found with that ID")
     * }
     * ```
     *
     * @remarks
     * This method fetches a single verified rights entry by its ID. It returns null if no
     * matching rights are found. The ID is typically a unique identifier generated when
     * the rights are created through attestation.
     */
    getById(id: string): Promise<VerifiedRights | null>;
    /**
     * Get verified rights by digital asset info
     *
     * @param assetAddress The address of the digital asset contract
     * @param assetId The ID of the digital asset
     * @returns The verified rights data or null if not found
     *
     * @example
     * ```typescript
     * // Get verified rights for a specific digital asset
     * const rights = await queryClient.verifiedRights.getByDigitalAsset(
     *   "0x1234567890abcdef1234567890abcdef12345678",
     *   "42"
     * )
     *
     * if (rights) {
     *   console.log(`Asset verified with asset class ${rights.assetClass} and ${rights.verifierCount} verifiers`)
     * } else {
     *   console.log("No verified rights found for this asset")
     * }
     * ```
     *
     * @remarks
     * This method allows you to find the verified rights associated with a specific digital asset.
     * It's useful when you know the asset's contract address and token ID, and want to check if
     * it has been attested and what asset class it received. The method validates that the provided
     * address has the correct format.
     */
    getByDigitalAsset(assetAddress: string, assetId: string): Promise<VerifiedRights | null>;
    /**
     * Get verified rights by owner
     *
     * @param ownerAddress The owner's address
     * @param first Number of items to fetch (default: 100)
     * @param skip Number of items to skip (default: 0)
     * @returns Array of verified rights
     *
     * @example
     * ```typescript
     * // Get all verified rights owned by an address
     * const rights = await queryClient.verifiedRights.getByOwner("0x123...789")
     * console.log(`Found ${rights.length} verified rights owned by this address`)
     *
     * // With pagination
     * const firstPage = await queryClient.verifiedRights.getByOwner("0x123...789", 10, 0)
     * const secondPage = await queryClient.verifiedRights.getByOwner("0x123...789", 10, 10)
     * ```
     *
     * @remarks
     * This method returns all verified rights entries owned by a specific address. The address
     * must be a valid Ethereum address. Results are ordered by creation date (newest first)
     * and can be paginated using the first and skip parameters. This is useful for creating
     * user dashboards that show all assets a user has had verified.
     */
    getByOwner(ownerAddress: string, first?: number, skip?: number): Promise<VerifiedRights[]>;
    /**
     * Get verified rights by asset class
     *
     * @param assetClass The asset class to filter by (e.g. "0", "1", "2", "3")
     * @param first Number of items to fetch (default: 100)
     * @param skip Number of items to skip (default: 0)
     * @returns Array of verified rights
     *
     * @example
     * ```typescript
     * // Get all verified rights with a specific asset class
     * const generalClassRights = await queryClient.verifiedRights.getByAssetClass("0")
     * console.log(`Found ${generalClassRights.length} General class verified rights`)
     *
     * // Get different asset classes for comparison
     * const class1Rights = await queryClient.verifiedRights.getByAssetClass("1")
     * const class2Rights = await queryClient.verifiedRights.getByAssetClass("2")
     * ```
     *
     * @remarks
     * This method returns all verified rights with a specific asset class. Currently, there is only
     * the general class (0=General) available. This function is designed for future use when
     * additional asset classes are added, each with their own specific requirements for
     * verification. This query will be useful for filtering assets by their asset class.
     */
    getByAssetClass(assetClass: string, first?: number, skip?: number): Promise<VerifiedRights[]>;
    /**
     * Get all verified rights
     *
     * @param first Number of items to fetch (default: 100)
     * @param skip Number of items to skip (default: 0)
     * @returns Array of verified rights
     *
     * @example
     * ```typescript
     * // Get the first 10 verified rights
     * const rights = await queryClient.verifiedRights.getAll(10, 0)
     * console.log(`Retrieved ${rights.length} verified rights`)
     *
     * // Iterate through pages of results
     * let allRights = []
     * let pageSize = 50
     * let currentPage = 0
     *
     * while (true) {
     *   const batch = await queryClient.verifiedRights.getAll(pageSize, currentPage * pageSize)
     *   if (batch.length === 0) break
     *   allRights = [...allRights, ...batch]
     *   currentPage++
     * }
     * console.log(`Total verified rights collected: ${allRights.length}`)
     * ```
     *
     * @remarks
     * This method returns all verified rights in the system, ordered by creation date (newest first).
     * Use pagination parameters to efficiently handle large result sets. This query is useful for
     * creating explorers or dashboards that display all verified rights in the system. For large
     * datasets, it's recommended to use pagination to improve performance and user experience.
     */
    getAll(first?: number, skip?: number): Promise<VerifiedRights[]>;
    /**
     * Get verified rights that have been successfully verified (isVerified = true)
     *
     * @param first Number of items to fetch (default: 100)
     * @param skip Number of items to skip (default: 0)
     * @returns Array of verified rights that have been successfully verified
     *
     * @remarks
     * This method returns all rights that have been successfully verified (where isVerified = true), and assets have reached level 2.
     */
    getVerified(first?: number, skip?: number): Promise<VerifiedRights[]>;
}

/**
 * Methods for querying Proof of Popularity data from the subgraph
 */
declare class ProofOfPopularityMethods {
    private client;
    private queryClient;
    constructor(queryClient: QueryClientInterface);
    /**
     * Get all POP attestations with pagination
     * @param limit Maximum number of attestations to return
     * @param offset Number of attestations to skip
     * @returns Array of POP attestations
     */
    getAll(limit?: number, offset?: number): Promise<ProofOfPopularity[]>;
    /**
     * Get a specific POP attestation by its UID
     * @param uid Attestation UID
     * @returns The POP attestation if found
     */
    getByUID(uid: string): Promise<ProofOfPopularity | undefined>;
    /**
     * Get top POP attestations by popularity score
     * @param limit Maximum number of top attestations to return
     * @returns Array of top POP attestations sorted by popularity score
     */
    getTopAttestations(limit?: number): Promise<ProofOfPopularity[]>;
    /**
     * Get user votes for a specific attestation
     * @param attestationUID Attestation UID
     * @param limit Maximum number of votes to return
     * @param offset Number of votes to skip
     * @returns Array of user votes for the attestation
     */
    getUserVotes(attestationUID: string, limit?: number, offset?: number): Promise<POPUserVote[]>;
    /**
     * Get votes by a specific user
     * @param userAddress User wallet address
     * @param limit Maximum number of votes to return
     * @param offset Number of votes to skip
     * @returns Array of votes made by the user
     */
    getVotesByUser(userAddress: string, limit?: number, offset?: number): Promise<POPUserVote[]>;
}

interface QueryClientInterface {
    config: {
        url: string;
    };
    graphqlClient: Client;
    environment: string;
    digitalAsset: DigitalAssetMethods;
    verifiedRights: VerifiedRightsMethods;
    pop: ProofOfPopularityMethods;
}
/**
 * Client for querying The Graph subgraph data
 *
 * The QueryClient is the entry point for accessing indexed blockchain data through The Graph.
 * It provides specialized methods for retrieving digital assets and verified rights information
 * without making direct blockchain calls, improving performance and reducing costs.
 *
 * @example
 * ```typescript
 * // Initialize the query client for a specific environment
 * const queryClient = new QueryClient("devnet");
 *
 * // Query digital assets
 * const digitalAssets = await queryClient.digitalAsset.getAll(10, 0);
 * console.log(`Found ${digitalAssets.length} digital assets`);
 *
 * // Query verified rights
 * const verifiedRights = await queryClient.verifiedRights.getAll(10, 0);
 * console.log(`Found ${verifiedRights.length} verified rights`);
 * ```
 *
 * @remarks
 * The QueryClient connects to The Graph subgraph to efficiently retrieve indexed blockchain data.
 * This provides a much faster and cost-effective way to query data compared to direct RPC calls.
 * The environment parameter specifies which subgraph endpoint to use (local, devnet, testnet).
 *
 * @group Query
 */
declare class QueryClient implements QueryClientInterface {
    graphqlClient: Client;
    config: {
        url: string;
    };
    environment: string;
    digitalAsset: DigitalAssetMethods;
    verifiedRights: VerifiedRightsMethods;
    pop: ProofOfPopularityMethods;
    constructor(environment: CulturaChainType);
}

/**
 * Client for interacting with the Proof of Popularity (POP) module.
 */
declare class POPModuleClient {
    private readonly publicClient;
    private readonly contractAddress;
    private readonly walletClient?;
    private readonly DEFAULT_DECIMALS;
    /**
     * Creates an instance of the POPModuleClient.
     * @param publicClient - The Viem Public Client.
     * @param contractAddress - The contract address of the POP module.
     * @param walletClient - The Viem Wallet Client (optional).
     */
    constructor(publicClient: PublicClient, contractAddress: `0x${string}`, walletClient?: WalletClient | undefined);
    /**
     * Votes on an attestation.
     * @param attestationUID - The UID of the attestation to vote on.
     * @param amount - The amount of tokens to vote with (in ether).
     * @returns The transaction hash.
     *
     * @example
     * ```ts
     * // Vote 10 tokens on an attestation
     * const txHash = await popClient.voteOnAttestation(
     *   "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
     *   "10"
     * );
     * console.log(`Vote transaction: ${txHash}`);
     * ```
     */
    voteOnAttestation(attestationUID: `0x${string}`, amount: string): Promise<`0x${string}`>;
    /**
     * Requests withdrawal of voted tokens for an attestation.
     * @param attestationUID - The UID of the attestation.
     * @param amount - The amount of tokens to request withdrawal for (in ether).
     * @returns The transaction hash.
     *
     * @example
     * ```ts
     * // Request withdrawal of 5 tokens from an attestation
     * const txHash = await popClient.requestVoteWithdrawal(
     *   "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
     *   "5"
     * );
     * console.log(`Withdrawal request transaction: ${txHash}`);
     * ```
     */
    requestVoteWithdrawal(attestationUID: `0x${string}`, amount: string): Promise<`0x${string}`>;
    /**
     * Withdraws voted tokens after the timelock period.
     * @param attestationUID - The UID of the attestation.
     * @returns The transaction hash.
     *
     * @example
     * ```ts
     * // Withdraw tokens after timelock period
     * const txHash = await popClient.withdrawVotes(
     *   "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
     * );
     * console.log(`Withdrawal transaction: ${txHash}`);
     * ```
     */
    withdrawVotes(attestationUID: `0x${string}`): Promise<`0x${string}`>;
    /**
     * Gets the popularity score of an attestation.
     * @param attestationUID - The UID of the attestation.
     * @returns The popularity score as a string (in ether).
     *
     * @example
     * ```ts
     * // Get popularity score of an attestation
     * const score = await popClient.getPopularityScore(
     *   "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
     * );
     * console.log(`Popularity score: ${score}`);
     * ```
     */
    getPopularityScore(attestationUID: `0x${string}`): Promise<string>;
    /**
     * Gets the amount of tokens a user has voted on an attestation.
     * @param attestationUID - The UID of the attestation.
     * @param user - The address of the user.
     * @returns The voted amount as a string (in ether).
     *
     * @example
     * ```ts
     * // Get amount voted by a user on an attestation
     * const votedAmount = await popClient.getUserVotedAmount(
     *   "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
     *   "0xabcdef1234567890abcdef1234567890abcdef1234"
     * );
     * console.log(`User voted: ${votedAmount} tokens`);
     * ```
     */
    getUserVotedAmount(attestationUID: `0x${string}`, user: Address): Promise<string>;
    /**
     * Gets the total amount of tokens voted on an attestation.
     * @param attestationUID - The UID of the attestation.
     * @returns The total voted amount as a string (in ether).
     */
    getTotalVotedAmount(attestationUID: `0x${string}`): Promise<string>;
    /**
     * Gets the unlock time for a user's voted tokens.
     * @param attestationUID - The UID of the attestation.
     * @param user - The address of the user.
     * @returns The unlock time as a Unix timestamp (BigInt).
     */
    getUnlockTime(attestationUID: `0x${string}`, user: Address): Promise<bigint>;
    /**
     * Gets the top attestations by popularity score.
     * @param count - The maximum number of attestations to return.
     * @returns An array of attestation UIDs.
     *
     * @example
     * ```ts
     * // Get top 3 attestations
     * const topAttestations = await popClient.getTopAttestations(3);
     * console.log("Top attestations:", topAttestations);
     * ```
     */
    getTopAttestations(count: number): Promise<`0x${string}`[]>;
    /**
     * Gets the top 3 attestations and their scores.
     * @returns An object containing arrays of the top 3 attestation UIDs and their scores (as strings in ether).
     *
     * @example
     * ```ts
     * // Get top attestations with their scores
     * const { attestations, scores } = await popClient.getTopAttestationsWithScores();
     *
     * // Display top attestations and their scores
     * attestations.forEach((attestationUID, index) => {
     *   console.log(`Attestation ${index + 1}: ${attestationUID} - Score: ${scores[index]}`);
     * });
     * ```
     */
    getTopAttestationsWithScores(): Promise<{
        attestations: `0x${string}`[];
        scores: string[];
    }>;
    /**
     * Gets the maximum vote amount allowed per user per attestation.
     * @returns The maximum vote amount as a string (in ether).
     */
    getMaxVotePerUser(): Promise<string>;
}

/**
 * Main SDK client for interacting with the Cultura ecosystem.
 *
 * The SDK provides a comprehensive set of tools for interacting with the Cultura ecosystem,
 * including Digital Asset management, attestations, and licensing.
 *
 * @example
 * ```typescript
 * // Create SDK instance with default configuration (testnet)
 * const sdk = CulturaSDK.create();
 *
 * // Create SDK instance with custom chain configuration
 * const sdk = CulturaSDK.create({ chain: 'devnet' });
 *
 * // Create SDK instance with wallet connection
 * const sdk = CulturaSDK.createWithWallet(window.ethereum);
 *
 * // Create SDK instance with wallet connection and specific chain
 * const sdk = CulturaSDK.createWithWallet(window.ethereum, { chain: 'devnet' });
 *
 * // Create SDK instance with custom account
 * const sdk = CulturaSDK.createWithAccount('0x123...', { chain: 'local' });
 * ```
 */
declare class CulturaSDK {
    readonly config: CulturaConfig;
    readonly publicClient: PublicClient;
    readonly walletClient?: WalletClient;
    private _attestationService;
    private _schemaRegistry;
    private _culturaDigitalAsset;
    private _rightsBoundAccount;
    private _royalty;
    private _signatureUtils;
    private _verifierModule;
    private _bondToken;
    private _mockLicensingProtocol;
    private _query;
    private _popModule;
    /**
     * Get the current chain configuration
     */
    get chain(): viem.Chain | undefined;
    /**
     * Set the rights bound account address for the rightsBoundAccount client
     * This is needed when working with licensedAssets created via mockLicenseRight
     *
     * @param rightsBoundAccountAddress - The address of the Rights Bound Account
     */
    setRightsBoundAccount(rightsBoundAccountAddress: `0x${string}`): void;
    private constructor();
    /**
     * Create a new SDK instance
     * @param config SDK configuration
     */
    static create(config?: CulturaConfig): CulturaSDK;
    /**
     * Create a new SDK instance with a wallet
     * @param ethereum Ethereum provider (e.g., window.ethereum)
     * @param config Additional SDK configuration
     */
    static createWithWallet(ethereum: any, config?: Omit<CulturaConfig, 'wallet'>): CulturaSDK;
    /**
     * Create a new SDK instance with a specific account
     * @param account Ethereum account address or Viem Account object created with privateKeyToAccount()
     * @param config Additional SDK configuration
     * @example
     * ```typescript
     * // With an address (limited signing capability)
     * const sdk = CulturaSDK.createWithAccount('0x123...');
     *
     * // With a private key (full signing capability)
     * import { privateKeyToAccount } from 'viem/accounts';
     * const account = privateKeyToAccount('0xYourPrivateKeyHere');
     * const sdk = CulturaSDK.createWithAccount(account);
     * ```
     */
    static createWithAccount(account: CulturaConfig['account'], config?: Omit<CulturaConfig, 'account'>): CulturaSDK;
    /**
     * Create a new SDK instance with a Privy Smart Wallet Client
     * @param privyClient The Privy SmartWalletClientType instance
     * @param config Additional SDK configuration
     */
    static createWithSmartWalletClient(privyClient: any, // NonNullable<SmartWalletClientType>,
    config?: Omit<CulturaConfig, 'wallet' | 'account'>): CulturaSDK;
    /**
     * Access the Attestation Service client for creating and verifying attestations.
     *
     * The Attestation Service manages the creation and verification of attestations
     * that prove Digital Asset ownership and rights.
     *
     * @returns The Attestation Service client instance
     *
     * @example
     * ```typescript
     * // Create a attestation
     * const attestationUID = await sdk.attestationService.attest(
     *   attestationRequest,
     *   rightsBoundAccountAddress,
     *   tokenId,
     *   assetClass,
     *   bondAmount
     * );
     * ```
     */
    get attestationService(): AttestationServiceClient;
    /**
     * Get the SchemaRegistry client instance
     */
    get schemaRegistry(): SchemaRegistryClient;
    /**
     * Get the CulturaDigitalAsset client instance
     */
    get culturaDigitalAsset(): CulturaDigitalAssetClient;
    /**
     * Get the culturaDigitalAsset client instance (alias for culturaDigitalAsset for backward compatibility)
     * @deprecated Use culturaDigitalAsset instead
     */
    get digitalAsset(): CulturaDigitalAssetClient;
    /**
     * Get the Rights Bound Account client instance
     * This needs to be set manually using setRightsBoundAccount before use
     */
    get rightsBoundAccount(): RightsBoundAccountClient;
    /**
     * Get the Royalty client instance
     */
    get royalty(): RoyaltyClient;
    /**
     * Get the Signature Utils client instance
     */
    get signatureUtils(): SignatureUtilsClient;
    /**
     * Get the Verifier Module client instance
     */
    get verifierModule(): VerifierModuleClient;
    /**
     * Get the balance of the connected wallet
     */
    getWalletBalance(): Promise<bigint>;
    /**
     * Get the balance of any address
     * @param address Ethereum address
     */
    getBalance(address: string): Promise<bigint>;
    /**
     * Get the Query client instance for querying indexed blockchain data
     */
    get query(): QueryClient;
    /**
     * Get the Bond Token client instance
     */
    get bondToken(): BondTokenClient;
    /**
     * Get the Mock Licensing Protocol client instance
     */
    get mockLicensingProtocol(): MockLicensingProtocolClient;
    /**
     * Get the POP Module client instance
     */
    get pop(): POPModuleClient;
}

declare const ENVIRONMENTS: {
    readonly local: {
        readonly rpcUrl: "http://127.0.0.1:8545";
        readonly chainId: 31337;
        readonly contracts: {
            readonly attestationService: `0x${string}`;
            readonly schemaRegistry: `0x${string}`;
            readonly culturaDigitalAsset: `0x${string}`;
            readonly bondToken: `0x${string}`;
            readonly royaltyModule: `0x${string}`;
            readonly mockLicensingProtocol: `0x${string}`;
            readonly verifierModule: `0x${string}`;
            readonly POP: `0x${string}`;
        };
    };
    readonly devnet: {
        readonly rpcUrl: "https://rpc-yelling-tomato-whale-2ib9sndb39.t.conduit.xyz";
        readonly chainId: 26156;
        readonly contracts: {
            readonly attestationService: `0x${string}`;
            readonly schemaRegistry: `0x${string}`;
            readonly culturaDigitalAsset: `0x${string}`;
            readonly bondToken: `0x${string}`;
            readonly royaltyModule: `0x${string}`;
            readonly mockLicensingProtocol: `0x${string}`;
            readonly verifierModule: `0x${string}`;
            readonly POP: `0x${string}`;
        };
    };
    readonly testnet: {
        readonly rpcUrl: "https://sepolia.cultura.xyz";
        readonly chainId: 61892;
        readonly contracts: {
            readonly attestationService: `0x${string}`;
            readonly schemaRegistry: `0x${string}`;
            readonly culturaDigitalAsset: `0x${string}`;
            readonly bondToken: `0x${string}`;
            readonly royaltyModule: `0x${string}`;
            readonly mockLicensingProtocol: `0x${string}`;
            readonly verifierModule: `0x${string}`;
            readonly POP: `0x${string}`;
        };
    };
};
declare const createChainConfig: (env: CulturaChainType) => {
    id: 26156 | 61892 | 31337;
    name: string;
    network: string;
    nativeCurrency: {
        decimals: number;
        name: string;
        symbol: string;
    };
    rpcUrls: {
        default: {
            http: ("http://127.0.0.1:8545" | "https://rpc-yelling-tomato-whale-2ib9sndb39.t.conduit.xyz" | "https://sepolia.cultura.xyz")[];
        };
        public: {
            http: ("http://127.0.0.1:8545" | "https://rpc-yelling-tomato-whale-2ib9sndb39.t.conduit.xyz" | "https://sepolia.cultura.xyz")[];
        };
    };
};
declare const culturaChain: {
    id: 26156 | 61892 | 31337;
    name: string;
    network: string;
    nativeCurrency: {
        decimals: number;
        name: string;
        symbol: string;
    };
    rpcUrls: {
        default: {
            http: ("http://127.0.0.1:8545" | "https://rpc-yelling-tomato-whale-2ib9sndb39.t.conduit.xyz" | "https://sepolia.cultura.xyz")[];
        };
        public: {
            http: ("http://127.0.0.1:8545" | "https://rpc-yelling-tomato-whale-2ib9sndb39.t.conduit.xyz" | "https://sepolia.cultura.xyz")[];
        };
    };
};
declare function getChainDisplayName(env: CulturaChainType): string;
declare function getNetworkName(env: CulturaChainType): string;

/**
 * Uploads a file to IPFS and returns the IPFS URL
 * @param file The file to upload
 * @returns The IPFS URL of the uploaded file
 */
declare function uploadFileToIpfs(file: File): Promise<string>;
/**
 * Uploads metadata to IPFS and returns the IPFS URL
 * @param metadata The metadata to upload
 * @returns The IPFS URL of the uploaded metadata
 */
declare function uploadMetadataToIpfs(metadata: Record<string, any>): Promise<string>;

declare const CHAIN_IDS: Record<CulturaChainType, number>;
declare const CHAIN_NAMES: Record<number, CulturaChainType>;
declare function getChainId(chainName: CulturaChainType | number): number;
declare function getChainName(chainId: number): CulturaChainType;

/**
 * Generate a unique identifier for a digital asset
 * @param digitalAssetAddress The address of the digital asset contract
 * @param digitalAssetId The token ID of the digital asset
 * @returns The unique identifier for the digital asset
 *
 * @example
 * ```typescript
 * import { getDigitalAssetUID } from '@cultura/sdk/utils'
 *
 * // Generate the UID for digital asset
 * const id = getDigitalAssetUID(
 *   "0x1234567890abcdef1234567890abcdef12345678",
 *   "42"
 * )
 */
declare function getDigitalAssetUID(digitalAssetAddress: `0x${string}`, digitalAssetId: bigint): `0x${string}`;
/**
 * Generate a verified rights ID by encoding the digital asset address and ID
 *
 *
 * @param digitalAssetAddress The address of the digital asset contract
 * @param digitalAssetId The ID of the digital asset
 * @returns The encoded verified rights ID as a hex string
 *
 * @example
 * ```typescript
 * import { getVerifiedRightsId } from '@cultura/sdk/utils'
 *
 * // Generate the ID for verified rights
 * const id = getVerifiedRightsId(
 *   "0x1234567890abcdef1234567890abcdef12345678",
 *   "42"
 * )
 *
 * // Use this ID to query verified rights
 * const verifiedRights = await queryClient.verifiedRights.getById(id)
 * ```
 */
declare function getVerifiedRightsId(digitalAssetAddress: `0x${string}`, digitalAssetId: bigint): `0x${string}`;

declare const index_CHAIN_IDS: typeof CHAIN_IDS;
declare const index_CHAIN_NAMES: typeof CHAIN_NAMES;
declare const index_getChainId: typeof getChainId;
declare const index_getChainName: typeof getChainName;
declare const index_getDigitalAssetUID: typeof getDigitalAssetUID;
declare const index_getVerifiedRightsId: typeof getVerifiedRightsId;
declare const index_uploadFileToIpfs: typeof uploadFileToIpfs;
declare const index_uploadMetadataToIpfs: typeof uploadMetadataToIpfs;
declare namespace index {
  export { index_CHAIN_IDS as CHAIN_IDS, index_CHAIN_NAMES as CHAIN_NAMES, index_getChainId as getChainId, index_getChainName as getChainName, index_getDigitalAssetUID as getDigitalAssetUID, index_getVerifiedRightsId as getVerifiedRightsId, index_uploadFileToIpfs as uploadFileToIpfs, index_uploadMetadataToIpfs as uploadMetadataToIpfs };
}

export { type Account, type AccountResponse, type AccountsResponse, type Attestation, type AttestationData, type AttestationRequest, type AttestationResponse, type ChallengeAttestationParams, type ChallengeAttestationResponse, type ChallengeRequest, type ChallengeResponse, type ContractAddresses, type CulturaChainType, type CulturaConfig, CulturaSDK, type DeactivateLevelParams, type DeactivateLevelResponse, type DelegatedSelfAttestParams, type DigitalAsset, type DigitalAssetLevel, type DigitalAssetMetadata, type DigitalAssetResponse, type DigitalAssetsResponse, ENVIRONMENTS, type Grade, type LicenseInfo, type POPUserVote, type POPUserVoteResponse, type POPUserVotesResponse, type ParentDigitalAssetEntity, type ParentInfo, type ProofOfPopularitiesResponse, type ProofOfPopularity, type ProofOfPopularityResponse, QueryClient, type SchemaRecord, type SelfAttestParams, type SelfAttestResponse, type SetLevelParams, type SetLevelResponse, type SignatureParams, type SmartWalletClientType, type SupportedChainIds, type TokenAmountInput, type TransactionResponse, type UpdateLevelParams, type UpdateLevelResponse, type Verification, type VerifiedRights, type VerifiedRightsItemResponse, type VerifiedRightsResponse, type VerifyAttestationParams, type VerifyAttestationResponse, type WithdrawBondTokenParams, type WithdrawBondTokenResponse, createChainConfig, culturaChain, getChainDisplayName, getNetworkName, index as utils };
