import { Signer } from "ethers"; import { Vault, VaultStatusInfo, CreateVaultParams, SecretShares } from "./types"; /** * Main SDK class for interacting with Royale Protocol */ export declare class RoyaleProtocol { private contract; private provider; private signer; private ipfsClient; /** * Initialize Royale Protocol SDK * @param contractAddress Contract address on the network * @param rpcUrl RPC URL for the network (or EIP-1193 provider for browser) * @param ipfsGatewayUrl IPFS gateway URL (optional) */ constructor(contractAddress: string, rpcUrl: string | any, ipfsGatewayUrl?: string); /** * Connect a signer (wallet) to the SDK * @param signer Ethers signer instance */ connectSigner(signer: Signer): Promise; /** * Initialize IPFS client * @param ipfsUrl IPFS node URL (optional) * @param pinataApiKey Optional Pinata API key for direct uploads * @param pinataSecretKey Optional Pinata secret key for direct uploads */ initializeIPFS(ipfsUrl?: string, pinataApiKey?: string, pinataSecretKey?: string): Promise; /** * Create a new vault * @param params Vault creation parameters * @returns Vault ID and secret shares */ createVault(params: CreateVaultParams): Promise<{ vaultId: bigint; shares: SecretShares; backupShare: string; }>; /** * Owner check-in to prove they're alive * @param vaultId Vault ID */ checkIn(vaultId: bigint): Promise; /** * Trigger recovery if inactivity period has passed * @param vaultId Vault ID */ triggerRecovery(vaultId: bigint): Promise; /** * Beneficiary claims the inheritance * @param vaultId Vault ID * @param beneficiaryShare Share that beneficiary received when vault was created * @returns Decrypted secret */ claimInheritance(vaultId: bigint, beneficiaryShare: string): Promise; /** * Owner cancels the vault * @param vaultId Vault ID */ cancelVault(vaultId: bigint): Promise; /** * Get vault details * @param vaultId Vault ID * @returns Vault data */ getVault(vaultId: bigint): Promise; /** * Get vault status information * @param vaultId Vault ID * @returns Status information */ getVaultStatus(vaultId: bigint): Promise; /** * Get all vault IDs for an owner * @param ownerAddress Owner address * @returns Array of vault IDs */ getOwnerVaults(ownerAddress: string): Promise; /** * Get all vault IDs for a beneficiary * @param beneficiaryAddress Beneficiary address * @returns Array of vault IDs */ getBeneficiaryVaults(beneficiaryAddress: string): Promise; /** * Get total number of vaults * @returns Total vault count */ totalVaults(): Promise; }