import { Signer as Signer$1, ContractTransactionReceipt } from 'ethersV6'; import { Signer, ContractReceipt } from 'ethers'; import { CHAIN_ID } from '../utils/supportedChains/index.js'; import { GasValue } from '../token-registry-functions/types.js'; import '../utils/gasStation/index.js'; import '../utils/network/index.js'; /** * Document Store Deployment Module * * This module provides functionality to deploy TrustVC Document Store contracts * with support for both ethers v5 and v6 signers. It supports two types of stores: * * 1. **Standard Document Store**: For issuing and revoking verifiable documents * - Immutable ownership (documents cannot be transferred) * - Suitable for most credential use cases * * 2. **Transferable Document Store**: For documents that can change ownership * - Supports ownership transfers between addresses * - Useful for transferable credentials or certificates */ /** * Configuration options for Document Store deployment */ interface DeployOptions { chainId?: CHAIN_ID; maxFeePerGas?: GasValue; maxPriorityFeePerGas?: GasValue; isTransferable?: boolean; } /** * Union type for transaction receipts from both ethers v5 and v6 */ type TransactionReceipt = ContractReceipt | ContractTransactionReceipt; /** * Deploys a new Document Store contract with automatic type selection. * **Store Types:** * - **Standard** (default): Documents are immutable and cannot be transferred * - **Transferable**: Documents can be transferred to different owners * **Ethers Compatibility:** * - Automatically detects and handles both ethers v5 and v6 signers * - Returns appropriate receipt type based on signer version * @param {string} storeName - The name of the document store (e.g., "My University Credentials") * @param {string} owner - The owner address that will control the document store * @param {SignerV5 | SignerV6} signer - Signer instance that authorizes the deployment * @param {DeployOptions} options - Configuration options for deployment * @returns {Promise} Transaction receipt with deployed contract address * @throws {Error} If store name is not provided * @throws {Error} If owner address is not provided * @throws {Error} If signer provider is not available * @throws {Error} If deployment transaction fails * @example * ```typescript * Deploy standard document store * const receipt = await deployDocumentStore( * "My Document Store", * "0x1234...", * signer, * { chainId: CHAIN_ID.SEPOLIA } * ); * * Deploy transferable document store * const receipt = await deployDocumentStore( * "My Transferable Store", * "0x1234...", * signer, * { * isTransferable: true, * maxFeePerGas: 50000000000n * } * ); * ``` */ declare const deployDocumentStore: (storeName: string, owner: string, signer: Signer | Signer$1, options?: DeployOptions) => Promise; export { type DeployOptions, type TransactionReceipt, deployDocumentStore };