2024-05-22 21:35:36 +02:00
|
|
|
import { Psbt } from 'bitcoinjs-lib';
|
2024-08-12 23:27:19 +02:00
|
|
|
import { CreateTransactionTarget, CreateTransactionUtxo, TWallet } from '../class/wallets/types';
|
2024-05-28 15:33:15 +02:00
|
|
|
import { BitcoinUnit, Chain } from '../models/bitcoinUnits';
|
2025-01-03 11:14:09 +01:00
|
|
|
import { ScanQRCodeParamList } from './DetailViewStackParamList';
|
2024-05-22 21:35:36 +02:00
|
|
|
|
2024-06-10 21:02:44 +02:00
|
|
|
export type SendDetailsParams = {
|
2024-10-24 00:36:28 +02:00
|
|
|
transactionMemo?: string;
|
|
|
|
isTransactionReplaceable?: boolean;
|
|
|
|
payjoinUrl?: string;
|
|
|
|
feeUnit?: BitcoinUnit;
|
|
|
|
frozenBalance?: number;
|
|
|
|
amountUnit?: BitcoinUnit;
|
2024-06-10 21:11:02 +02:00
|
|
|
address?: string;
|
|
|
|
amount?: number;
|
|
|
|
amountSats?: number;
|
2025-01-03 11:14:09 +01:00
|
|
|
onBarScanned?: string;
|
2024-06-10 21:11:02 +02:00
|
|
|
unit?: BitcoinUnit;
|
|
|
|
noRbf?: boolean;
|
2024-06-10 21:02:44 +02:00
|
|
|
walletID: string;
|
2024-06-10 21:11:02 +02:00
|
|
|
launchedBy?: string;
|
2024-10-24 00:36:28 +02:00
|
|
|
utxos?: CreateTransactionUtxo[] | null;
|
2024-06-10 21:11:02 +02:00
|
|
|
isEditable?: boolean;
|
|
|
|
uri?: string;
|
2024-06-10 21:02:44 +02:00
|
|
|
addRecipientParams?: {
|
2024-05-28 15:33:15 +02:00
|
|
|
address: string;
|
2024-06-10 21:02:44 +02:00
|
|
|
amount?: number;
|
|
|
|
memo?: string;
|
2024-05-28 15:33:15 +02:00
|
|
|
};
|
2024-06-10 21:02:44 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export type SendDetailsStackParamList = {
|
|
|
|
SendDetails: SendDetailsParams;
|
2024-05-22 21:35:36 +02:00
|
|
|
Confirm: {
|
|
|
|
fee: number;
|
|
|
|
memo?: string;
|
|
|
|
walletID: string;
|
|
|
|
tx: string;
|
2024-05-28 00:00:28 +02:00
|
|
|
targets?: CreateTransactionTarget[]; // needed to know if there were paymentCodes, which turned into addresses in `recipients`
|
2024-05-22 21:35:36 +02:00
|
|
|
recipients: CreateTransactionTarget[];
|
|
|
|
satoshiPerByte: number;
|
|
|
|
payjoinUrl?: string | null;
|
|
|
|
psbt: Psbt;
|
|
|
|
};
|
|
|
|
PsbtWithHardwareWallet: {
|
|
|
|
memo?: string;
|
2024-10-03 02:56:20 +02:00
|
|
|
walletID: string;
|
2024-05-22 21:35:36 +02:00
|
|
|
launchedBy?: string;
|
|
|
|
psbt?: Psbt;
|
|
|
|
txhex?: string;
|
|
|
|
};
|
|
|
|
CreateTransaction: {
|
|
|
|
wallet: TWallet;
|
|
|
|
memo?: string;
|
|
|
|
psbt?: Psbt;
|
|
|
|
txhex?: string;
|
|
|
|
tx: string;
|
|
|
|
fee: number;
|
|
|
|
showAnimatedQr?: boolean;
|
|
|
|
recipients: CreateTransactionTarget[];
|
|
|
|
satoshiPerByte: number;
|
|
|
|
feeSatoshi?: number;
|
|
|
|
};
|
|
|
|
PsbtMultisig: {
|
|
|
|
memo?: string;
|
|
|
|
psbtBase64: string;
|
|
|
|
walletID: string;
|
|
|
|
launchedBy?: string;
|
|
|
|
};
|
|
|
|
PsbtMultisigQRCode: {
|
|
|
|
memo?: string;
|
|
|
|
psbtBase64: string;
|
|
|
|
fromWallet: string;
|
|
|
|
launchedBy?: string;
|
|
|
|
};
|
2024-05-24 17:39:54 +02:00
|
|
|
Success: {
|
|
|
|
fee: number;
|
|
|
|
amount: number;
|
2024-06-04 16:50:15 +02:00
|
|
|
txid?: string;
|
2024-05-24 17:39:54 +02:00
|
|
|
};
|
2024-05-22 21:35:36 +02:00
|
|
|
SelectWallet: {
|
|
|
|
chainType: Chain;
|
|
|
|
};
|
|
|
|
CoinControl: {
|
|
|
|
walletID: string;
|
|
|
|
};
|
2024-06-07 20:50:50 +02:00
|
|
|
PaymentCodeList: {
|
2024-06-07 15:37:45 +02:00
|
|
|
walletID: string;
|
|
|
|
};
|
2025-01-03 11:14:09 +01:00
|
|
|
ScanQRCode: ScanQRCodeParamList;
|
2024-05-22 21:35:36 +02:00
|
|
|
};
|