ecash-agora
Version:
Library for interacting with the eCash Agora protocol
27 lines • 1.27 kB
TypeScript
import { Tx, TokenType } from 'ecash-lib';
import { Wallet } from 'ecash-wallet';
/** Metadata for a wallet-owned token output created by an Agora tx. */
export type AgoraReconcileTokenOut = {
txIndex: number;
outIdx: number;
tokenId: string;
atoms: bigint;
tokenType: TokenType;
isMintBaton?: boolean;
};
/**
* After a successful Chronik broadcast, update {@link Wallet.utxos} in-memory
* from the mined/broadcast txs (no `sync()`): remove spent coins and append
* new wallet outputs.
*
* @param wallet - Wallet that signed / funded the txs
* @param txs - Txs as broadcast (same order as `broadcastedTxids`)
* @param broadcastedTxids - Txids returned from broadcast (same length as txs)
* @param tokenOutputs - Explicit token outputs to wallet (`getWalletUtxoFromOutput` needs token metadata)
* @param options.skipAddOutputsForTxIndices - Do not append outputs for these tx indexes
* (e.g. tx already applied by `wallet.action(...).build()` optimistic update)
*/
export declare function reconcileWalletUtxosAfterBroadcasts(wallet: Wallet, txs: Tx[], broadcastedTxids: string[], tokenOutputs: AgoraReconcileTokenOut[], options?: {
skipAddOutputsForTxIndices?: Set<number>;
}): void;
//# sourceMappingURL=walletUtxoReconcile.d.ts.map