Files
smom-dbis-138/packages/checkpoint-core/dist/tokenTransfers.d.ts
T
defiQUGandCursor 651fb59786 Add mainnet checkpoint stack: ISO attestation, participant Etherscan surface, and services.
Ship AddressActivityRegistry V1/V2, ISO20022IntakeGateway, Chain138ParticipantSurface,
checkpoint hub contracts, checkpoint-core package, aggregator/indexer/sdk services,
relay profile guards, M00 diamond bridge facet, and OMNL compliance contracts.

Co-authored-by: Cursor <[email protected]>
2026-06-24 21:54:05 -07:00

41 lines
1.5 KiB
TypeScript

/** Blockscout ERC-20 transfer parsing (shared by aggregator + indexer). */
export interface TokenTransferSummary {
token: string;
tokenSymbol: string;
tokenDecimals: number;
from: string;
to: string;
value: bigint;
logIndex: number;
}
interface TokenTransferItem {
from?: {
hash?: string;
};
to?: {
hash?: string;
};
token?: {
address?: string;
symbol?: string;
decimals?: string;
};
total?: {
value?: string;
decimals?: string;
};
value?: string | null;
type?: string;
log_index?: number;
}
/** Largest ERC-20 transfer in a tx (legacy primary payment). */
export declare function pickPrimaryTokenTransfer(items: TokenTransferItem[]): TokenTransferSummary | null;
/** All non-zero ERC-20 transfers in a tx. */
export declare function parseAllTokenTransfers(items: TokenTransferItem[]): TokenTransferSummary[];
export declare function fetchTokenTransferItemsForTx(apiBase: string, txHash: string): Promise<TokenTransferItem[]>;
export declare function pickPrimaryFromSummaries(items: TokenTransferSummary[]): TokenTransferSummary | null;
export declare function applyPrimaryTransferToLeaf(leaf: Record<string, unknown>, primary: TokenTransferSummary | null): void;
export declare function fetchAllTokenTransfersForTx(apiBase: string, txHash: string): Promise<TokenTransferSummary[]>;
export declare function fetchPrimaryTokenTransferForTx(apiBase: string, txHash: string): Promise<TokenTransferSummary | null>;
export {};