@talken/talkenkit 2.3.8 → 2.3.9
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/dist/chunk-M2CMB5B2.js +93 -0
- package/dist/components/AbcLoginModal/AbcAuthModal.d.ts +11 -1
- package/dist/components/ConnectOptions/CompactMobileOptions.css.d.ts +26 -0
- package/dist/components/ConnectOptions/CompactMobileOptions.d.ts +19 -0
- package/dist/components/ConnectOptions/DesktopOptions.d.ts +9 -2
- package/dist/components/RainbowKitProvider/RainbowKitConfigProvider.d.ts +20 -0
- package/dist/components/RainbowKitProvider/RainbowKitProvider.d.ts +16 -1
- package/dist/encryption-3YHRI3PA.js +14 -0
- package/dist/hooks/useDeviceType.d.ts +9 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +896 -687
- package/dist/wallets/walletConnectors/abcWallet/api/index.js +6 -6
- package/dist/wallets/walletConnectors/abcWallet/index.js +3 -3
- package/dist/wallets/walletConnectors/chunk-3WVSOTC4.js +63 -0
- package/dist/wallets/walletConnectors/chunk-43LOEA55.js +63 -0
- package/dist/wallets/walletConnectors/chunk-4NLOE5S3.js +63 -0
- package/dist/wallets/walletConnectors/chunk-5MSMALF7.js +63 -0
- package/dist/wallets/walletConnectors/chunk-6KOHIL7T.js +63 -0
- package/dist/wallets/walletConnectors/chunk-7FFIZE76.js +63 -0
- package/dist/wallets/walletConnectors/chunk-HS2FAOAJ.js +63 -0
- package/dist/wallets/walletConnectors/chunk-IA4EQFSS.js +474 -0
- package/dist/wallets/walletConnectors/chunk-IHM7I7D5.js +63 -0
- package/dist/wallets/walletConnectors/chunk-NA5G3LSC.js +63 -0
- package/dist/wallets/walletConnectors/chunk-NASGGIUS.js +63 -0
- package/dist/wallets/walletConnectors/chunk-NVM3JZ4L.js +63 -0
- package/dist/wallets/walletConnectors/chunk-PLL7P7HY.js +63 -0
- package/dist/wallets/walletConnectors/chunk-RUZBOPMI.js +63 -0
- package/dist/wallets/walletConnectors/chunk-SUXK3JW6.js +280 -0
- package/dist/wallets/walletConnectors/chunk-XDRZSWHB.js +63 -0
- package/dist/wallets/walletConnectors/chunk-XKVRDEDK.js +63 -0
- package/dist/wallets/walletConnectors/chunk-XYAAXWWU.js +63 -0
- package/dist/wallets/walletConnectors/index.js +67 -67
- package/package.json +12 -11
- package/LICENSE +0 -9
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
AuthApi
|
|
4
|
+
} from "./chunk-RLBGBBIO.js";
|
|
5
|
+
import {
|
|
6
|
+
BitcoinApi
|
|
7
|
+
} from "./chunk-IA4EQFSS.js";
|
|
8
|
+
import {
|
|
9
|
+
SigningApi
|
|
10
|
+
} from "./chunk-TUUNSVKZ.js";
|
|
11
|
+
import {
|
|
12
|
+
SolanaApi
|
|
13
|
+
} from "./chunk-2J66VMY5.js";
|
|
14
|
+
import {
|
|
15
|
+
TransactionApi
|
|
16
|
+
} from "./chunk-HDYBRMYW.js";
|
|
17
|
+
import {
|
|
18
|
+
WalletApi
|
|
19
|
+
} from "./chunk-ESRU5KCF.js";
|
|
20
|
+
|
|
21
|
+
// src/wallets/walletConnectors/abcWallet/api/index.ts
|
|
22
|
+
var AbcWaasApiClient = class {
|
|
23
|
+
constructor(config) {
|
|
24
|
+
this.auth = new AuthApi(config);
|
|
25
|
+
this.wallet = new WalletApi(config);
|
|
26
|
+
this.transaction = new TransactionApi(config);
|
|
27
|
+
this.signing = new SigningApi(config);
|
|
28
|
+
this.solana = new SolanaApi(config);
|
|
29
|
+
this.bitcoin = new BitcoinApi(config);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if user is authenticated
|
|
33
|
+
*/
|
|
34
|
+
isAuthenticated() {
|
|
35
|
+
return this.auth.isAuthenticated();
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if access token is expired
|
|
39
|
+
*/
|
|
40
|
+
isTokenExpired() {
|
|
41
|
+
return this.auth.isTokenExpired();
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Get current access token
|
|
45
|
+
*/
|
|
46
|
+
getAccessToken() {
|
|
47
|
+
return this.auth.getAccessToken();
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Logout (clear tokens)
|
|
51
|
+
*/
|
|
52
|
+
async logout() {
|
|
53
|
+
await this.auth.logout();
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
function createAbcWaasApiClient(config) {
|
|
57
|
+
return new AbcWaasApiClient(config);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
AbcWaasApiClient,
|
|
62
|
+
createAbcWaasApiClient
|
|
63
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
TransactionApi
|
|
4
|
+
} from "./chunk-KD2OAMDA.js";
|
|
5
|
+
import {
|
|
6
|
+
SolanaApi
|
|
7
|
+
} from "./chunk-DMRM7XAS.js";
|
|
8
|
+
import {
|
|
9
|
+
AuthApi
|
|
10
|
+
} from "./chunk-W7R3JGSC.js";
|
|
11
|
+
import {
|
|
12
|
+
BitcoinApi
|
|
13
|
+
} from "./chunk-SPR4W5TG.js";
|
|
14
|
+
import {
|
|
15
|
+
SigningApi
|
|
16
|
+
} from "./chunk-4UGXLYKP.js";
|
|
17
|
+
import {
|
|
18
|
+
WalletApi
|
|
19
|
+
} from "./chunk-JBRW4UTW.js";
|
|
20
|
+
|
|
21
|
+
// src/wallets/walletConnectors/abcWallet/api/index.ts
|
|
22
|
+
var AbcWaasApiClient = class {
|
|
23
|
+
constructor(config) {
|
|
24
|
+
this.auth = new AuthApi(config);
|
|
25
|
+
this.wallet = new WalletApi(config);
|
|
26
|
+
this.transaction = new TransactionApi(config);
|
|
27
|
+
this.signing = new SigningApi(config);
|
|
28
|
+
this.solana = new SolanaApi(config);
|
|
29
|
+
this.bitcoin = new BitcoinApi(config);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if user is authenticated
|
|
33
|
+
*/
|
|
34
|
+
isAuthenticated() {
|
|
35
|
+
return this.auth.isAuthenticated();
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if access token is expired
|
|
39
|
+
*/
|
|
40
|
+
isTokenExpired() {
|
|
41
|
+
return this.auth.isTokenExpired();
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Get current access token
|
|
45
|
+
*/
|
|
46
|
+
getAccessToken() {
|
|
47
|
+
return this.auth.getAccessToken();
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Logout (clear tokens)
|
|
51
|
+
*/
|
|
52
|
+
async logout() {
|
|
53
|
+
await this.auth.logout();
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
function createAbcWaasApiClient(config) {
|
|
57
|
+
return new AbcWaasApiClient(config);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
AbcWaasApiClient,
|
|
62
|
+
createAbcWaasApiClient
|
|
63
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
SigningApi
|
|
4
|
+
} from "./chunk-4UGXLYKP.js";
|
|
5
|
+
import {
|
|
6
|
+
SolanaApi
|
|
7
|
+
} from "./chunk-DMRM7XAS.js";
|
|
8
|
+
import {
|
|
9
|
+
AuthApi
|
|
10
|
+
} from "./chunk-W7R3JGSC.js";
|
|
11
|
+
import {
|
|
12
|
+
BitcoinApi
|
|
13
|
+
} from "./chunk-SPR4W5TG.js";
|
|
14
|
+
import {
|
|
15
|
+
TransactionApi
|
|
16
|
+
} from "./chunk-KD2OAMDA.js";
|
|
17
|
+
import {
|
|
18
|
+
WalletApi
|
|
19
|
+
} from "./chunk-JBRW4UTW.js";
|
|
20
|
+
|
|
21
|
+
// src/wallets/walletConnectors/abcWallet/api/index.ts
|
|
22
|
+
var AbcWaasApiClient = class {
|
|
23
|
+
constructor(config) {
|
|
24
|
+
this.auth = new AuthApi(config);
|
|
25
|
+
this.wallet = new WalletApi(config);
|
|
26
|
+
this.transaction = new TransactionApi(config);
|
|
27
|
+
this.signing = new SigningApi(config);
|
|
28
|
+
this.solana = new SolanaApi(config);
|
|
29
|
+
this.bitcoin = new BitcoinApi(config);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if user is authenticated
|
|
33
|
+
*/
|
|
34
|
+
isAuthenticated() {
|
|
35
|
+
return this.auth.isAuthenticated();
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if access token is expired
|
|
39
|
+
*/
|
|
40
|
+
isTokenExpired() {
|
|
41
|
+
return this.auth.isTokenExpired();
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Get current access token
|
|
45
|
+
*/
|
|
46
|
+
getAccessToken() {
|
|
47
|
+
return this.auth.getAccessToken();
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Logout (clear tokens)
|
|
51
|
+
*/
|
|
52
|
+
async logout() {
|
|
53
|
+
await this.auth.logout();
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
function createAbcWaasApiClient(config) {
|
|
57
|
+
return new AbcWaasApiClient(config);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
AbcWaasApiClient,
|
|
62
|
+
createAbcWaasApiClient
|
|
63
|
+
};
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
loadAuthState,
|
|
4
|
+
saveAuthState
|
|
5
|
+
} from "./chunk-W2VDZD74.js";
|
|
6
|
+
|
|
7
|
+
// src/wallets/walletConnectors/abcWallet/abcBitcoinConnector.ts
|
|
8
|
+
var AbcBitcoinConnector = class {
|
|
9
|
+
constructor(config) {
|
|
10
|
+
this.wallet = null;
|
|
11
|
+
this.connected = false;
|
|
12
|
+
// Event listeners
|
|
13
|
+
this.connectListeners = /* @__PURE__ */ new Set();
|
|
14
|
+
this.disconnectListeners = /* @__PURE__ */ new Set();
|
|
15
|
+
this.accountsChangedListeners = /* @__PURE__ */ new Set();
|
|
16
|
+
this.networkChangedListeners = /* @__PURE__ */ new Set();
|
|
17
|
+
this.client = config.client;
|
|
18
|
+
this.provider = config.provider;
|
|
19
|
+
this.setupProviderListeners();
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Setup provider event listeners
|
|
23
|
+
*/
|
|
24
|
+
setupProviderListeners() {
|
|
25
|
+
this.provider.on("connect", () => {
|
|
26
|
+
this.connected = true;
|
|
27
|
+
if (this.wallet) {
|
|
28
|
+
for (const listener of this.connectListeners) {
|
|
29
|
+
listener(this.wallet);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
this.provider.on("disconnect", () => {
|
|
34
|
+
this.connected = false;
|
|
35
|
+
this.wallet = null;
|
|
36
|
+
for (const listener of this.disconnectListeners) {
|
|
37
|
+
listener();
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
this.provider.on("accountsChanged", (accounts) => {
|
|
41
|
+
for (const listener of this.accountsChangedListeners) {
|
|
42
|
+
listener(accounts);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
this.provider.on("networkChanged", (network) => {
|
|
46
|
+
for (const listener of this.networkChangedListeners) {
|
|
47
|
+
listener(network);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Connect Bitcoin wallet
|
|
53
|
+
*/
|
|
54
|
+
async connect() {
|
|
55
|
+
try {
|
|
56
|
+
const authState = loadAuthState();
|
|
57
|
+
console.log("[BitcoinConnector] \u{1F527} connect() called:", {
|
|
58
|
+
hasAuthState: !!authState,
|
|
59
|
+
isAuthenticated: authState?.isAuthenticated,
|
|
60
|
+
hasBitcoinWallet: !!authState?.bitcoinWallet,
|
|
61
|
+
bitcoinAddress: authState?.bitcoinWallet?.address
|
|
62
|
+
});
|
|
63
|
+
if (!authState || !authState.isAuthenticated || !authState.bitcoinWallet) {
|
|
64
|
+
throw new Error("BITCOIN_LOGIN_REQUIRED");
|
|
65
|
+
}
|
|
66
|
+
this.wallet = authState.bitcoinWallet;
|
|
67
|
+
this.provider.setWallet(authState.bitcoinWallet);
|
|
68
|
+
this.provider.setRequestPinCallback(async () => {
|
|
69
|
+
if (!authState.pin) {
|
|
70
|
+
console.error("[BitcoinConnector] \u274C PIN not available in authState");
|
|
71
|
+
throw new Error("PIN not available");
|
|
72
|
+
}
|
|
73
|
+
return authState.pin;
|
|
74
|
+
});
|
|
75
|
+
console.log("[BitcoinConnector] \u2705 Wallet and PIN callback set:", {
|
|
76
|
+
address: authState.bitcoinWallet.address,
|
|
77
|
+
publicKey: authState.bitcoinWallet.publicKey,
|
|
78
|
+
addressType: authState.bitcoinWallet.addressType,
|
|
79
|
+
network: authState.bitcoinWallet.network,
|
|
80
|
+
hasPIN: !!authState.pin
|
|
81
|
+
});
|
|
82
|
+
this.connected = true;
|
|
83
|
+
return {
|
|
84
|
+
address: authState.bitcoinWallet.address,
|
|
85
|
+
publicKey: authState.bitcoinWallet.publicKey,
|
|
86
|
+
network: authState.bitcoinWallet.network
|
|
87
|
+
};
|
|
88
|
+
} catch (error) {
|
|
89
|
+
if (error.message === "BITCOIN_LOGIN_REQUIRED") {
|
|
90
|
+
throw error;
|
|
91
|
+
}
|
|
92
|
+
console.error("[BitcoinConnector] \u274C connect error:", error);
|
|
93
|
+
throw error;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Disconnect Bitcoin wallet
|
|
98
|
+
*/
|
|
99
|
+
async disconnect() {
|
|
100
|
+
try {
|
|
101
|
+
this.provider.clearWallet();
|
|
102
|
+
this.wallet = null;
|
|
103
|
+
this.connected = false;
|
|
104
|
+
console.log("[BitcoinConnector] \u2705 Wallet disconnected");
|
|
105
|
+
} catch (error) {
|
|
106
|
+
console.error("[BitcoinConnector] \u274C disconnect error:", error);
|
|
107
|
+
throw error;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Get Bitcoin address
|
|
112
|
+
*/
|
|
113
|
+
async getAddress() {
|
|
114
|
+
return this.provider.getAddress();
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Get compressed public key (33 bytes)
|
|
118
|
+
*/
|
|
119
|
+
async getPublicKey() {
|
|
120
|
+
return this.provider.getPublicKey();
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Get address type (bech32, p2pkh, etc.)
|
|
124
|
+
*/
|
|
125
|
+
getAddressType() {
|
|
126
|
+
return this.provider.getAddressType();
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Get UTXOs
|
|
130
|
+
*/
|
|
131
|
+
async getUtxos(forceRefresh = false) {
|
|
132
|
+
return this.provider.getUtxos(forceRefresh);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Get balance (in satoshis)
|
|
136
|
+
*/
|
|
137
|
+
async getBalance(forceRefresh = false) {
|
|
138
|
+
return this.provider.getBalance(forceRefresh);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Estimate transaction fee
|
|
142
|
+
*/
|
|
143
|
+
async estimateFee(targetBlocks = 6) {
|
|
144
|
+
return this.provider.estimateFee(targetBlocks);
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Sign Bitcoin message (BIP-322)
|
|
148
|
+
* NOTE: Currently not supported - Bitcoin uses v2 API which doesn't have message signing endpoint
|
|
149
|
+
*/
|
|
150
|
+
async signMessage(message) {
|
|
151
|
+
return this.provider.signMessage(message);
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Send Bitcoin transaction (high-level API)
|
|
155
|
+
* Creates, signs, and broadcasts transaction
|
|
156
|
+
*/
|
|
157
|
+
async sendTransaction(params) {
|
|
158
|
+
return this.provider.sendTransaction(params);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Broadcast signed transaction to network (low-level API)
|
|
162
|
+
*/
|
|
163
|
+
async broadcastTransaction(rawTransaction, psbt) {
|
|
164
|
+
return this.provider.broadcastTransaction(rawTransaction, psbt);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Check if authorized (has valid session)
|
|
168
|
+
*/
|
|
169
|
+
async isAuthorized() {
|
|
170
|
+
try {
|
|
171
|
+
const authState = loadAuthState();
|
|
172
|
+
if (!authState || !authState.isAuthenticated) {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
if (!authState.bitcoinWallet) {
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
178
|
+
return !this.client.auth.isTokenExpired();
|
|
179
|
+
} catch {
|
|
180
|
+
return false;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Check if connected
|
|
185
|
+
*/
|
|
186
|
+
isConnected() {
|
|
187
|
+
return this.connected && this.provider.isConnected();
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Get current wallet
|
|
191
|
+
*/
|
|
192
|
+
getWallet() {
|
|
193
|
+
return this.wallet;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Get provider
|
|
197
|
+
*/
|
|
198
|
+
getProvider() {
|
|
199
|
+
return this.provider;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Get wallet info
|
|
203
|
+
*/
|
|
204
|
+
getWalletInfo() {
|
|
205
|
+
return this.provider.getWalletInfo();
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Switch network
|
|
209
|
+
*/
|
|
210
|
+
async switchNetwork(network) {
|
|
211
|
+
this.provider.setNetwork(network);
|
|
212
|
+
const authState = loadAuthState();
|
|
213
|
+
if (authState?.bitcoinWallet) {
|
|
214
|
+
authState.bitcoinWallet.network = network === "mainnet" ? "bitcoin" : "bitcoin_testnet";
|
|
215
|
+
saveAuthState(authState);
|
|
216
|
+
}
|
|
217
|
+
console.log("[BitcoinConnector] \u{1F504} Network switched to:", network);
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Get current network
|
|
221
|
+
*/
|
|
222
|
+
getNetwork() {
|
|
223
|
+
return this.provider.getNetwork().type;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Refresh UTXO cache
|
|
227
|
+
*/
|
|
228
|
+
async refreshUtxos() {
|
|
229
|
+
return this.provider.refreshUtxos();
|
|
230
|
+
}
|
|
231
|
+
on(event, listener) {
|
|
232
|
+
switch (event) {
|
|
233
|
+
case "connect":
|
|
234
|
+
this.connectListeners.add(listener);
|
|
235
|
+
break;
|
|
236
|
+
case "disconnect":
|
|
237
|
+
this.disconnectListeners.add(listener);
|
|
238
|
+
break;
|
|
239
|
+
case "accountsChanged":
|
|
240
|
+
this.accountsChangedListeners.add(listener);
|
|
241
|
+
break;
|
|
242
|
+
case "networkChanged":
|
|
243
|
+
this.networkChangedListeners.add(listener);
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
off(event, listener) {
|
|
248
|
+
switch (event) {
|
|
249
|
+
case "connect":
|
|
250
|
+
this.connectListeners.delete(listener);
|
|
251
|
+
break;
|
|
252
|
+
case "disconnect":
|
|
253
|
+
this.disconnectListeners.delete(listener);
|
|
254
|
+
break;
|
|
255
|
+
case "accountsChanged":
|
|
256
|
+
this.accountsChangedListeners.delete(listener);
|
|
257
|
+
break;
|
|
258
|
+
case "networkChanged":
|
|
259
|
+
this.networkChangedListeners.delete(listener);
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Remove all listeners
|
|
265
|
+
*/
|
|
266
|
+
removeAllListeners() {
|
|
267
|
+
this.connectListeners.clear();
|
|
268
|
+
this.disconnectListeners.clear();
|
|
269
|
+
this.accountsChangedListeners.clear();
|
|
270
|
+
this.networkChangedListeners.clear();
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
function createAbcBitcoinConnector(config) {
|
|
274
|
+
return new AbcBitcoinConnector(config);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export {
|
|
278
|
+
AbcBitcoinConnector,
|
|
279
|
+
createAbcBitcoinConnector
|
|
280
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
WalletApi
|
|
4
|
+
} from "./chunk-ESRU5KCF.js";
|
|
5
|
+
import {
|
|
6
|
+
AuthApi
|
|
7
|
+
} from "./chunk-RLBGBBIO.js";
|
|
8
|
+
import {
|
|
9
|
+
BitcoinApi
|
|
10
|
+
} from "./chunk-IA4EQFSS.js";
|
|
11
|
+
import {
|
|
12
|
+
SigningApi
|
|
13
|
+
} from "./chunk-TUUNSVKZ.js";
|
|
14
|
+
import {
|
|
15
|
+
SolanaApi
|
|
16
|
+
} from "./chunk-2J66VMY5.js";
|
|
17
|
+
import {
|
|
18
|
+
TransactionApi
|
|
19
|
+
} from "./chunk-HDYBRMYW.js";
|
|
20
|
+
|
|
21
|
+
// src/wallets/walletConnectors/abcWallet/api/index.ts
|
|
22
|
+
var AbcWaasApiClient = class {
|
|
23
|
+
constructor(config) {
|
|
24
|
+
this.auth = new AuthApi(config);
|
|
25
|
+
this.wallet = new WalletApi(config);
|
|
26
|
+
this.transaction = new TransactionApi(config);
|
|
27
|
+
this.signing = new SigningApi(config);
|
|
28
|
+
this.solana = new SolanaApi(config);
|
|
29
|
+
this.bitcoin = new BitcoinApi(config);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if user is authenticated
|
|
33
|
+
*/
|
|
34
|
+
isAuthenticated() {
|
|
35
|
+
return this.auth.isAuthenticated();
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if access token is expired
|
|
39
|
+
*/
|
|
40
|
+
isTokenExpired() {
|
|
41
|
+
return this.auth.isTokenExpired();
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Get current access token
|
|
45
|
+
*/
|
|
46
|
+
getAccessToken() {
|
|
47
|
+
return this.auth.getAccessToken();
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Logout (clear tokens)
|
|
51
|
+
*/
|
|
52
|
+
async logout() {
|
|
53
|
+
await this.auth.logout();
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
function createAbcWaasApiClient(config) {
|
|
57
|
+
return new AbcWaasApiClient(config);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
AbcWaasApiClient,
|
|
62
|
+
createAbcWaasApiClient
|
|
63
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
SolanaApi
|
|
4
|
+
} from "./chunk-DMRM7XAS.js";
|
|
5
|
+
import {
|
|
6
|
+
AuthApi
|
|
7
|
+
} from "./chunk-W7R3JGSC.js";
|
|
8
|
+
import {
|
|
9
|
+
SigningApi
|
|
10
|
+
} from "./chunk-4UGXLYKP.js";
|
|
11
|
+
import {
|
|
12
|
+
BitcoinApi
|
|
13
|
+
} from "./chunk-SPR4W5TG.js";
|
|
14
|
+
import {
|
|
15
|
+
TransactionApi
|
|
16
|
+
} from "./chunk-KD2OAMDA.js";
|
|
17
|
+
import {
|
|
18
|
+
WalletApi
|
|
19
|
+
} from "./chunk-JBRW4UTW.js";
|
|
20
|
+
|
|
21
|
+
// src/wallets/walletConnectors/abcWallet/api/index.ts
|
|
22
|
+
var AbcWaasApiClient = class {
|
|
23
|
+
constructor(config) {
|
|
24
|
+
this.auth = new AuthApi(config);
|
|
25
|
+
this.wallet = new WalletApi(config);
|
|
26
|
+
this.transaction = new TransactionApi(config);
|
|
27
|
+
this.signing = new SigningApi(config);
|
|
28
|
+
this.solana = new SolanaApi(config);
|
|
29
|
+
this.bitcoin = new BitcoinApi(config);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if user is authenticated
|
|
33
|
+
*/
|
|
34
|
+
isAuthenticated() {
|
|
35
|
+
return this.auth.isAuthenticated();
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if access token is expired
|
|
39
|
+
*/
|
|
40
|
+
isTokenExpired() {
|
|
41
|
+
return this.auth.isTokenExpired();
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Get current access token
|
|
45
|
+
*/
|
|
46
|
+
getAccessToken() {
|
|
47
|
+
return this.auth.getAccessToken();
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Logout (clear tokens)
|
|
51
|
+
*/
|
|
52
|
+
async logout() {
|
|
53
|
+
await this.auth.logout();
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
function createAbcWaasApiClient(config) {
|
|
57
|
+
return new AbcWaasApiClient(config);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
AbcWaasApiClient,
|
|
62
|
+
createAbcWaasApiClient
|
|
63
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
TransactionApi
|
|
4
|
+
} from "./chunk-KD2OAMDA.js";
|
|
5
|
+
import {
|
|
6
|
+
BitcoinApi
|
|
7
|
+
} from "./chunk-SPR4W5TG.js";
|
|
8
|
+
import {
|
|
9
|
+
SigningApi
|
|
10
|
+
} from "./chunk-4UGXLYKP.js";
|
|
11
|
+
import {
|
|
12
|
+
AuthApi
|
|
13
|
+
} from "./chunk-W7R3JGSC.js";
|
|
14
|
+
import {
|
|
15
|
+
SolanaApi
|
|
16
|
+
} from "./chunk-DMRM7XAS.js";
|
|
17
|
+
import {
|
|
18
|
+
WalletApi
|
|
19
|
+
} from "./chunk-JBRW4UTW.js";
|
|
20
|
+
|
|
21
|
+
// src/wallets/walletConnectors/abcWallet/api/index.ts
|
|
22
|
+
var AbcWaasApiClient = class {
|
|
23
|
+
constructor(config) {
|
|
24
|
+
this.auth = new AuthApi(config);
|
|
25
|
+
this.wallet = new WalletApi(config);
|
|
26
|
+
this.transaction = new TransactionApi(config);
|
|
27
|
+
this.signing = new SigningApi(config);
|
|
28
|
+
this.solana = new SolanaApi(config);
|
|
29
|
+
this.bitcoin = new BitcoinApi(config);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if user is authenticated
|
|
33
|
+
*/
|
|
34
|
+
isAuthenticated() {
|
|
35
|
+
return this.auth.isAuthenticated();
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if access token is expired
|
|
39
|
+
*/
|
|
40
|
+
isTokenExpired() {
|
|
41
|
+
return this.auth.isTokenExpired();
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Get current access token
|
|
45
|
+
*/
|
|
46
|
+
getAccessToken() {
|
|
47
|
+
return this.auth.getAccessToken();
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Logout (clear tokens)
|
|
51
|
+
*/
|
|
52
|
+
async logout() {
|
|
53
|
+
await this.auth.logout();
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
function createAbcWaasApiClient(config) {
|
|
57
|
+
return new AbcWaasApiClient(config);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
AbcWaasApiClient,
|
|
62
|
+
createAbcWaasApiClient
|
|
63
|
+
};
|