otx-btc-wallet-connectors 0.1.0
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.
- package/README.md +554 -0
- package/dist/base-IAFq7sd8.d.mts +53 -0
- package/dist/base-IAFq7sd8.d.ts +53 -0
- package/dist/binance/index.d.mts +81 -0
- package/dist/binance/index.d.ts +81 -0
- package/dist/binance/index.js +13 -0
- package/dist/binance/index.js.map +1 -0
- package/dist/binance/index.mjs +4 -0
- package/dist/binance/index.mjs.map +1 -0
- package/dist/bitget/index.d.mts +84 -0
- package/dist/bitget/index.d.ts +84 -0
- package/dist/bitget/index.js +13 -0
- package/dist/bitget/index.js.map +1 -0
- package/dist/bitget/index.mjs +4 -0
- package/dist/bitget/index.mjs.map +1 -0
- package/dist/chunk-5Z5Q2Y75.mjs +91 -0
- package/dist/chunk-5Z5Q2Y75.mjs.map +1 -0
- package/dist/chunk-7KK2LZLZ.mjs +208 -0
- package/dist/chunk-7KK2LZLZ.mjs.map +1 -0
- package/dist/chunk-AW2JZIHR.mjs +753 -0
- package/dist/chunk-AW2JZIHR.mjs.map +1 -0
- package/dist/chunk-EIJOSZXZ.js +331 -0
- package/dist/chunk-EIJOSZXZ.js.map +1 -0
- package/dist/chunk-EQHR7P7G.js +541 -0
- package/dist/chunk-EQHR7P7G.js.map +1 -0
- package/dist/chunk-EWRXLZO4.mjs +539 -0
- package/dist/chunk-EWRXLZO4.mjs.map +1 -0
- package/dist/chunk-FISNQZZ7.js +802 -0
- package/dist/chunk-FISNQZZ7.js.map +1 -0
- package/dist/chunk-HL4WDMGS.js +200 -0
- package/dist/chunk-HL4WDMGS.js.map +1 -0
- package/dist/chunk-IPYWR76I.js +314 -0
- package/dist/chunk-IPYWR76I.js.map +1 -0
- package/dist/chunk-JYYNWR5G.js +142 -0
- package/dist/chunk-JYYNWR5G.js.map +1 -0
- package/dist/chunk-LNKTYZJM.js +701 -0
- package/dist/chunk-LNKTYZJM.js.map +1 -0
- package/dist/chunk-LVZMONQL.mjs +699 -0
- package/dist/chunk-LVZMONQL.mjs.map +1 -0
- package/dist/chunk-MFXLQWOE.js +93 -0
- package/dist/chunk-MFXLQWOE.js.map +1 -0
- package/dist/chunk-NBIA4TTE.mjs +204 -0
- package/dist/chunk-NBIA4TTE.mjs.map +1 -0
- package/dist/chunk-O4DD2XJ2.js +206 -0
- package/dist/chunk-O4DD2XJ2.js.map +1 -0
- package/dist/chunk-P7HVBU2B.mjs +140 -0
- package/dist/chunk-P7HVBU2B.mjs.map +1 -0
- package/dist/chunk-Q7QVQYEB.js +210 -0
- package/dist/chunk-Q7QVQYEB.js.map +1 -0
- package/dist/chunk-RLZEG6KL.mjs +329 -0
- package/dist/chunk-RLZEG6KL.mjs.map +1 -0
- package/dist/chunk-SYLDBJ75.mjs +246 -0
- package/dist/chunk-SYLDBJ75.mjs.map +1 -0
- package/dist/chunk-TTEUU3CI.mjs +198 -0
- package/dist/chunk-TTEUU3CI.mjs.map +1 -0
- package/dist/chunk-V66BXDTR.mjs +292 -0
- package/dist/chunk-V66BXDTR.mjs.map +1 -0
- package/dist/chunk-X77ZT4OI.js +268 -0
- package/dist/chunk-X77ZT4OI.js.map +1 -0
- package/dist/imtoken/index.d.mts +116 -0
- package/dist/imtoken/index.d.ts +116 -0
- package/dist/imtoken/index.js +14 -0
- package/dist/imtoken/index.js.map +1 -0
- package/dist/imtoken/index.mjs +5 -0
- package/dist/imtoken/index.mjs.map +1 -0
- package/dist/index.d.mts +14 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +170 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +13 -0
- package/dist/index.mjs.map +1 -0
- package/dist/ledger/index.d.mts +290 -0
- package/dist/ledger/index.d.ts +290 -0
- package/dist/ledger/index.js +14 -0
- package/dist/ledger/index.js.map +1 -0
- package/dist/ledger/index.mjs +5 -0
- package/dist/ledger/index.mjs.map +1 -0
- package/dist/okx/index.d.mts +88 -0
- package/dist/okx/index.d.ts +88 -0
- package/dist/okx/index.js +13 -0
- package/dist/okx/index.js.map +1 -0
- package/dist/okx/index.mjs +4 -0
- package/dist/okx/index.mjs.map +1 -0
- package/dist/phantom/index.d.mts +96 -0
- package/dist/phantom/index.d.ts +96 -0
- package/dist/phantom/index.js +14 -0
- package/dist/phantom/index.js.map +1 -0
- package/dist/phantom/index.mjs +5 -0
- package/dist/phantom/index.mjs.map +1 -0
- package/dist/psbt-builder-CFOs69Z5.d.mts +131 -0
- package/dist/psbt-builder-CFOs69Z5.d.ts +131 -0
- package/dist/trezor/index.d.mts +155 -0
- package/dist/trezor/index.d.ts +155 -0
- package/dist/trezor/index.js +14 -0
- package/dist/trezor/index.js.map +1 -0
- package/dist/trezor/index.mjs +5 -0
- package/dist/trezor/index.mjs.map +1 -0
- package/dist/unisat/index.d.mts +75 -0
- package/dist/unisat/index.d.ts +75 -0
- package/dist/unisat/index.js +13 -0
- package/dist/unisat/index.js.map +1 -0
- package/dist/unisat/index.mjs +4 -0
- package/dist/unisat/index.mjs.map +1 -0
- package/dist/utils/index.d.mts +398 -0
- package/dist/utils/index.d.ts +398 -0
- package/dist/utils/index.js +120 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/index.mjs +3 -0
- package/dist/utils/index.mjs.map +1 -0
- package/dist/xverse/index.d.mts +79 -0
- package/dist/xverse/index.d.ts +79 -0
- package/dist/xverse/index.js +13 -0
- package/dist/xverse/index.js.map +1 -0
- package/dist/xverse/index.mjs +4 -0
- package/dist/xverse/index.mjs.map +1 -0
- package/package.json +108 -0
- package/src/base.ts +132 -0
- package/src/binance/BinanceConnector.ts +307 -0
- package/src/binance/index.ts +1 -0
- package/src/bitget/BitgetConnector.ts +301 -0
- package/src/bitget/index.ts +1 -0
- package/src/imtoken/ImTokenConnector.ts +420 -0
- package/src/imtoken/index.ts +2 -0
- package/src/index.ts +78 -0
- package/src/ledger/LedgerConnector.ts +1019 -0
- package/src/ledger/index.ts +8 -0
- package/src/okx/OKXConnector.ts +230 -0
- package/src/okx/index.ts +1 -0
- package/src/phantom/PhantomConnector.ts +381 -0
- package/src/phantom/index.ts +2 -0
- package/src/trezor/TrezorConnector.ts +824 -0
- package/src/trezor/index.ts +6 -0
- package/src/unisat/UnisatConnector.ts +312 -0
- package/src/unisat/index.ts +1 -0
- package/src/utils/blockstream.ts +230 -0
- package/src/utils/btc-service.ts +364 -0
- package/src/utils/index.ts +56 -0
- package/src/utils/mempool.ts +232 -0
- package/src/utils/psbt-builder.ts +492 -0
- package/src/utils/types.ts +183 -0
- package/src/xverse/XverseConnector.ts +479 -0
- package/src/xverse/index.ts +1 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { BitcoinNetwork, WalletAccount, SignPsbtOptions } from 'otx-btc-wallet-core';
|
|
2
|
+
import { B as BaseConnector } from '../base-IAFq7sd8.mjs';
|
|
3
|
+
import { G as GeneratePsbtOptions } from '../psbt-builder-CFOs69Z5.mjs';
|
|
4
|
+
import 'bitcoinjs-lib';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Options for sendTransaction method
|
|
8
|
+
*/
|
|
9
|
+
interface ImTokenSendOptions extends GeneratePsbtOptions {
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* imToken Bitcoin provider interface
|
|
13
|
+
* Provider is accessible via window.bitcoin
|
|
14
|
+
* @see https://imtoken.gitbook.io/developers/products/webview/bitcoin
|
|
15
|
+
*/
|
|
16
|
+
interface ImTokenBitcoinProvider {
|
|
17
|
+
request(params: {
|
|
18
|
+
method: 'btc_requestAccounts';
|
|
19
|
+
}): Promise<string[]>;
|
|
20
|
+
request(params: {
|
|
21
|
+
method: 'btc_getNetwork';
|
|
22
|
+
}): Promise<string>;
|
|
23
|
+
request(params: {
|
|
24
|
+
method: 'btc_getPublicKey';
|
|
25
|
+
}): Promise<string>;
|
|
26
|
+
request(params: {
|
|
27
|
+
method: 'btc_getBalance';
|
|
28
|
+
params: [string];
|
|
29
|
+
}): Promise<number>;
|
|
30
|
+
request(params: {
|
|
31
|
+
method: 'btc_signPsbt';
|
|
32
|
+
params: [string, boolean?];
|
|
33
|
+
}): Promise<string>;
|
|
34
|
+
request(params: {
|
|
35
|
+
method: 'btc_signPsbts';
|
|
36
|
+
params: [string[]];
|
|
37
|
+
}): Promise<string[]>;
|
|
38
|
+
request(params: {
|
|
39
|
+
method: 'btc_signMessage';
|
|
40
|
+
params: [string, 'bip322-simple' | 'bip322-full' | 'bip322-legacy'];
|
|
41
|
+
}): Promise<string>;
|
|
42
|
+
request(params: {
|
|
43
|
+
method: 'btc_sendRawTransaction';
|
|
44
|
+
params: [string];
|
|
45
|
+
}): Promise<string>;
|
|
46
|
+
request(params: {
|
|
47
|
+
method: 'btc_switchNetwork';
|
|
48
|
+
params: [string];
|
|
49
|
+
}): Promise<null>;
|
|
50
|
+
on(event: 'accountsChanged', callback: (...args: unknown[]) => void): void;
|
|
51
|
+
on(event: 'networkChanged', callback: (...args: unknown[]) => void): void;
|
|
52
|
+
removeListener(event: string, callback: (...args: unknown[]) => void): void;
|
|
53
|
+
}
|
|
54
|
+
declare global {
|
|
55
|
+
interface Window {
|
|
56
|
+
bitcoin?: ImTokenBitcoinProvider;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* imToken Wallet Connector
|
|
61
|
+
*
|
|
62
|
+
* @see https://imtoken.gitbook.io/developers/products/webview/bitcoin
|
|
63
|
+
*/
|
|
64
|
+
declare class ImTokenConnector extends BaseConnector {
|
|
65
|
+
readonly id = "imtoken";
|
|
66
|
+
readonly name = "imToken";
|
|
67
|
+
readonly icon = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5MyIgaGVpZ2h0PSI5MyIgdmlld0JveD0iMCAwIDkzIDkzIiBmaWxsPSJub25lIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzIwMzVfMzk1KSI+CjxtYXNrIGlkPSJ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yOC41MTc0IDc1LjY3NTMgMjguNzUyNFoiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9nPgo8L2c+CjxkZWZzPgo8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MF9saW5lYXJfMjAzNV8zOTUiIHgxPSI5Mi44OTc1IiB5MT0iMTUuNzE1NCIgeDI9IjMuMjE5OTciIHkyPSI1MC42NTA0IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIHN0b3AtY29sb3I9IiMwQ0M1RkYiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDA3RkZGIi8+CjwvbGluZWFyR3JhZGllbnQ+CjxjbGlwUGF0aCBpZD0iY2xpcDBfMjAzNV8zOTUiPgo8cmVjdCB3aWR0aD0iOTMiIGhlaWdodD0iOTMiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==";
|
|
68
|
+
readonly downloadUrl = "https://token.im/download";
|
|
69
|
+
private _publicKey;
|
|
70
|
+
private _address;
|
|
71
|
+
private _network;
|
|
72
|
+
private _removeAccountChangeListener;
|
|
73
|
+
private _removeNetworkChangeListener;
|
|
74
|
+
protected getProvider(): ImTokenBitcoinProvider | undefined;
|
|
75
|
+
connect(network?: BitcoinNetwork): Promise<WalletAccount>;
|
|
76
|
+
private trySwitchNetwork;
|
|
77
|
+
private setupEventListeners;
|
|
78
|
+
private removeEventListeners;
|
|
79
|
+
disconnect(): Promise<void>;
|
|
80
|
+
getAccounts(): Promise<WalletAccount[]>;
|
|
81
|
+
/**
|
|
82
|
+
* Sign a message using BIP-322 simple format
|
|
83
|
+
* Note: Only bip322-simple is supported by imToken
|
|
84
|
+
*/
|
|
85
|
+
signMessage(message: string): Promise<string>;
|
|
86
|
+
signPsbt(psbtHex: string, options?: SignPsbtOptions): Promise<string>;
|
|
87
|
+
signPsbts(psbtHexs: string[]): Promise<string[]>;
|
|
88
|
+
/**
|
|
89
|
+
* Send Bitcoin transaction
|
|
90
|
+
* Builds a PSBT using bitcoinjs-lib, signs it with imToken, and broadcasts
|
|
91
|
+
*
|
|
92
|
+
* @param to - Recipient address
|
|
93
|
+
* @param satoshis - Amount to send in satoshis
|
|
94
|
+
* @param options - Send options (feeRate, etc.)
|
|
95
|
+
* @returns Transaction ID after broadcast
|
|
96
|
+
*/
|
|
97
|
+
sendTransaction(to: string, satoshis: number, options?: ImTokenSendOptions): Promise<string>;
|
|
98
|
+
/**
|
|
99
|
+
* Broadcast a raw transaction
|
|
100
|
+
*/
|
|
101
|
+
broadcastTransaction(txHex: string): Promise<string>;
|
|
102
|
+
getNetwork(): Promise<BitcoinNetwork>;
|
|
103
|
+
switchNetwork(network: BitcoinNetwork): Promise<void>;
|
|
104
|
+
/**
|
|
105
|
+
* Get the public key (cached from connect)
|
|
106
|
+
*/
|
|
107
|
+
getPublicKey(): string | null;
|
|
108
|
+
/**
|
|
109
|
+
* Get balance for an address
|
|
110
|
+
*/
|
|
111
|
+
getBalance(address: string): Promise<number>;
|
|
112
|
+
private mapNetwork;
|
|
113
|
+
private mapToImTokenNetwork;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export { ImTokenConnector, type ImTokenSendOptions };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { BitcoinNetwork, WalletAccount, SignPsbtOptions } from 'otx-btc-wallet-core';
|
|
2
|
+
import { B as BaseConnector } from '../base-IAFq7sd8.js';
|
|
3
|
+
import { G as GeneratePsbtOptions } from '../psbt-builder-CFOs69Z5.js';
|
|
4
|
+
import 'bitcoinjs-lib';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Options for sendTransaction method
|
|
8
|
+
*/
|
|
9
|
+
interface ImTokenSendOptions extends GeneratePsbtOptions {
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* imToken Bitcoin provider interface
|
|
13
|
+
* Provider is accessible via window.bitcoin
|
|
14
|
+
* @see https://imtoken.gitbook.io/developers/products/webview/bitcoin
|
|
15
|
+
*/
|
|
16
|
+
interface ImTokenBitcoinProvider {
|
|
17
|
+
request(params: {
|
|
18
|
+
method: 'btc_requestAccounts';
|
|
19
|
+
}): Promise<string[]>;
|
|
20
|
+
request(params: {
|
|
21
|
+
method: 'btc_getNetwork';
|
|
22
|
+
}): Promise<string>;
|
|
23
|
+
request(params: {
|
|
24
|
+
method: 'btc_getPublicKey';
|
|
25
|
+
}): Promise<string>;
|
|
26
|
+
request(params: {
|
|
27
|
+
method: 'btc_getBalance';
|
|
28
|
+
params: [string];
|
|
29
|
+
}): Promise<number>;
|
|
30
|
+
request(params: {
|
|
31
|
+
method: 'btc_signPsbt';
|
|
32
|
+
params: [string, boolean?];
|
|
33
|
+
}): Promise<string>;
|
|
34
|
+
request(params: {
|
|
35
|
+
method: 'btc_signPsbts';
|
|
36
|
+
params: [string[]];
|
|
37
|
+
}): Promise<string[]>;
|
|
38
|
+
request(params: {
|
|
39
|
+
method: 'btc_signMessage';
|
|
40
|
+
params: [string, 'bip322-simple' | 'bip322-full' | 'bip322-legacy'];
|
|
41
|
+
}): Promise<string>;
|
|
42
|
+
request(params: {
|
|
43
|
+
method: 'btc_sendRawTransaction';
|
|
44
|
+
params: [string];
|
|
45
|
+
}): Promise<string>;
|
|
46
|
+
request(params: {
|
|
47
|
+
method: 'btc_switchNetwork';
|
|
48
|
+
params: [string];
|
|
49
|
+
}): Promise<null>;
|
|
50
|
+
on(event: 'accountsChanged', callback: (...args: unknown[]) => void): void;
|
|
51
|
+
on(event: 'networkChanged', callback: (...args: unknown[]) => void): void;
|
|
52
|
+
removeListener(event: string, callback: (...args: unknown[]) => void): void;
|
|
53
|
+
}
|
|
54
|
+
declare global {
|
|
55
|
+
interface Window {
|
|
56
|
+
bitcoin?: ImTokenBitcoinProvider;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* imToken Wallet Connector
|
|
61
|
+
*
|
|
62
|
+
* @see https://imtoken.gitbook.io/developers/products/webview/bitcoin
|
|
63
|
+
*/
|
|
64
|
+
declare class ImTokenConnector extends BaseConnector {
|
|
65
|
+
readonly id = "imtoken";
|
|
66
|
+
readonly name = "imToken";
|
|
67
|
+
readonly icon = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5MyIgaGVpZ2h0PSI5MyIgdmlld0JveD0iMCAwIDkzIDkzIiBmaWxsPSJub25lIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzIwMzVfMzk1KSI+CjxtYXNrIGlkPSJtYXNrMF8yMDM1XzM5NSIgc3R5bGU9Im1hc2stdHlwZTpsdW1pbmFuY2UiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjAiIHk9IjAiIHdpZHRoPSI5MyIgaGVpZ2h0PSI5MyI+CjxwYXRoIGQ9Ik05MyAwSDBWOTNIOTNWMFoiIGZpbGw9IndoaXRlIi8+CjwvbWFzaz4KPGcgbWFzaz0idXJsKCNtYXNrMF8yMDM1XzM5NSkiPgo8bWFzayBpZD0ibWFzazFfMjAzNV8zOTUiIHN0eWxlPSJtYXNrLXR5cGU6bHVtaW5hbmNlIiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4PSIwIiB5PSIwIiB3aWR0aD0iOTMiIGhlaWdodD0iOTMiPgo8cGF0aCBkPSJNOTIuODc2OCAwSDAuMDU4MTA1NVY5M0g5Mi44NzY4VjBaIiBmaWxsPSJ3aGl0ZSIvPgo8L21hc2s+CjxnIG1hc2s9InVybCgjbWFzazFfMjAzNV8zOTUpIj4KPHBhdGggZD0iTTcyLjEwNSAwSDIwLjk4MjJDOS40NjgyMiAwIDAuMTM0Mjc3IDkuMzUyMTkgMC4xMzQyNzcgMjAuODg4N1Y3Mi4xMTEzQzAuMTM0Mjc3IDgzLjY0NzkgOS40NjgyMiA5MyAyMC45ODIyIDkzSDcyLjEwNU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4MTYgMzYuODk5MiA0OC4yODE4IDM2LjY0IDQ4LjU0MDMgMzYuMzU2M0M0OC41NDI4IDM2LjM0OSA0OC41NDI4IDM2LjM0OSA0OC41NDc3IDM2LjM0OUM0OC43MzU1IDM2LjEzNjMgNDguOTYyNSAzNS45MDY1IDQ5LjIxODcgMzUuNjU5NUM1Mi40MTU1IDMyLjYzNzUgNjMuOTI4MiAyNS41MTA1IDc0LjgxNjMgMjcuNzY3MkM3NS4wNDY2IDI3LjgxNjYgNzUuMjU0NSAyNy45MzkyIDc1LjQwOTMgMjguMTE2OUM3NS41NjQxIDI4LjI5NDUgNzUuNjU3MyAyOC41MTc0IDc1LjY3NTMgMjguNzUyNFoiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9nPgo8L2c+CjxkZWZzPgo8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MF9saW5lYXJfMjAzNV8zOTUiIHgxPSI5Mi44OTc1IiB5MT0iMTUuNzE1NCIgeDI9IjMuMjE5OTciIHkyPSI1MC42NTA0IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIHN0b3AtY29sb3I9IiMwQ0M1RkYiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDA3RkZGIi8+CjwvbGluZWFyR3JhZGllbnQ+CjxjbGlwUGF0aCBpZD0iY2xpcDBfMjAzNV8zOTUiPgo8cmVjdCB3aWR0aD0iOTMiIGhlaWdodD0iOTMiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==";
|
|
68
|
+
readonly downloadUrl = "https://token.im/download";
|
|
69
|
+
private _publicKey;
|
|
70
|
+
private _address;
|
|
71
|
+
private _network;
|
|
72
|
+
private _removeAccountChangeListener;
|
|
73
|
+
private _removeNetworkChangeListener;
|
|
74
|
+
protected getProvider(): ImTokenBitcoinProvider | undefined;
|
|
75
|
+
connect(network?: BitcoinNetwork): Promise<WalletAccount>;
|
|
76
|
+
private trySwitchNetwork;
|
|
77
|
+
private setupEventListeners;
|
|
78
|
+
private removeEventListeners;
|
|
79
|
+
disconnect(): Promise<void>;
|
|
80
|
+
getAccounts(): Promise<WalletAccount[]>;
|
|
81
|
+
/**
|
|
82
|
+
* Sign a message using BIP-322 simple format
|
|
83
|
+
* Note: Only bip322-simple is supported by imToken
|
|
84
|
+
*/
|
|
85
|
+
signMessage(message: string): Promise<string>;
|
|
86
|
+
signPsbt(psbtHex: string, options?: SignPsbtOptions): Promise<string>;
|
|
87
|
+
signPsbts(psbtHexs: string[]): Promise<string[]>;
|
|
88
|
+
/**
|
|
89
|
+
* Send Bitcoin transaction
|
|
90
|
+
* Builds a PSBT using bitcoinjs-lib, signs it with imToken, and broadcasts
|
|
91
|
+
*
|
|
92
|
+
* @param to - Recipient address
|
|
93
|
+
* @param satoshis - Amount to send in satoshis
|
|
94
|
+
* @param options - Send options (feeRate, etc.)
|
|
95
|
+
* @returns Transaction ID after broadcast
|
|
96
|
+
*/
|
|
97
|
+
sendTransaction(to: string, satoshis: number, options?: ImTokenSendOptions): Promise<string>;
|
|
98
|
+
/**
|
|
99
|
+
* Broadcast a raw transaction
|
|
100
|
+
*/
|
|
101
|
+
broadcastTransaction(txHex: string): Promise<string>;
|
|
102
|
+
getNetwork(): Promise<BitcoinNetwork>;
|
|
103
|
+
switchNetwork(network: BitcoinNetwork): Promise<void>;
|
|
104
|
+
/**
|
|
105
|
+
* Get the public key (cached from connect)
|
|
106
|
+
*/
|
|
107
|
+
getPublicKey(): string | null;
|
|
108
|
+
/**
|
|
109
|
+
* Get balance for an address
|
|
110
|
+
*/
|
|
111
|
+
getBalance(address: string): Promise<number>;
|
|
112
|
+
private mapNetwork;
|
|
113
|
+
private mapToImTokenNetwork;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export { ImTokenConnector, type ImTokenSendOptions };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkIPYWR76I_js = require('../chunk-IPYWR76I.js');
|
|
4
|
+
require('../chunk-FISNQZZ7.js');
|
|
5
|
+
require('../chunk-MFXLQWOE.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "ImTokenConnector", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkIPYWR76I_js.ImTokenConnector; }
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=out.js.map
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { B as BaseConnector } from './base-IAFq7sd8.mjs';
|
|
2
|
+
export { UnisatConnector } from './unisat/index.mjs';
|
|
3
|
+
export { XverseConnector } from './xverse/index.mjs';
|
|
4
|
+
export { OKXConnector } from './okx/index.mjs';
|
|
5
|
+
export { PhantomConnector, PhantomSendOptions } from './phantom/index.mjs';
|
|
6
|
+
export { BitgetConnector } from './bitget/index.mjs';
|
|
7
|
+
export { BinanceConnector } from './binance/index.mjs';
|
|
8
|
+
export { LedgerAddressType, LedgerConnector, LedgerConnectorOptions, LedgerTxOutput, LedgerUtxoInput, SendBitcoinOptions } from './ledger/index.mjs';
|
|
9
|
+
export { TrezorAddressType, TrezorConnector, TrezorConnectorOptions, TrezorSendBitcoinOptions } from './trezor/index.mjs';
|
|
10
|
+
export { ImTokenConnector, ImTokenSendOptions } from './imtoken/index.mjs';
|
|
11
|
+
export { AddressBalance, BlockstreamService, BtcService, BtcServiceConfig, FeeRates, FullTransaction, IBtcService, MempoolService, NetworkEndpoints, Transaction, Utxo, UtxoWithTx, broadcastTransaction, configureBtcService, getAddressInfo, getBalance, getBtcServiceConfig, getConfirmedBalance, getFeeRates, getFullTransaction, getTransaction, getTxHex, getUtxos, getUtxosWithTxHex } from './utils/index.mjs';
|
|
12
|
+
export { G as GeneratePsbtOptions, l as GeneratePsbtResult, b as bytesToHex, k as deriveAddressFromPublicKey, f as finalizeAllInputs, a as finalizeAndBroadcast, g as generatePsbtForSend, c as getAddressType, d as getBitcoinJsNetwork, j as getDustThreshold, e as getInputVBytes, i as getOutputVBytes, h as hexToBytes, s as selectUtxos, t as toXOnly } from './psbt-builder-CFOs69Z5.mjs';
|
|
13
|
+
import 'otx-btc-wallet-core';
|
|
14
|
+
import 'bitcoinjs-lib';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { B as BaseConnector } from './base-IAFq7sd8.js';
|
|
2
|
+
export { UnisatConnector } from './unisat/index.js';
|
|
3
|
+
export { XverseConnector } from './xverse/index.js';
|
|
4
|
+
export { OKXConnector } from './okx/index.js';
|
|
5
|
+
export { PhantomConnector, PhantomSendOptions } from './phantom/index.js';
|
|
6
|
+
export { BitgetConnector } from './bitget/index.js';
|
|
7
|
+
export { BinanceConnector } from './binance/index.js';
|
|
8
|
+
export { LedgerAddressType, LedgerConnector, LedgerConnectorOptions, LedgerTxOutput, LedgerUtxoInput, SendBitcoinOptions } from './ledger/index.js';
|
|
9
|
+
export { TrezorAddressType, TrezorConnector, TrezorConnectorOptions, TrezorSendBitcoinOptions } from './trezor/index.js';
|
|
10
|
+
export { ImTokenConnector, ImTokenSendOptions } from './imtoken/index.js';
|
|
11
|
+
export { AddressBalance, BlockstreamService, BtcService, BtcServiceConfig, FeeRates, FullTransaction, IBtcService, MempoolService, NetworkEndpoints, Transaction, Utxo, UtxoWithTx, broadcastTransaction, configureBtcService, getAddressInfo, getBalance, getBtcServiceConfig, getConfirmedBalance, getFeeRates, getFullTransaction, getTransaction, getTxHex, getUtxos, getUtxosWithTxHex } from './utils/index.js';
|
|
12
|
+
export { G as GeneratePsbtOptions, l as GeneratePsbtResult, b as bytesToHex, k as deriveAddressFromPublicKey, f as finalizeAllInputs, a as finalizeAndBroadcast, g as generatePsbtForSend, c as getAddressType, d as getBitcoinJsNetwork, j as getDustThreshold, e as getInputVBytes, i as getOutputVBytes, h as hexToBytes, s as selectUtxos, t as toXOnly } from './psbt-builder-CFOs69Z5.js';
|
|
13
|
+
import 'otx-btc-wallet-core';
|
|
14
|
+
import 'bitcoinjs-lib';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkEQHR7P7G_js = require('./chunk-EQHR7P7G.js');
|
|
4
|
+
var chunkIPYWR76I_js = require('./chunk-IPYWR76I.js');
|
|
5
|
+
var chunkQ7QVQYEB_js = require('./chunk-Q7QVQYEB.js');
|
|
6
|
+
var chunkEIJOSZXZ_js = require('./chunk-EIJOSZXZ.js');
|
|
7
|
+
var chunkJYYNWR5G_js = require('./chunk-JYYNWR5G.js');
|
|
8
|
+
var chunkX77ZT4OI_js = require('./chunk-X77ZT4OI.js');
|
|
9
|
+
var chunkHL4WDMGS_js = require('./chunk-HL4WDMGS.js');
|
|
10
|
+
var chunkO4DD2XJ2_js = require('./chunk-O4DD2XJ2.js');
|
|
11
|
+
var chunkLNKTYZJM_js = require('./chunk-LNKTYZJM.js');
|
|
12
|
+
var chunkFISNQZZ7_js = require('./chunk-FISNQZZ7.js');
|
|
13
|
+
var chunkMFXLQWOE_js = require('./chunk-MFXLQWOE.js');
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
Object.defineProperty(exports, "TrezorConnector", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunkEQHR7P7G_js.TrezorConnector; }
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "ImTokenConnector", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return chunkIPYWR76I_js.ImTokenConnector; }
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "UnisatConnector", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return chunkQ7QVQYEB_js.UnisatConnector; }
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(exports, "XverseConnector", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () { return chunkEIJOSZXZ_js.XverseConnector; }
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(exports, "OKXConnector", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () { return chunkJYYNWR5G_js.OKXConnector; }
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports, "PhantomConnector", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () { return chunkX77ZT4OI_js.PhantomConnector; }
|
|
40
|
+
});
|
|
41
|
+
Object.defineProperty(exports, "BitgetConnector", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function () { return chunkHL4WDMGS_js.BitgetConnector; }
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(exports, "BinanceConnector", {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
get: function () { return chunkO4DD2XJ2_js.BinanceConnector; }
|
|
48
|
+
});
|
|
49
|
+
Object.defineProperty(exports, "LedgerConnector", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function () { return chunkLNKTYZJM_js.LedgerConnector; }
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(exports, "BlockstreamService", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
get: function () { return chunkFISNQZZ7_js.BlockstreamService; }
|
|
56
|
+
});
|
|
57
|
+
Object.defineProperty(exports, "BtcService", {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
get: function () { return chunkFISNQZZ7_js.BtcService; }
|
|
60
|
+
});
|
|
61
|
+
Object.defineProperty(exports, "MempoolService", {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: function () { return chunkFISNQZZ7_js.MempoolService; }
|
|
64
|
+
});
|
|
65
|
+
Object.defineProperty(exports, "broadcastTransaction", {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function () { return chunkFISNQZZ7_js.broadcastTransaction; }
|
|
68
|
+
});
|
|
69
|
+
Object.defineProperty(exports, "bytesToHex", {
|
|
70
|
+
enumerable: true,
|
|
71
|
+
get: function () { return chunkFISNQZZ7_js.bytesToHex; }
|
|
72
|
+
});
|
|
73
|
+
Object.defineProperty(exports, "configureBtcService", {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
get: function () { return chunkFISNQZZ7_js.configureBtcService; }
|
|
76
|
+
});
|
|
77
|
+
Object.defineProperty(exports, "deriveAddressFromPublicKey", {
|
|
78
|
+
enumerable: true,
|
|
79
|
+
get: function () { return chunkFISNQZZ7_js.deriveAddressFromPublicKey; }
|
|
80
|
+
});
|
|
81
|
+
Object.defineProperty(exports, "finalizeAllInputs", {
|
|
82
|
+
enumerable: true,
|
|
83
|
+
get: function () { return chunkFISNQZZ7_js.finalizeAllInputs; }
|
|
84
|
+
});
|
|
85
|
+
Object.defineProperty(exports, "finalizeAndBroadcast", {
|
|
86
|
+
enumerable: true,
|
|
87
|
+
get: function () { return chunkFISNQZZ7_js.finalizeAndBroadcast; }
|
|
88
|
+
});
|
|
89
|
+
Object.defineProperty(exports, "generatePsbtForSend", {
|
|
90
|
+
enumerable: true,
|
|
91
|
+
get: function () { return chunkFISNQZZ7_js.generatePsbtForSend; }
|
|
92
|
+
});
|
|
93
|
+
Object.defineProperty(exports, "getAddressInfo", {
|
|
94
|
+
enumerable: true,
|
|
95
|
+
get: function () { return chunkFISNQZZ7_js.getAddressInfo; }
|
|
96
|
+
});
|
|
97
|
+
Object.defineProperty(exports, "getAddressType", {
|
|
98
|
+
enumerable: true,
|
|
99
|
+
get: function () { return chunkFISNQZZ7_js.getAddressType; }
|
|
100
|
+
});
|
|
101
|
+
Object.defineProperty(exports, "getBalance", {
|
|
102
|
+
enumerable: true,
|
|
103
|
+
get: function () { return chunkFISNQZZ7_js.getBalance; }
|
|
104
|
+
});
|
|
105
|
+
Object.defineProperty(exports, "getBitcoinJsNetwork", {
|
|
106
|
+
enumerable: true,
|
|
107
|
+
get: function () { return chunkFISNQZZ7_js.getBitcoinJsNetwork; }
|
|
108
|
+
});
|
|
109
|
+
Object.defineProperty(exports, "getBtcServiceConfig", {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
get: function () { return chunkFISNQZZ7_js.getBtcServiceConfig; }
|
|
112
|
+
});
|
|
113
|
+
Object.defineProperty(exports, "getConfirmedBalance", {
|
|
114
|
+
enumerable: true,
|
|
115
|
+
get: function () { return chunkFISNQZZ7_js.getConfirmedBalance; }
|
|
116
|
+
});
|
|
117
|
+
Object.defineProperty(exports, "getDustThreshold", {
|
|
118
|
+
enumerable: true,
|
|
119
|
+
get: function () { return chunkFISNQZZ7_js.getDustThreshold; }
|
|
120
|
+
});
|
|
121
|
+
Object.defineProperty(exports, "getFeeRates", {
|
|
122
|
+
enumerable: true,
|
|
123
|
+
get: function () { return chunkFISNQZZ7_js.getFeeRates; }
|
|
124
|
+
});
|
|
125
|
+
Object.defineProperty(exports, "getFullTransaction", {
|
|
126
|
+
enumerable: true,
|
|
127
|
+
get: function () { return chunkFISNQZZ7_js.getFullTransaction; }
|
|
128
|
+
});
|
|
129
|
+
Object.defineProperty(exports, "getInputVBytes", {
|
|
130
|
+
enumerable: true,
|
|
131
|
+
get: function () { return chunkFISNQZZ7_js.getInputVBytes; }
|
|
132
|
+
});
|
|
133
|
+
Object.defineProperty(exports, "getOutputVBytes", {
|
|
134
|
+
enumerable: true,
|
|
135
|
+
get: function () { return chunkFISNQZZ7_js.getOutputVBytes; }
|
|
136
|
+
});
|
|
137
|
+
Object.defineProperty(exports, "getTransaction", {
|
|
138
|
+
enumerable: true,
|
|
139
|
+
get: function () { return chunkFISNQZZ7_js.getTransaction; }
|
|
140
|
+
});
|
|
141
|
+
Object.defineProperty(exports, "getTxHex", {
|
|
142
|
+
enumerable: true,
|
|
143
|
+
get: function () { return chunkFISNQZZ7_js.getTxHex; }
|
|
144
|
+
});
|
|
145
|
+
Object.defineProperty(exports, "getUtxos", {
|
|
146
|
+
enumerable: true,
|
|
147
|
+
get: function () { return chunkFISNQZZ7_js.getUtxos; }
|
|
148
|
+
});
|
|
149
|
+
Object.defineProperty(exports, "getUtxosWithTxHex", {
|
|
150
|
+
enumerable: true,
|
|
151
|
+
get: function () { return chunkFISNQZZ7_js.getUtxosWithTxHex; }
|
|
152
|
+
});
|
|
153
|
+
Object.defineProperty(exports, "hexToBytes", {
|
|
154
|
+
enumerable: true,
|
|
155
|
+
get: function () { return chunkFISNQZZ7_js.hexToBytes; }
|
|
156
|
+
});
|
|
157
|
+
Object.defineProperty(exports, "selectUtxos", {
|
|
158
|
+
enumerable: true,
|
|
159
|
+
get: function () { return chunkFISNQZZ7_js.selectUtxos; }
|
|
160
|
+
});
|
|
161
|
+
Object.defineProperty(exports, "toXOnly", {
|
|
162
|
+
enumerable: true,
|
|
163
|
+
get: function () { return chunkFISNQZZ7_js.toXOnly; }
|
|
164
|
+
});
|
|
165
|
+
Object.defineProperty(exports, "BaseConnector", {
|
|
166
|
+
enumerable: true,
|
|
167
|
+
get: function () { return chunkMFXLQWOE_js.BaseConnector; }
|
|
168
|
+
});
|
|
169
|
+
//# sourceMappingURL=out.js.map
|
|
170
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { TrezorConnector } from './chunk-EWRXLZO4.mjs';
|
|
2
|
+
export { ImTokenConnector } from './chunk-V66BXDTR.mjs';
|
|
3
|
+
export { UnisatConnector } from './chunk-7KK2LZLZ.mjs';
|
|
4
|
+
export { XverseConnector } from './chunk-RLZEG6KL.mjs';
|
|
5
|
+
export { OKXConnector } from './chunk-P7HVBU2B.mjs';
|
|
6
|
+
export { PhantomConnector } from './chunk-SYLDBJ75.mjs';
|
|
7
|
+
export { BitgetConnector } from './chunk-TTEUU3CI.mjs';
|
|
8
|
+
export { BinanceConnector } from './chunk-NBIA4TTE.mjs';
|
|
9
|
+
export { LedgerConnector } from './chunk-LVZMONQL.mjs';
|
|
10
|
+
export { BlockstreamService, BtcService, MempoolService, broadcastTransaction, bytesToHex, configureBtcService, deriveAddressFromPublicKey, finalizeAllInputs, finalizeAndBroadcast, generatePsbtForSend, getAddressInfo, getAddressType, getBalance, getBitcoinJsNetwork, getBtcServiceConfig, getConfirmedBalance, getDustThreshold, getFeeRates, getFullTransaction, getInputVBytes, getOutputVBytes, getTransaction, getTxHex, getUtxos, getUtxosWithTxHex, hexToBytes, selectUtxos, toXOnly } from './chunk-AW2JZIHR.mjs';
|
|
11
|
+
export { BaseConnector } from './chunk-5Z5Q2Y75.mjs';
|
|
12
|
+
//# sourceMappingURL=out.js.map
|
|
13
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|