@ecency/wallets 1.3.11 → 1.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { utxoTx } from '@okxweb3/coin-bitcoin/dist/type';
|
|
2
|
+
import { Network as BtcNetwork } from '@okxweb3/coin-bitcoin/dist/bitcoinjs-lib';
|
|
3
|
+
import { EthTxParams } from '@okxweb3/coin-ethereum/dist/EthWallet';
|
|
4
|
+
import { SolSignParam } from '@okxweb3/coin-solana/dist/SolWallet';
|
|
5
|
+
import { TrxSignParam } from '@okxweb3/coin-tron/dist/TrxWallet';
|
|
6
|
+
import { TxData as TonTxData } from '@okxweb3/coin-ton/dist/api/types';
|
|
7
|
+
import { CosmosSignParam } from '@okxweb3/coin-cosmos/dist/CosmosWallet';
|
|
8
|
+
import { AptosParam } from '@okxweb3/coin-aptos/dist/AptosWallet';
|
|
9
|
+
import { EcencyWalletCurrency } from '../enums';
|
|
10
|
+
/**
|
|
11
|
+
* Union type covering all chain-specific build parameters.
|
|
12
|
+
*/
|
|
13
|
+
export type ExternalTxParams = utxoTx | EthTxParams | SolSignParam | TrxSignParam | TonTxData | CosmosSignParam | AptosParam;
|
|
14
|
+
/**
|
|
15
|
+
* Build a Bitcoin PSBT from UTXO inputs and desired outputs.
|
|
16
|
+
*
|
|
17
|
+
* @param tx Transaction description accepted by @okxweb3/coin-bitcoin.
|
|
18
|
+
* @returns Hex encoded PSBT ready for signing.
|
|
19
|
+
*/
|
|
20
|
+
export declare function buildPsbt(tx: utxoTx, network?: BtcNetwork, maximumFeeRate?: number): string;
|
|
21
|
+
/**
|
|
22
|
+
* Helper returning raw Ethereum transaction data ready for signing.
|
|
23
|
+
*
|
|
24
|
+
* The returned object can be passed directly to signExternalTx.
|
|
25
|
+
*/
|
|
26
|
+
export declare function buildEthTx(data: EthTxParams): EthTxParams;
|
|
27
|
+
/**
|
|
28
|
+
* Helper returning Solana transaction params used by signExternalTx.
|
|
29
|
+
*/
|
|
30
|
+
export declare function buildSolTx(data: SolSignParam): SolSignParam;
|
|
31
|
+
/**
|
|
32
|
+
* Helper returning Tron transaction params used by signExternalTx.
|
|
33
|
+
*/
|
|
34
|
+
export declare function buildTronTx(data: TrxSignParam): TrxSignParam;
|
|
35
|
+
/**
|
|
36
|
+
* Helper returning TON transaction params used by signExternalTx.
|
|
37
|
+
*/
|
|
38
|
+
export declare function buildTonTx(data: TonTxData): TonTxData;
|
|
39
|
+
/**
|
|
40
|
+
* Helper returning Cosmos transaction params used by signExternalTx.
|
|
41
|
+
*/
|
|
42
|
+
export declare function buildAtomTx(data: CosmosSignParam): CosmosSignParam;
|
|
43
|
+
/**
|
|
44
|
+
* Helper returning Aptos transaction params used by signExternalTx.
|
|
45
|
+
*/
|
|
46
|
+
export declare function buildAptTx(data: AptosParam): AptosParam;
|
|
47
|
+
/**
|
|
48
|
+
* Build a transaction for an external chain supported by okxweb3 wallets.
|
|
49
|
+
*
|
|
50
|
+
* @param currency Chain identifier.
|
|
51
|
+
* @param tx Chain specific transaction description.
|
|
52
|
+
*/
|
|
53
|
+
export declare function buildExternalTx(currency: EcencyWalletCurrency, tx: ExternalTxParams): string | EthTxParams | SolSignParam | TrxSignParam | TonTxData | CosmosSignParam | AptosParam;
|