@okcontract/sdk
Version:
One-stop-shop permissionless SDK for building any blockchain frontend
23 lines (22 loc) • 664 B
TypeScript
import type { Address, TransactionReceipt } from "viem";
import type { Rational } from "@okcontract/lambdascript";
import type { ChainType } from "@okcontract/multichain";
export type SentTransaction = {
ch: ChainType;
fnName: string;
hash: Address;
sentAt: Rational;
gasCurPrice?: Rational;
error?: unknown;
url?: string;
};
export type TransactionWithReceipt = SentTransaction & {
receipt?: TransactionReceipt;
};
/**
* getTXPrice returns the tx prices as a string
* it computes TX price in bigint to prevent numeric overflow
* @param tx
* @returns
*/
export declare const getTXPrice: (tx: TransactionWithReceipt) => string;