UNPKG

ecash-agora

Version:

Library for interacting with the eCash Agora protocol

28 lines 1.49 kB
import { Script, TxBuilderOutput, Signatory } from 'ecash-lib'; import { ScriptUtxo } from 'chronik-client'; import { AgoraOffer } from './agora'; export declare const DUMMY_KEYPAIR: { sk: Uint8Array<ArrayBufferLike>; pk: Uint8Array<ArrayBufferLike>; }; /** * Determine input utxos to cover an Agora Partial accept offer */ export declare const getAgoraPartialAcceptFuelInputs: <T extends ScriptUtxo>(agoraOffer: AgoraOffer, utxos: T[], acceptedAtoms: bigint, feePerKb?: bigint) => T[]; /** * Determine input utxos to cover an Agora ONESHOT accept offer * Note: we could refactor getAgoraPartialAcceptFuelInputs to work with ONESHOT offers * However there is some ambiguity involved with the acceptedAtoms param * Cleaner to keep distinct functions */ export declare const getAgoraOneshotAcceptFuelInputs: <T extends ScriptUtxo>(agoraOffer: AgoraOffer, utxos: T[], feePerKb?: bigint) => T[]; /** * Determine input utxos to cancel an Agora offer (Partial or ONESHOT) */ export declare const getAgoraCancelFuelInputs: <T extends ScriptUtxo>(agoraOffer: AgoraOffer, utxos: T[], feePerKb?: bigint) => T[]; /** * Calculate the fee required for an offer transaction that spends an ad script output. * This is used to determine how much fuel needs to be included in the ad setup transaction. */ export declare const getAgoraAdFuelSats: (redeemScript: Script, signatory: Signatory, offerOutputs: TxBuilderOutput[], satsPerKb: bigint) => bigint; //# sourceMappingURL=inputs.d.ts.map