import type { EvmAddress, HexBytes, HexBytes32 } from "./evm.js"; import { type BigintLike, type ProtocolExecutionPlan } from "./protocol-plans.js"; import { type ReceiptEventBase } from "./protocol-receipts.js"; export declare const flowParticipantAbi: readonly [{ readonly type: "function"; readonly inputs: readonly [{ readonly name: "recipientIds"; readonly internalType: "bytes32[]"; readonly type: "bytes32[]"; }, { readonly name: "allocationsPpm"; readonly internalType: "uint32[]"; readonly type: "uint32[]"; }]; readonly name: "allocate"; readonly outputs: readonly []; readonly stateMutability: "nonpayable"; }, { readonly type: "function"; readonly inputs: readonly [{ readonly name: "allocationKey"; readonly internalType: "uint256"; readonly type: "uint256"; }]; readonly name: "syncAllocation"; readonly outputs: readonly []; readonly stateMutability: "nonpayable"; }, { readonly type: "function"; readonly inputs: readonly [{ readonly name: "account"; readonly internalType: "address"; readonly type: "address"; }]; readonly name: "syncAllocationForAccount"; readonly outputs: readonly []; readonly stateMutability: "nonpayable"; }, { readonly type: "function"; readonly inputs: readonly [{ readonly name: "allocationKey"; readonly internalType: "uint256"; readonly type: "uint256"; }]; readonly name: "clearStaleAllocation"; readonly outputs: readonly []; readonly stateMutability: "nonpayable"; }, { readonly type: "event"; readonly anonymous: false; readonly inputs: readonly [{ readonly name: "strategy"; readonly internalType: "address"; readonly type: "address"; readonly indexed: true; }, { readonly name: "allocationKey"; readonly internalType: "uint256"; readonly type: "uint256"; readonly indexed: true; }, { readonly name: "commit"; readonly internalType: "bytes32"; readonly type: "bytes32"; readonly indexed: false; }, { readonly name: "weight"; readonly internalType: "uint256"; readonly type: "uint256"; readonly indexed: false; }]; readonly name: "AllocationCommitted"; }, { readonly type: "event"; readonly anonymous: false; readonly inputs: readonly [{ readonly name: "strategy"; readonly internalType: "address"; readonly type: "address"; readonly indexed: true; }, { readonly name: "allocationKey"; readonly internalType: "uint256"; readonly type: "uint256"; readonly indexed: true; }, { readonly name: "commit"; readonly internalType: "bytes32"; readonly type: "bytes32"; readonly indexed: false; }, { readonly name: "weight"; readonly internalType: "uint256"; readonly type: "uint256"; readonly indexed: false; }, { readonly name: "snapshotVersion"; readonly internalType: "uint8"; readonly type: "uint8"; readonly indexed: false; }, { readonly name: "packedSnapshot"; readonly internalType: "bytes"; readonly type: "bytes"; readonly indexed: false; }]; readonly name: "AllocationSnapshotUpdated"; }]; export type FlowAllocationVectorInput = { recipientIds: readonly string[]; allocationsPpm: readonly BigintLike[]; }; export type FlowAllocationVector = { recipientIds: readonly HexBytes32[]; allocationsPpm: readonly number[]; }; export type FlowAllocatePlan = ProtocolExecutionPlan<"flow.allocate"> & { flowAddress: EvmAddress; recipientIds: readonly HexBytes32[]; allocationsPpm: readonly number[]; }; export type FlowSyncAllocationPlan = ProtocolExecutionPlan<"flow.sync-allocation"> & { flowAddress: EvmAddress; allocationKey: string; }; export type FlowSyncAllocationForAccountPlan = ProtocolExecutionPlan<"flow.sync-allocation-for-account"> & { flowAddress: EvmAddress; account: EvmAddress; }; export type FlowClearStaleAllocationPlan = ProtocolExecutionPlan<"flow.clear-stale-allocation"> & { flowAddress: EvmAddress; allocationKey: string; }; export type FlowAllocationCommittedEvent = { strategy: EvmAddress; allocationKey: bigint; commit: HexBytes32; weight: bigint; }; export type FlowAllocationSnapshotUpdatedEvent = FlowAllocationCommittedEvent & { snapshotVersion: bigint; packedSnapshot: HexBytes; }; export type FlowReceiptSummary = { allocationCommitted: FlowAllocationCommittedEvent | null; allocationSnapshotUpdated: FlowAllocationSnapshotUpdatedEvent | null; }; export type FlowReceiptEvent = (ReceiptEventBase & { family: "flow"; eventName: "AllocationCommitted"; strategy: EvmAddress; allocationKey: bigint; commit: HexBytes32; weight: bigint; }) | (ReceiptEventBase & { family: "flow"; eventName: "AllocationSnapshotUpdated"; strategy: EvmAddress; allocationKey: bigint; commit: HexBytes32; weight: bigint; snapshotVersion: bigint; packedSnapshot: HexBytes; }) | (ReceiptEventBase & { family: "ledger"; eventName: "AllocationCheckpointed"; account: EvmAddress; budget: EvmAddress; allocatedStake: bigint; checkpointTime: bigint; }) | (ReceiptEventBase & { family: "pipeline"; eventName: "ChildAllocationSyncAttempted"; budgetTreasury: EvmAddress; childFlow: EvmAddress; strategy: EvmAddress; allocationKey: bigint; parentFlow: EvmAddress; parentStrategy: EvmAddress; parentAllocationKey: bigint; success: boolean; }) | (ReceiptEventBase & { family: "pipeline"; eventName: "ChildAllocationSyncFailed"; budgetTreasury: EvmAddress; childFlow: EvmAddress; strategy: EvmAddress; allocationKey: bigint; parentFlow: EvmAddress; parentStrategy: EvmAddress; parentAllocationKey: bigint; reason: HexBytes; }) | (ReceiptEventBase & { family: "pipeline"; eventName: "ChildAllocationSyncSkipped"; budgetTreasury: EvmAddress; childFlow: EvmAddress; parentFlow: EvmAddress; parentStrategy: EvmAddress; parentAllocationKey: bigint; reason: HexBytes32; }) | (ReceiptEventBase & { family: "pipeline"; eventName: "ChildSyncDebtCleared"; account: EvmAddress; budgetTreasury: EvmAddress; childFlow: EvmAddress; reason: HexBytes32; }) | (ReceiptEventBase & { family: "pipeline"; eventName: "ChildSyncDebtOpened"; account: EvmAddress; budgetTreasury: EvmAddress; childFlow: EvmAddress; childStrategy: EvmAddress; allocationKey: bigint; reason: HexBytes32; }); export declare function normalizeFlowAllocationVector(input: FlowAllocationVectorInput): FlowAllocationVector; export declare function buildFlowAllocatePlan(params: { network?: string; flowAddress: string; recipientIds: readonly string[]; allocationsPpm: readonly BigintLike[]; }): FlowAllocatePlan; export declare function buildFlowSyncAllocationForAccountPlan(params: { network?: string; flowAddress: string; account: string; }): FlowSyncAllocationForAccountPlan; export declare function buildFlowSyncAllocationPlan(params: { network?: string; flowAddress: string; allocationKey: BigintLike; }): FlowSyncAllocationPlan; export declare function buildFlowClearStaleAllocationPlan(params: { network?: string; flowAddress: string; allocationKey: BigintLike; }): FlowClearStaleAllocationPlan; export declare function decodeFlowReceipt(logs: readonly unknown[]): FlowReceiptSummary; export declare function serializeFlowReceipt(summary: FlowReceiptSummary): Record; export declare function decodeFlowReceiptEvents(logs: readonly unknown[]): FlowReceiptEvent[]; export declare function serializeFlowReceiptEvents(events: readonly FlowReceiptEvent[]): readonly Record[];