import { type Generated, type Selectable } from 'kysely'; import type * as Db from '../Db.js'; import type * as db_Schema from '../Schema.js'; /** Columns of the `routes_transfer_transactions` table. */ export type Table = Omit & { /** Environment derived by the database. */ environment: Generated; /** Organization derived by the database. */ orgId: Generated; /** Project derived by the database. */ projectId: Generated; }; /** One verified transaction reference on a transfer. */ export type Record = Selectable; /** * Inserts a transaction reference, lowercasing EVM hashes while preserving * other references. Repeats return `undefined`; conflicting source ownership throws. */ export declare function insert(db: Db.Db, record: insert.Record): Promise; export declare namespace insert { /** Transaction evidence; the database derives tenancy from its transfer. */ type Record = Omit, 'environment' | 'orgId' | 'projectId'>; } /** Claims a source transaction once within its transfer's organization, environment, and project. */ export declare function claimSource(db: Db.Db, record: insert.Record): Promise; export declare namespace claimSource { /** Source transaction ownership outcome. */ type Result = { record: Record; type: 'claimed'; } | { record: Record; type: 'replayed'; } | { type: 'conflict'; }; } /** Gets a source claim within the given transfer's organization, environment, and project. */ export declare function getSource(db: Db.Db, options: getSource.Options): Promise; export declare namespace getSource { /** Source transaction identity. */ type Options = { /** CAIP-2 chain containing the transaction. */ chainId: string; /** EVM transaction hash or case-sensitive chain reference. */ transactionRef: string; /** Transfer whose tenant scope is searched. */ transferId: string; }; } /** Removes one source transaction only when the transfer still owns it. */ export declare function removeSource(db: Db.Db, options: removeSource.Options): Promise; export declare namespace removeSource { /** Exact source evidence identity and owner. */ type Options = { /** CAIP-2 chain containing the transaction. */ chainId: string; /** Source transaction reference. */ transactionHash: string; /** Owning transfer id (`rtr_…`). */ transferId: string; }; } /** Removes every remaining source transaction owned by one transfer. */ export declare function removeSources(db: Db.Db, options: removeSources.Options): Promise; export declare namespace removeSources { /** Source transaction owner. */ type Options = { /** Owning transfer id (`rtr_…`). */ transferId: string; }; } /** Lists a transfer's transaction references, oldest first. */ export declare function listByTransfer(db: Db.Db, transferId: string): Promise; /** Canonicalizes a transaction reference for storage and comparison. */ export declare function normalize(chainId: string, transactionRef: string): string; //# sourceMappingURL=routesTransferTransactions.d.ts.map