@talken/talkenkit 2.4.15 → 2.4.17
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/abcWallet-54KUGWUZ.js +192 -0
- package/dist/abcWallet-KZHOADBJ.js +192 -0
- package/dist/abcWallet-NZAVB4PI.js +190 -0
- package/dist/chunk-5X3ROW3U.js +8777 -0
- package/dist/chunk-DKA3NVFM.js +8497 -0
- package/dist/chunk-QNZ5HSPM.js +8339 -0
- package/dist/chunk-VE53ZNZV.js +331 -0
- package/dist/components/ConfirmationModal/ApproveSection.css.d.ts +16 -0
- package/dist/components/ConfirmationModal/ApproveSection.d.ts +8 -0
- package/dist/components/ConfirmationModal/NFTPlaceholder.css.d.ts +7 -0
- package/dist/components/ConfirmationModal/NFTPlaceholder.d.ts +8 -0
- package/dist/components/ConfirmationModal/NftApprovalSection.css.d.ts +10 -0
- package/dist/components/ConfirmationModal/NftApprovalSection.d.ts +7 -0
- package/dist/components/ConfirmationModal/SignConfirmationModal.css.d.ts +35 -0
- package/dist/components/ConfirmationModal/SignConfirmationModal.d.ts +17 -0
- package/dist/components/ConfirmationModal/SwapSection.css.d.ts +17 -0
- package/dist/components/ConfirmationModal/SwapSection.d.ts +7 -0
- package/dist/components/ConfirmationModal/TransactionConfirmationModal.css.d.ts +49 -0
- package/dist/components/ConfirmationModal/TransactionConfirmationModal.d.ts +12 -0
- package/dist/components/ConfirmationModal/TransferSection.css.d.ts +17 -0
- package/dist/components/ConfirmationModal/TransferSection.d.ts +7 -0
- package/dist/components/ConfirmationModal/commonStyles.css.d.ts +37 -0
- package/dist/components/ConfirmationModal/constants.d.ts +16 -0
- package/dist/components/ConfirmationModal/index.d.ts +9 -0
- package/dist/components/ConfirmationModal/modalTheme.css.d.ts +20 -0
- package/dist/components/ConfirmationModal/transactionUIRegistry.d.ts +134 -0
- package/dist/components/ConfirmationModal/utils.d.ts +37 -0
- package/dist/components/ConnectOptions/AbcWaasAuth/AbcWaasAuthSections.css.d.ts +1 -0
- package/dist/components/ConnectOptions/AbcWaasAuth/AbcWaasAuthSections.d.ts +1 -1
- package/dist/components/ConnectOptions/AbcWaasAuth/hooks/useAbcWaasAuth.d.ts +2 -25
- package/dist/components/ConnectOptions/AbcWaasAuth/hooks/useAbcWaasSocial.d.ts +1 -47
- package/dist/components/ConnectOptions/PinAuth/hooks/useWalletGeneration.d.ts +4 -21
- package/dist/components/GasFeeModal/GasFeeEditModal.css.d.ts +32 -0
- package/dist/components/GasFeeModal/GasFeeEditModal.d.ts +21 -0
- package/dist/components/GasFeeModal/index.d.ts +3 -0
- package/dist/components/GasFeeModal/modalTheme.css.d.ts +19 -0
- package/dist/components/Icons/Close2.d.ts +7 -0
- package/dist/components/Icons/Copy2.d.ts +4 -0
- package/dist/components/Icons/Dropdown2.d.ts +4 -0
- package/dist/components/Icons/Edit.d.ts +4 -0
- package/dist/components/Icons/InfoCircle.d.ts +4 -0
- package/dist/components/Icons/Kakao.d.ts +2 -0
- package/dist/components/Icons/Minus.d.ts +4 -0
- package/dist/components/Icons/Plus.d.ts +4 -0
- package/dist/components/Icons/SettingsGear.d.ts +4 -0
- package/dist/components/Icons/SpeedHigh.d.ts +4 -0
- package/dist/components/Icons/SpeedLow.d.ts +4 -0
- package/dist/components/Icons/SpeedMedium.d.ts +4 -0
- package/dist/components/RainbowKitProvider/InternalPinProvider.d.ts +7 -9
- package/dist/components/RainbowKitProvider/RainbowKitConfigProvider.d.ts +1 -6
- package/dist/components/RainbowKitProvider/RainbowKitProvider.d.ts +7 -7
- package/dist/components/Toast/Toast.css.d.ts +2 -0
- package/dist/components/Toast/Toast.d.ts +6 -0
- package/dist/components/Toast/index.d.ts +4 -0
- package/dist/components/Toast/useToast.d.ts +10 -0
- package/dist/config/networks.d.ts +10 -0
- package/dist/css/sprinkles.css.d.ts +1 -1
- package/dist/hooks/useSolanaWallet.d.ts +5 -23
- package/dist/hooks/useTronWallet.d.ts +63 -0
- package/dist/index.css +1903 -236
- package/dist/index.d.ts +8 -3
- package/dist/index.js +7557 -3592
- package/dist/klipWallet-RD5Y4UEK.js +8 -0
- package/dist/providers/SignConfirmationProvider/SignConfirmationProvider.d.ts +22 -0
- package/dist/providers/SignConfirmationProvider/index.d.ts +6 -0
- package/dist/providers/SignConfirmationProvider/requestParsers.d.ts +24 -0
- package/dist/providers/SignConfirmationProvider/types.d.ts +91 -0
- package/dist/providers/SignConfirmationProvider/useApiClient.d.ts +15 -0
- package/dist/providers/SignConfirmationProvider/useTransactionResolver.d.ts +18 -0
- package/dist/secure-AEBFSVWE.js +8 -0
- package/dist/services/AbcAgenticWalletService.d.ts +111 -0
- package/dist/services/AbcAuthService.d.ts +26 -20
- package/dist/types/index.d.ts +3 -0
- package/dist/types/token.d.ts +82 -0
- package/dist/utils/abi/abiDecoder.d.ts +144 -0
- package/dist/utils/apiClientFactory.d.ts +21 -0
- package/dist/utils/blockies.d.ts +12 -0
- package/dist/utils/tokenMapper.d.ts +10 -0
- package/dist/wallets/walletConnectors/abcWallet/abcApi.d.ts +4 -1
- package/dist/wallets/walletConnectors/abcWallet/abcApi.js +7 -7
- package/dist/wallets/walletConnectors/abcWallet/abcBitcoinConnector.js +5 -5
- package/dist/wallets/walletConnectors/abcWallet/abcBitcoinProvider.d.ts +6 -8
- package/dist/wallets/walletConnectors/abcWallet/abcBitcoinProvider.js +1 -1
- package/dist/wallets/walletConnectors/abcWallet/abcConnector.js +9 -9
- package/dist/wallets/walletConnectors/abcWallet/abcProvider.d.ts +17 -6
- package/dist/wallets/walletConnectors/abcWallet/abcProvider.js +5 -4
- package/dist/wallets/walletConnectors/abcWallet/abcSolanaProvider.d.ts +11 -34
- package/dist/wallets/walletConnectors/abcWallet/abcSolanaProvider.js +1 -1
- package/dist/wallets/walletConnectors/abcWallet/abcSolanaWalletAdapter.d.ts +3 -11
- package/dist/wallets/walletConnectors/abcWallet/abcSolanaWalletAdapter.js +17 -80
- package/dist/wallets/walletConnectors/abcWallet/abcTronProvider.d.ts +112 -0
- package/dist/wallets/walletConnectors/abcWallet/abcTronProvider.js +11 -0
- package/dist/wallets/walletConnectors/abcWallet/abcWallet.d.ts +2 -0
- package/dist/wallets/walletConnectors/abcWallet/abcWallet.js +11 -10
- package/dist/wallets/walletConnectors/abcWallet/api/AuthApi.d.ts +9 -11
- package/dist/wallets/walletConnectors/abcWallet/api/AuthApi.js +6 -6
- package/dist/wallets/walletConnectors/abcWallet/api/BaseApiClient.d.ts +1 -1
- package/dist/wallets/walletConnectors/abcWallet/api/BaseApiClient.js +5 -5
- package/dist/wallets/walletConnectors/abcWallet/api/BitcoinApi.js +6 -6
- package/dist/wallets/walletConnectors/abcWallet/api/GasApi.d.ts +45 -0
- package/dist/wallets/walletConnectors/abcWallet/api/GasApi.js +12 -0
- package/dist/wallets/walletConnectors/abcWallet/api/SigningApi.js +7 -7
- package/dist/wallets/walletConnectors/abcWallet/api/SolanaApi.d.ts +9 -1
- package/dist/wallets/walletConnectors/abcWallet/api/SolanaApi.js +7 -7
- package/dist/wallets/walletConnectors/abcWallet/api/TalkenApiClient.d.ts +333 -0
- package/dist/wallets/walletConnectors/abcWallet/api/TalkenApiClient.js +11 -0
- package/dist/wallets/walletConnectors/abcWallet/api/TalkenApiSingleton.d.ts +18 -0
- package/dist/wallets/walletConnectors/abcWallet/api/TalkenApiSingleton.js +14 -0
- package/dist/wallets/walletConnectors/abcWallet/api/TransactionApi.d.ts +2 -2
- package/dist/wallets/walletConnectors/abcWallet/api/TransactionApi.js +7 -7
- package/dist/wallets/walletConnectors/abcWallet/api/TronApi.d.ts +102 -0
- package/dist/wallets/walletConnectors/abcWallet/api/TronApi.js +12 -0
- package/dist/wallets/walletConnectors/abcWallet/api/WalletApi.d.ts +4 -2
- package/dist/wallets/walletConnectors/abcWallet/api/WalletApi.js +7 -7
- package/dist/wallets/walletConnectors/abcWallet/api/WalletscanApi.d.ts +60 -0
- package/dist/wallets/walletConnectors/abcWallet/api/WalletscanApi.js +12 -0
- package/dist/wallets/walletConnectors/abcWallet/api/index.d.ts +24 -0
- package/dist/wallets/walletConnectors/abcWallet/api/index.js +35 -17
- package/dist/wallets/walletConnectors/abcWallet/constants.d.ts +39 -1
- package/dist/wallets/walletConnectors/abcWallet/constants.js +5 -1
- package/dist/wallets/walletConnectors/abcWallet/googleAuth.d.ts +6 -0
- package/dist/wallets/walletConnectors/abcWallet/googleAuth.js +37 -1
- package/dist/wallets/walletConnectors/abcWallet/index.d.ts +5 -3
- package/dist/wallets/walletConnectors/abcWallet/index.js +44 -31
- package/dist/wallets/walletConnectors/abcWallet/kakaoAuth.d.ts +27 -0
- package/dist/wallets/walletConnectors/abcWallet/kakaoAuth.js +290 -0
- package/dist/wallets/walletConnectors/abcWallet/networkConfig.d.ts +39 -3
- package/dist/wallets/walletConnectors/abcWallet/networkConfig.js +11 -3
- package/dist/wallets/walletConnectors/abcWallet/secure.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/sessionUtils.js +1 -1
- package/dist/wallets/walletConnectors/abcWallet/types.d.ts +369 -7
- package/dist/wallets/walletConnectors/abcWallet/types.js +5 -3
- package/dist/wallets/walletConnectors/abcWallet/utils.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/walletGeneration.d.ts +10 -19
- package/dist/wallets/walletConnectors/abcWallet/walletGeneration.js +2 -2
- package/dist/wallets/walletConnectors/berasigWallet/berasigWallet.js +2 -2
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
- package/dist/wallets/walletConnectors/binanceWallet/binanceWallet.js +2 -2
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
- package/dist/wallets/walletConnectors/chunk-25V3FW3O.js +282 -0
- package/dist/wallets/walletConnectors/chunk-27346T3J.js +134 -0
- package/dist/wallets/walletConnectors/chunk-5CNLMOB2.js +75 -0
- package/dist/wallets/walletConnectors/chunk-5K45TCAM.js +333 -0
- package/dist/wallets/walletConnectors/chunk-5VDSMZC4.js +286 -0
- package/dist/wallets/walletConnectors/chunk-5W7RBMPH.js +351 -0
- package/dist/wallets/walletConnectors/chunk-5XORKEWE.js +326 -0
- package/dist/wallets/walletConnectors/chunk-63WBO52A.js +77 -0
- package/dist/wallets/walletConnectors/chunk-7IRF225N.js +75 -0
- package/dist/wallets/walletConnectors/chunk-7QHCSJDN.js +726 -0
- package/dist/wallets/walletConnectors/chunk-A27H6PEU.js +739 -0
- package/dist/wallets/walletConnectors/chunk-A4WR3CFN.js +130 -0
- package/dist/wallets/walletConnectors/chunk-A6FUNQWF.js +572 -0
- package/dist/wallets/walletConnectors/chunk-AF4OCS7N.js +46 -0
- package/dist/wallets/walletConnectors/chunk-AFWBXEEC.js +66 -0
- package/dist/wallets/walletConnectors/chunk-AUGP2LJR.js +182 -0
- package/dist/wallets/walletConnectors/chunk-AWLDVQXC.js +317 -0
- package/dist/wallets/walletConnectors/chunk-BLEKTKBN.js +479 -0
- package/dist/wallets/walletConnectors/chunk-BVL6G5HI.js +1757 -0
- package/dist/wallets/walletConnectors/chunk-CMTGEHDI.js +485 -0
- package/dist/wallets/walletConnectors/chunk-D5EFTEOM.js +56 -0
- package/dist/wallets/walletConnectors/chunk-DM5NLSWD.js +346 -0
- package/dist/wallets/walletConnectors/chunk-EBGI4D2T.js +69 -0
- package/dist/wallets/walletConnectors/chunk-EEH2HMFG.js +47 -0
- package/dist/wallets/walletConnectors/chunk-F5JWDBKK.js +47 -0
- package/dist/wallets/walletConnectors/chunk-FN67MIIH.js +75 -0
- package/dist/wallets/walletConnectors/chunk-FWYVBX5F.js +75 -0
- package/dist/wallets/walletConnectors/chunk-GH6ZDY4K.js +58 -0
- package/dist/wallets/walletConnectors/chunk-GIJZMIBD.js +63 -0
- package/dist/wallets/walletConnectors/chunk-GO6OLTNF.js +479 -0
- package/dist/wallets/walletConnectors/chunk-HKXBK3NY.js +75 -0
- package/dist/wallets/walletConnectors/chunk-HMD2WWFQ.js +75 -0
- package/dist/wallets/walletConnectors/chunk-HO5Z2CTL.js +280 -0
- package/dist/wallets/walletConnectors/chunk-I3GFVK5O.js +151 -0
- package/dist/wallets/walletConnectors/chunk-IUHZ5ZCE.js +121 -0
- package/dist/wallets/walletConnectors/chunk-JODNZWWG.js +330 -0
- package/dist/wallets/walletConnectors/chunk-JTST3KMW.js +75 -0
- package/dist/wallets/walletConnectors/chunk-KH2L3ONV.js +1599 -0
- package/dist/wallets/walletConnectors/chunk-LHV22375.js +182 -0
- package/dist/wallets/walletConnectors/chunk-LZZE462U.js +315 -0
- package/dist/wallets/walletConnectors/chunk-MGCRUAHX.js +276 -0
- package/dist/wallets/walletConnectors/chunk-MURSKRMJ.js +63 -0
- package/dist/wallets/walletConnectors/chunk-NG7PSAPX.js +115 -0
- package/dist/wallets/walletConnectors/chunk-NHP6D6AH.js +204 -0
- package/dist/wallets/walletConnectors/chunk-O4AU63LK.js +181 -0
- package/dist/wallets/walletConnectors/chunk-OBS74J5N.js +221 -0
- package/dist/wallets/walletConnectors/chunk-ON4U54WO.js +115 -0
- package/dist/wallets/walletConnectors/chunk-PPYBE5TV.js +276 -0
- package/dist/wallets/walletConnectors/chunk-PWWSAM4G.js +309 -0
- package/dist/wallets/walletConnectors/chunk-QB5GDLRU.js +330 -0
- package/dist/wallets/walletConnectors/chunk-QMLG7MAP.js +107 -0
- package/dist/wallets/walletConnectors/chunk-RGIB7FFH.js +47 -0
- package/dist/wallets/walletConnectors/chunk-SHJBMDP4.js +278 -0
- package/dist/wallets/walletConnectors/chunk-SOBJYYIX.js +484 -0
- package/dist/wallets/walletConnectors/chunk-T66U3ADD.js +58 -0
- package/dist/wallets/walletConnectors/chunk-THCKLFSJ.js +75 -0
- package/dist/wallets/walletConnectors/chunk-TS466TDR.js +286 -0
- package/dist/wallets/walletConnectors/chunk-UJGFYQEV.js +459 -0
- package/dist/wallets/walletConnectors/chunk-UXNEBBUV.js +224 -0
- package/dist/wallets/walletConnectors/chunk-VRCNFVPM.js +276 -0
- package/dist/wallets/walletConnectors/chunk-WODNUC65.js +333 -0
- package/dist/wallets/walletConnectors/chunk-X6A2FSHK.js +484 -0
- package/dist/wallets/walletConnectors/chunk-XVRNEES5.js +1541 -0
- package/dist/wallets/walletConnectors/chunk-XWVM2Y5A.js +306 -0
- package/dist/wallets/walletConnectors/chunk-XXG7ABSJ.js +328 -0
- package/dist/wallets/walletConnectors/chunk-YJH4BHSB.js +254 -0
- package/dist/wallets/walletConnectors/chunk-YRDNIP2H.js +90 -0
- package/dist/wallets/walletConnectors/chunk-YTPAWPCA.js +156 -0
- package/dist/wallets/walletConnectors/chunk-ZCSHD7UG.js +562 -0
- package/dist/wallets/walletConnectors/chunk-ZZCZ3RJU.js +272 -0
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
- package/dist/wallets/walletConnectors/index.js +62 -61
- package/dist/wallets/walletConnectors/iopayWallet/iopayWallet.js +2 -2
- package/dist/wallets/walletConnectors/kaiaWallet/kaiaWallet.js +2 -2
- package/dist/wallets/walletConnectors/kaikasWallet/kaikasWallet.js +2 -2
- package/dist/wallets/walletConnectors/klipWallet/klipWallet.d.ts +3 -0
- package/dist/wallets/walletConnectors/klipWallet/klipWallet.js +8 -0
- package/dist/wallets/walletConnectors/klipWallet-PPTYYB5G.js +7 -0
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
- package/dist/wallets/walletConnectors/zealWallet/zealWallet.js +2 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
- package/package.json +2 -1
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TRON API Client
|
|
3
|
+
*
|
|
4
|
+
* Handles TRON-specific operations:
|
|
5
|
+
* - TRON address derivation from EVM public key (secp256k1)
|
|
6
|
+
* - TRX native transfer
|
|
7
|
+
* - TRC20 token transfer
|
|
8
|
+
* - Transaction signing (via V2 sign/hash API with Secure Channel)
|
|
9
|
+
* - Transaction broadcasting
|
|
10
|
+
*
|
|
11
|
+
* Architecture: Same as BitcoinApi
|
|
12
|
+
* - Address derivation: Uses BaseApiClient (automatic token refresh, standard error handling)
|
|
13
|
+
* - Signing operations: Uses direct fetch with Secure Channel encryption (V2 API)
|
|
14
|
+
* - TRON uses the same secp256k1 curve as EVM, just different address encoding (Base58Check with T prefix)
|
|
15
|
+
*/
|
|
16
|
+
import type { AbcWalletResponse } from '../types';
|
|
17
|
+
import { BaseApiClient } from './BaseApiClient';
|
|
18
|
+
/**
|
|
19
|
+
* TRON API Client
|
|
20
|
+
* Extends BaseApiClient for TRON-specific operations
|
|
21
|
+
*/
|
|
22
|
+
export declare class TronApi extends BaseApiClient {
|
|
23
|
+
/**
|
|
24
|
+
* Get TRON address from TalkenApiClient unified addresses endpoint.
|
|
25
|
+
*
|
|
26
|
+
* @param _publicKey - Compressed public key (unused, TalkenApiClient resolves internally)
|
|
27
|
+
* @param _network - TRON network (unused, TalkenApiClient resolves internally)
|
|
28
|
+
* @returns TRON address (starts with 'T')
|
|
29
|
+
*/
|
|
30
|
+
getTronAddress(_publicKey: string, _network: 'tron' | 'tron_nile'): Promise<string>;
|
|
31
|
+
/**
|
|
32
|
+
* Create unsigned TRX native transfer transaction
|
|
33
|
+
*
|
|
34
|
+
* @param params - Transfer parameters
|
|
35
|
+
* @returns Unsigned transaction with raw_data and txID
|
|
36
|
+
*/
|
|
37
|
+
transfer(params: {
|
|
38
|
+
fromAddress: string;
|
|
39
|
+
toAddress: string;
|
|
40
|
+
amount: number;
|
|
41
|
+
network: 'tron' | 'tron_nile';
|
|
42
|
+
}): Promise<{
|
|
43
|
+
txID: string;
|
|
44
|
+
rawData: any;
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* Create unsigned TRC20 token transfer transaction
|
|
48
|
+
*
|
|
49
|
+
* @param params - TRC20 transfer parameters
|
|
50
|
+
* @returns Unsigned transaction with raw_data and txID
|
|
51
|
+
*/
|
|
52
|
+
trc20Transfer(params: {
|
|
53
|
+
fromAddress: string;
|
|
54
|
+
toAddress: string;
|
|
55
|
+
amount: string;
|
|
56
|
+
contractAddress: string;
|
|
57
|
+
feeLimit?: number;
|
|
58
|
+
network: 'tron' | 'tron_nile';
|
|
59
|
+
}): Promise<{
|
|
60
|
+
txID: string;
|
|
61
|
+
rawData: any;
|
|
62
|
+
}>;
|
|
63
|
+
/**
|
|
64
|
+
* Sign transaction hash using Secure Channel (V2 sign/hash API)
|
|
65
|
+
* Same signing flow as Bitcoin - uses EVM wallet credentials via Secure Channel encryption
|
|
66
|
+
*
|
|
67
|
+
* @param hash - Transaction hash (txID) to sign
|
|
68
|
+
* @param wallet - EVM wallet credentials (uid, sid, wid, pvencstr, encryptDevicePassword)
|
|
69
|
+
* @param pinHash - Hashed PIN (SHA-256)
|
|
70
|
+
* @param secureService - SecureService instance for ECDH encryption
|
|
71
|
+
* @returns Array of signature strings (r + s without 0x prefix)
|
|
72
|
+
*/
|
|
73
|
+
signHash(hash: string, wallet: AbcWalletResponse, pinHash: string, secureService: any): Promise<string[]>;
|
|
74
|
+
/**
|
|
75
|
+
* Broadcast signed TRON transaction
|
|
76
|
+
*
|
|
77
|
+
* @param rawData - Raw transaction data from transfer/trc20Transfer
|
|
78
|
+
* @param signatures - Signatures from signHash
|
|
79
|
+
* @param network - TRON network
|
|
80
|
+
* @returns Transaction hash (txid)
|
|
81
|
+
*/
|
|
82
|
+
broadcast(rawData: any, signatures: string[], network: 'tron' | 'tron_nile'): Promise<string>;
|
|
83
|
+
/**
|
|
84
|
+
* Send TRON transaction (Complete flow: transfer/trc20Transfer -> signHash -> broadcast)
|
|
85
|
+
* High-level API that handles all 3 steps
|
|
86
|
+
*
|
|
87
|
+
* @param params - Transaction parameters
|
|
88
|
+
* @param wallet - EVM wallet credentials
|
|
89
|
+
* @param pinHash - Hashed PIN
|
|
90
|
+
* @param secureService - SecureService instance
|
|
91
|
+
* @returns Transaction hash
|
|
92
|
+
*/
|
|
93
|
+
sendTransaction(params: {
|
|
94
|
+
fromAddress: string;
|
|
95
|
+
toAddress: string;
|
|
96
|
+
amount: string;
|
|
97
|
+
network: 'tron' | 'tron_nile';
|
|
98
|
+
contractAddress?: string;
|
|
99
|
+
feeLimit?: number;
|
|
100
|
+
type: 'NATIVE' | 'TRC20';
|
|
101
|
+
}, wallet: AbcWalletResponse, pinHash: string, secureService: any): Promise<string>;
|
|
102
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
TronApi
|
|
4
|
+
} from "../../chunk-XXG7ABSJ.js";
|
|
5
|
+
import "../../chunk-25V3FW3O.js";
|
|
6
|
+
import "../../chunk-NG7PSAPX.js";
|
|
7
|
+
import "../../chunk-GO6OLTNF.js";
|
|
8
|
+
import "../../chunk-D5EFTEOM.js";
|
|
9
|
+
import "../../chunk-YJH4BHSB.js";
|
|
10
|
+
export {
|
|
11
|
+
TronApi
|
|
12
|
+
};
|
|
@@ -12,16 +12,18 @@ import { BaseApiClient } from './BaseApiClient';
|
|
|
12
12
|
export declare class WalletApi extends BaseApiClient {
|
|
13
13
|
/**
|
|
14
14
|
* Generate or recover EVM wallet
|
|
15
|
+
* Delegates to TalkenApiClient unified wallet API
|
|
15
16
|
*/
|
|
16
17
|
generateOrRecoverWallet(params: AbcWalletParams): Promise<AbcWalletResponse>;
|
|
17
18
|
/**
|
|
18
19
|
* Get wallet info
|
|
20
|
+
* Uses TalkenApiClient unified wallet info endpoint
|
|
19
21
|
*/
|
|
20
|
-
getWalletInfo(
|
|
22
|
+
getWalletInfo(_uid: string): Promise<any>;
|
|
21
23
|
/**
|
|
22
24
|
* Generate or recover Solana wallet (Ed25519)
|
|
23
25
|
*/
|
|
24
|
-
generateSolanaWallet(pin: string,
|
|
26
|
+
generateSolanaWallet(pin: string, isRecover?: boolean): Promise<AbcSolanaWallet>;
|
|
25
27
|
/**
|
|
26
28
|
* Get Solana address from Ed25519 public key
|
|
27
29
|
*/
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
WalletApi
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-IUHZ5ZCE.js";
|
|
5
|
+
import "../../chunk-25V3FW3O.js";
|
|
6
|
+
import "../../chunk-NG7PSAPX.js";
|
|
7
|
+
import "../../chunk-O4AU63LK.js";
|
|
8
|
+
import "../../chunk-GO6OLTNF.js";
|
|
9
|
+
import "../../chunk-D5EFTEOM.js";
|
|
10
|
+
import "../../chunk-YJH4BHSB.js";
|
|
11
11
|
export {
|
|
12
12
|
WalletApi
|
|
13
13
|
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Walletscan API Client
|
|
3
|
+
*
|
|
4
|
+
* Handles token metadata fetching from ABC WaaS backend
|
|
5
|
+
* GET /wapi/v2/walletscan/token/{contractAddress}?networks=xxx
|
|
6
|
+
*/
|
|
7
|
+
import type { ABCNFT, ABCNFTsRequest, ABCNativeTokensRequest, ABCToken, ABCTokensRequest } from '../types';
|
|
8
|
+
import { BaseApiClient } from './BaseApiClient';
|
|
9
|
+
/**
|
|
10
|
+
* Walletscan API Client for fetching token metadata
|
|
11
|
+
*
|
|
12
|
+
* Routes through TalkenApiClient backend for all walletscan operations.
|
|
13
|
+
*/
|
|
14
|
+
export declare class WalletscanApi extends BaseApiClient {
|
|
15
|
+
/**
|
|
16
|
+
* Get token metadata via TalkenApiClient walletscan endpoint
|
|
17
|
+
*
|
|
18
|
+
* @param params - Contract address and networks
|
|
19
|
+
* @returns Token metadata or null if not found/failed
|
|
20
|
+
*/
|
|
21
|
+
getContractToken(params: ABCTokensRequest): Promise<ABCToken | null>;
|
|
22
|
+
/**
|
|
23
|
+
* Get token metadata with timeout
|
|
24
|
+
*
|
|
25
|
+
* @param params - Contract address and networks
|
|
26
|
+
* @param timeoutMs - Timeout in milliseconds (default: 3000)
|
|
27
|
+
* @returns Token metadata or null if timeout/failed
|
|
28
|
+
*/
|
|
29
|
+
getContractTokenWithTimeout(params: ABCTokensRequest, timeoutMs?: number): Promise<ABCToken | null>;
|
|
30
|
+
/**
|
|
31
|
+
* Get native coin info via TalkenApiClient walletscan endpoint
|
|
32
|
+
*
|
|
33
|
+
* @param params - Wallet address and networks
|
|
34
|
+
* @returns Array of native coins or empty array if failed
|
|
35
|
+
*/
|
|
36
|
+
getNativeToken(params: ABCNativeTokensRequest): Promise<ABCToken[]>;
|
|
37
|
+
/**
|
|
38
|
+
* Get native coin info with timeout
|
|
39
|
+
*
|
|
40
|
+
* @param params - Wallet address and networks
|
|
41
|
+
* @param timeoutMs - Timeout in milliseconds (default: 3000)
|
|
42
|
+
* @returns First native coin or null if timeout/failed
|
|
43
|
+
*/
|
|
44
|
+
getNativeTokenWithTimeout(params: ABCNativeTokensRequest, timeoutMs?: number): Promise<ABCToken | null>;
|
|
45
|
+
/**
|
|
46
|
+
* Get NFT metadata via TalkenApiClient walletscan endpoint
|
|
47
|
+
*
|
|
48
|
+
* @param params - Contract address, wallet address, and networks
|
|
49
|
+
* @returns Array of NFT metadata or empty array if failed
|
|
50
|
+
*/
|
|
51
|
+
getNFT(params: ABCNFTsRequest): Promise<ABCNFT[]>;
|
|
52
|
+
/**
|
|
53
|
+
* Get NFT metadata with timeout
|
|
54
|
+
*
|
|
55
|
+
* @param params - Contract address, wallet address, and networks
|
|
56
|
+
* @param timeoutMs - Timeout in milliseconds (default: 3000)
|
|
57
|
+
* @returns First NFT or null if timeout/failed/empty
|
|
58
|
+
*/
|
|
59
|
+
getNFTWithTimeout(params: ABCNFTsRequest, timeoutMs?: number): Promise<ABCNFT | null>;
|
|
60
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
WalletscanApi
|
|
4
|
+
} from "../../chunk-I3GFVK5O.js";
|
|
5
|
+
import "../../chunk-25V3FW3O.js";
|
|
6
|
+
import "../../chunk-NG7PSAPX.js";
|
|
7
|
+
import "../../chunk-GO6OLTNF.js";
|
|
8
|
+
import "../../chunk-D5EFTEOM.js";
|
|
9
|
+
import "../../chunk-YJH4BHSB.js";
|
|
10
|
+
export {
|
|
11
|
+
WalletscanApi
|
|
12
|
+
};
|
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
* ABC WaaS API Client
|
|
3
3
|
*
|
|
4
4
|
* Modular API client structure for better maintainability
|
|
5
|
+
*
|
|
6
|
+
* Two client architectures are available:
|
|
7
|
+
*
|
|
8
|
+
* 1. **AbcWaasApiClient** (Legacy) - Direct ABC WaaS API calls from client-side
|
|
9
|
+
* Uses BaseApiClient + individual API modules (AuthApi, WalletApi, etc.)
|
|
10
|
+
* Handles secure channels, token refresh, and MPC signing client-side.
|
|
11
|
+
*
|
|
12
|
+
* 2. **TalkenApiClient** (New) - Backend-proxied API calls via talken-api
|
|
13
|
+
* Routes all requests through the talken-api NestJS backend.
|
|
14
|
+
* Server handles secure channels, ABC WaaS communication, and key management.
|
|
15
|
+
* Frontend only manages JWT session tokens.
|
|
5
16
|
*/
|
|
6
17
|
export { BaseApiClient } from './BaseApiClient';
|
|
7
18
|
export { AuthApi } from './AuthApi';
|
|
@@ -10,16 +21,26 @@ export { TransactionApi } from './TransactionApi';
|
|
|
10
21
|
export { SigningApi } from './SigningApi';
|
|
11
22
|
export { SolanaApi } from './SolanaApi';
|
|
12
23
|
export { BitcoinApi } from './BitcoinApi';
|
|
24
|
+
export { TronApi } from './TronApi';
|
|
25
|
+
export { WalletscanApi } from './WalletscanApi';
|
|
26
|
+
export { GasApi } from './GasApi';
|
|
27
|
+
export { TalkenApiClient, createTalkenApiClient } from './TalkenApiClient';
|
|
13
28
|
import type { AbcWalletConfig } from '../types';
|
|
14
29
|
import { AuthApi } from './AuthApi';
|
|
15
30
|
import { BitcoinApi } from './BitcoinApi';
|
|
31
|
+
import { GasApi } from './GasApi';
|
|
16
32
|
import { SigningApi } from './SigningApi';
|
|
17
33
|
import { SolanaApi } from './SolanaApi';
|
|
18
34
|
import { TransactionApi } from './TransactionApi';
|
|
35
|
+
import { TronApi } from './TronApi';
|
|
19
36
|
import { WalletApi } from './WalletApi';
|
|
37
|
+
import { WalletscanApi } from './WalletscanApi';
|
|
20
38
|
/**
|
|
21
39
|
* Unified ABC WaaS API Client
|
|
22
40
|
* Combines all API modules into a single client
|
|
41
|
+
*
|
|
42
|
+
* Modules that need TalkenApiClient access it via the singleton
|
|
43
|
+
* (getTalkenApiClient()) rather than constructor injection.
|
|
23
44
|
*/
|
|
24
45
|
export declare class AbcWaasApiClient {
|
|
25
46
|
auth: AuthApi;
|
|
@@ -28,6 +49,9 @@ export declare class AbcWaasApiClient {
|
|
|
28
49
|
signing: SigningApi;
|
|
29
50
|
solana: SolanaApi;
|
|
30
51
|
bitcoin: BitcoinApi;
|
|
52
|
+
tron: TronApi;
|
|
53
|
+
walletscan: WalletscanApi;
|
|
54
|
+
gas: GasApi;
|
|
31
55
|
constructor(config: AbcWalletConfig);
|
|
32
56
|
/**
|
|
33
57
|
* Check if user is authenticated
|
|
@@ -2,42 +2,60 @@
|
|
|
2
2
|
import {
|
|
3
3
|
AbcWaasApiClient,
|
|
4
4
|
createAbcWaasApiClient
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-JTST3KMW.js";
|
|
6
|
+
import {
|
|
7
|
+
WalletscanApi
|
|
8
|
+
} from "../../chunk-I3GFVK5O.js";
|
|
9
|
+
import {
|
|
10
|
+
GasApi
|
|
11
|
+
} from "../../chunk-QMLG7MAP.js";
|
|
12
|
+
import {
|
|
13
|
+
SigningApi
|
|
14
|
+
} from "../../chunk-JODNZWWG.js";
|
|
6
15
|
import {
|
|
7
16
|
TransactionApi
|
|
8
|
-
} from "../../chunk-
|
|
17
|
+
} from "../../chunk-AUGP2LJR.js";
|
|
18
|
+
import {
|
|
19
|
+
TronApi
|
|
20
|
+
} from "../../chunk-XXG7ABSJ.js";
|
|
9
21
|
import {
|
|
10
22
|
WalletApi
|
|
11
|
-
} from "../../chunk-
|
|
23
|
+
} from "../../chunk-IUHZ5ZCE.js";
|
|
12
24
|
import {
|
|
13
25
|
AuthApi
|
|
14
|
-
} from "../../chunk-
|
|
26
|
+
} from "../../chunk-NHP6D6AH.js";
|
|
15
27
|
import {
|
|
16
28
|
BitcoinApi
|
|
17
|
-
} from "../../chunk-
|
|
18
|
-
import {
|
|
19
|
-
SigningApi
|
|
20
|
-
} from "../../chunk-7VZDITAJ.js";
|
|
29
|
+
} from "../../chunk-SOBJYYIX.js";
|
|
21
30
|
import {
|
|
22
31
|
SolanaApi
|
|
23
|
-
} from "../../chunk-
|
|
32
|
+
} from "../../chunk-LZZE462U.js";
|
|
24
33
|
import {
|
|
25
34
|
BaseApiClient
|
|
26
|
-
} from "../../chunk-
|
|
27
|
-
import
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
import "../../chunk-
|
|
32
|
-
import "../../chunk-
|
|
35
|
+
} from "../../chunk-25V3FW3O.js";
|
|
36
|
+
import {
|
|
37
|
+
TalkenApiClient,
|
|
38
|
+
createTalkenApiClient
|
|
39
|
+
} from "../../chunk-A27H6PEU.js";
|
|
40
|
+
import "../../chunk-NG7PSAPX.js";
|
|
41
|
+
import "../../chunk-O4AU63LK.js";
|
|
42
|
+
import "../../chunk-7QHCSJDN.js";
|
|
43
|
+
import "../../chunk-GO6OLTNF.js";
|
|
44
|
+
import "../../chunk-D5EFTEOM.js";
|
|
45
|
+
import "../../chunk-YJH4BHSB.js";
|
|
33
46
|
export {
|
|
34
47
|
AbcWaasApiClient,
|
|
35
48
|
AuthApi,
|
|
36
49
|
BaseApiClient,
|
|
37
50
|
BitcoinApi,
|
|
51
|
+
GasApi,
|
|
38
52
|
SigningApi,
|
|
39
53
|
SolanaApi,
|
|
54
|
+
TalkenApiClient,
|
|
40
55
|
TransactionApi,
|
|
56
|
+
TronApi,
|
|
41
57
|
WalletApi,
|
|
42
|
-
|
|
58
|
+
WalletscanApi,
|
|
59
|
+
createAbcWaasApiClient,
|
|
60
|
+
createTalkenApiClient
|
|
43
61
|
};
|
|
@@ -34,7 +34,9 @@ export declare const ABC_ENDPOINTS: {
|
|
|
34
34
|
readonly TRANSACTION_COUNT: "/wapi/v2/transactions/count";
|
|
35
35
|
readonly GAS_SUGGESTED_FEES: "/wapi/v2/gas/suggestedGasFees";
|
|
36
36
|
readonly GAS_ESTIMATE_EIP1559: "/wapi/v2/gas/estimate/eip1559";
|
|
37
|
-
readonly
|
|
37
|
+
readonly WALLETSCAN_TOKEN: "/wapi/v2/walletscan/token";
|
|
38
|
+
readonly WALLETSCAN_NATIVES: "/wapi/v2/walletscan/natives";
|
|
39
|
+
readonly WALLETSCAN_NFTS: "/wapi/v2/walletscan/nfts";
|
|
38
40
|
readonly REFRESH_TOKEN: "/abc/abcRefresh";
|
|
39
41
|
readonly WALLETS_V3: "/abc/wallets/v3";
|
|
40
42
|
readonly INFO: "/abc/info";
|
|
@@ -218,3 +220,39 @@ export declare const ABC_FEATURES: {
|
|
|
218
220
|
readonly GASLESS_TRANSACTIONS: false;
|
|
219
221
|
readonly SOCIAL_RECOVERY: false;
|
|
220
222
|
};
|
|
223
|
+
/**
|
|
224
|
+
* Default Talken API configuration
|
|
225
|
+
*/
|
|
226
|
+
export declare const DEFAULT_TALKEN_API_CONFIG: {
|
|
227
|
+
readonly baseUrl: string | undefined;
|
|
228
|
+
readonly timeout: 30000;
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* Talken API endpoints
|
|
232
|
+
*
|
|
233
|
+
* These endpoints route through the talken-api backend, which proxies
|
|
234
|
+
* requests to ABC WaaS with server-side secure channel management.
|
|
235
|
+
*
|
|
236
|
+
* Auth uses action-based routing: single POST /wallet/auth with { action: '...' }
|
|
237
|
+
* All other endpoints use standard REST-style routes.
|
|
238
|
+
*/
|
|
239
|
+
export declare const TALKEN_API_ENDPOINTS: {
|
|
240
|
+
readonly AUTH: "/wallet/auth";
|
|
241
|
+
readonly WALLET_MPC: "/wallet/mpc";
|
|
242
|
+
readonly WALLET_ADDRESS: "/wallet/address";
|
|
243
|
+
readonly WALLET_SCAN: "/wallet/scan";
|
|
244
|
+
readonly WALLET_BTC: "/wallet/btc";
|
|
245
|
+
readonly SIGN_EVM: "/wallet/sign/evm";
|
|
246
|
+
readonly SIGN_TYPED: "/wallet/sign/typed";
|
|
247
|
+
readonly SIGN_PERSONAL: "/wallet/sign/personal";
|
|
248
|
+
readonly TX_RAW: "/wallet/tx/raw";
|
|
249
|
+
readonly TX_EVM: "/wallet/tx/evm";
|
|
250
|
+
readonly TX_SVM: "/wallet/tx/svm";
|
|
251
|
+
readonly TX_BTC: "/wallet/tx/btc";
|
|
252
|
+
readonly TX_TVM: "/wallet/tx/tvm";
|
|
253
|
+
readonly GAS_PRICE: "/wallet/gas/price";
|
|
254
|
+
readonly GAS_SUGGESTED: "/wallet/gas/suggested";
|
|
255
|
+
readonly GAS_ESTIMATE: "/wallet/gas/estimate";
|
|
256
|
+
readonly NONCE: "/wallet/nonce";
|
|
257
|
+
readonly RELAYER_FEE_ESTIMATE: "/relayer/fee-estimate";
|
|
258
|
+
};
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
DEBUG_MODE,
|
|
12
12
|
DEFAULT_ABC_CONFIG,
|
|
13
13
|
DEFAULT_HEADERS,
|
|
14
|
+
DEFAULT_TALKEN_API_CONFIG,
|
|
14
15
|
ERROR_MESSAGES,
|
|
15
16
|
EVM_CHAINS,
|
|
16
17
|
MODAL_CONFIG,
|
|
@@ -22,8 +23,9 @@ import {
|
|
|
22
23
|
STORAGE_PREFIX,
|
|
23
24
|
STORAGE_VERSION,
|
|
24
25
|
SUCCESS_MESSAGES,
|
|
26
|
+
TALKEN_API_ENDPOINTS,
|
|
25
27
|
TOKEN_EXPIRY
|
|
26
|
-
} from "../chunk-
|
|
28
|
+
} from "../chunk-YJH4BHSB.js";
|
|
27
29
|
export {
|
|
28
30
|
ABC_AUDIENCE,
|
|
29
31
|
ABC_ENDPOINTS,
|
|
@@ -36,6 +38,7 @@ export {
|
|
|
36
38
|
DEBUG_MODE,
|
|
37
39
|
DEFAULT_ABC_CONFIG,
|
|
38
40
|
DEFAULT_HEADERS,
|
|
41
|
+
DEFAULT_TALKEN_API_CONFIG,
|
|
39
42
|
ERROR_MESSAGES,
|
|
40
43
|
EVM_CHAINS,
|
|
41
44
|
MODAL_CONFIG,
|
|
@@ -47,5 +50,6 @@ export {
|
|
|
47
50
|
STORAGE_PREFIX,
|
|
48
51
|
STORAGE_VERSION,
|
|
49
52
|
SUCCESS_MESSAGES,
|
|
53
|
+
TALKEN_API_ENDPOINTS,
|
|
50
54
|
TOKEN_EXPIRY
|
|
51
55
|
};
|
|
@@ -8,6 +8,11 @@ export interface GoogleAuthResult {
|
|
|
8
8
|
idToken: string;
|
|
9
9
|
service: 'google';
|
|
10
10
|
}
|
|
11
|
+
export interface AppleAuthResult {
|
|
12
|
+
email: string;
|
|
13
|
+
idToken: string;
|
|
14
|
+
service: 'apple';
|
|
15
|
+
}
|
|
11
16
|
/**
|
|
12
17
|
* Perform Google OAuth login using Firebase popup
|
|
13
18
|
*
|
|
@@ -15,3 +20,4 @@ export interface GoogleAuthResult {
|
|
|
15
20
|
* @throws Error if login fails or is cancelled
|
|
16
21
|
*/
|
|
17
22
|
export declare function googleLogin(): Promise<GoogleAuthResult | null>;
|
|
23
|
+
export declare function appleLogin(): Promise<AppleAuthResult | null>;
|
|
@@ -5,7 +5,11 @@ import {
|
|
|
5
5
|
} from "../chunk-5WYJTPOF.js";
|
|
6
6
|
|
|
7
7
|
// src/wallets/walletConnectors/abcWallet/googleAuth.ts
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
GoogleAuthProvider,
|
|
10
|
+
OAuthProvider,
|
|
11
|
+
signInWithPopup
|
|
12
|
+
} from "firebase/auth";
|
|
9
13
|
async function googleLogin() {
|
|
10
14
|
try {
|
|
11
15
|
const auth = getFirebaseAuth();
|
|
@@ -41,6 +45,38 @@ async function googleLogin() {
|
|
|
41
45
|
throw error;
|
|
42
46
|
}
|
|
43
47
|
}
|
|
48
|
+
async function appleLogin() {
|
|
49
|
+
try {
|
|
50
|
+
const auth = getFirebaseAuth();
|
|
51
|
+
const provider = new OAuthProvider("apple.com");
|
|
52
|
+
provider.addScope("email");
|
|
53
|
+
provider.addScope("name");
|
|
54
|
+
console.log("[AppleAuth] Starting Apple sign-in popup");
|
|
55
|
+
const result = await signInWithPopup(auth, provider);
|
|
56
|
+
const idToken = result._tokenResponse?.oauthIdToken;
|
|
57
|
+
if (!idToken)
|
|
58
|
+
throw new Error("No ID token received from Apple");
|
|
59
|
+
const tokenPayload = decodeJWT(idToken);
|
|
60
|
+
const email = tokenPayload?.email || result.user?.email || result.user?.providerData?.[0]?.email;
|
|
61
|
+
if (!email)
|
|
62
|
+
throw new Error("No email found in Apple ID token");
|
|
63
|
+
console.log("[AppleAuth] \u2705 Apple sign-in successful");
|
|
64
|
+
return { email, idToken, service: "apple" };
|
|
65
|
+
} catch (error) {
|
|
66
|
+
if (error.code === "auth/popup-closed-by-user" || error.code === "auth/cancelled-popup-request") {
|
|
67
|
+
console.log("[AppleAuth] \u2139\uFE0F Apple sign-in cancelled by user");
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
if (error.code === "auth/popup-blocked") {
|
|
71
|
+
throw new Error(
|
|
72
|
+
"Popup blocked by browser. Please allow popups and try again."
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
console.error("[AppleAuth] \u274C Apple sign-in failed:", error.message);
|
|
76
|
+
throw error;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
44
79
|
export {
|
|
80
|
+
appleLogin,
|
|
45
81
|
googleLogin
|
|
46
82
|
};
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export { abcWallet } from './abcWallet';
|
|
10
10
|
export type { AbcWalletSpecificOptions } from './abcWallet';
|
|
11
|
-
export type { AbcWalletConfig, AbcAuthProvider, AbcUser, AbcWallet, AbcEvmWallet, AbcSolanaWallet, AbcBitcoinWallet, AbcAuthState, AbcLoginParams, AbcWalletParams, AbcSignParams, AbcSignSolanaTransactionParams, AbcSignSolanaMessageParams, AbcSendSolanaTransactionParams, AbcSignBitcoinTransactionParams, AbcSignBitcoinMessageParams, AbcSendBitcoinTransactionParams, AbcSignMessageParams, AbcApiResponse, AbcLoginResponse, AbcWalletResponse, AbcSignatureResponse, AbcOtpResponse, AbcRefreshTokenResponse, AbcPinConfig, AbcChainConfig, AbcConnectorOptions, AbcModalState, AbcEventType, AbcEventListener, BitcoinUtxo, } from './types';
|
|
11
|
+
export type { AbcWalletConfig, AbcAuthProvider, AbcUser, AbcWallet, AbcEvmWallet, AbcSolanaWallet, AbcBitcoinWallet, AbcTronWallet, AbcAuthState, AbcLoginParams, AbcWalletParams, AbcSignParams, AbcSignSolanaTransactionParams, AbcSignSolanaMessageParams, AbcSendSolanaTransactionParams, AbcSignBitcoinTransactionParams, AbcSignBitcoinMessageParams, AbcSendBitcoinTransactionParams, AbcSignMessageParams, AbcApiResponse, AbcLoginResponse, AbcWalletResponse, AbcSignatureResponse, AbcOtpResponse, AbcRefreshTokenResponse, AbcPinConfig, AbcChainConfig, AbcConnectorOptions, AbcModalState, AbcEventType, AbcEventListener, BitcoinUtxo, } from './types';
|
|
12
12
|
export { AbcStorageKey, AbcErrorCode, AbcError } from './types';
|
|
13
13
|
export { AbcWaasClient, createAbcWaasClient } from './abcApi';
|
|
14
|
-
export { AbcWaasApiClient, createAbcWaasApiClient
|
|
14
|
+
export { AbcWaasApiClient, createAbcWaasApiClient } from './api';
|
|
15
15
|
export { default as SecureService } from './secure';
|
|
16
16
|
export { AbcEvmProvider, createAbcEvmProvider, createAbcProvider, } from './abcProvider';
|
|
17
17
|
export type { AbcProvider } from './abcProvider';
|
|
@@ -24,8 +24,10 @@ export type { BitcoinNetwork } from './abcBitcoinProvider';
|
|
|
24
24
|
export { AbcBitcoinConnector, createAbcBitcoinConnector, } from './abcBitcoinConnector';
|
|
25
25
|
export type { AbcBitcoinConnectorConfig } from './abcBitcoinConnector';
|
|
26
26
|
export { AbcSolanaProvider, SolanaProviderError, } from './abcSolanaProvider';
|
|
27
|
+
export { AbcTronProvider, TRON_NETWORKS, TronProviderError, } from './abcTronProvider';
|
|
28
|
+
export type { TronNetworkConfig, TronSendTransactionParams, } from './abcTronProvider';
|
|
27
29
|
export { DEFAULT_ABC_CONFIG, TOKEN_EXPIRY, ABC_ENDPOINTS, AUTH_PROVIDERS, CHAIN_TYPES, SOLANA_CHAIN_ID, BITCOIN_CHAIN_ID, EVM_CHAINS, ABC_AUDIENCE, PIN_CONFIG, STORAGE_VERSION, REQUEST_TIMEOUT, RETRY_CONFIG, ABC_WALLET_METADATA, MODAL_CONFIG, SOCIAL_BUTTONS, ERROR_MESSAGES, SUCCESS_MESSAGES, ABC_EVENTS, STORAGE_PREFIX, DEBUG_MODE, DEFAULT_HEADERS, ABC_FEATURES, } from './constants';
|
|
28
30
|
export { generateMpcWallets, recoverMpcWallets, validateMpcWallets, } from './walletGeneration';
|
|
29
31
|
export type { MpcWalletsResult } from './walletGeneration';
|
|
30
32
|
export { hashPin, validatePin, validateEmail, getStorageKey, saveToStorage, loadFromStorage, removeFromStorage, clearStorage, isTokenExpired, calculateExpiryTimestamp, saveAuthState, loadAuthState, clearAuthState, getChainType, formatAddress, createAbcError, sleep, retry, parseApiError, isBrowser, isWeb3Available, generateId, deepClone, isEmpty, debounce, throttle, hexToNumber, numberToHex, isValidEthereumAddress, isValidSolanaAddress, getExplorerUrl, } from './utils';
|
|
31
|
-
export { SolanaNetwork as AbcSolanaNetwork, BitcoinNetwork as AbcBitcoinNetwork, getEvmNetwork, getSolanaNetwork, getBitcoinNetwork, } from './networkConfig';
|
|
33
|
+
export { SolanaNetwork as AbcSolanaNetwork, BitcoinNetwork as AbcBitcoinNetwork, TronNetwork as AbcTronNetwork, getEvmNetwork, getSolanaNetwork, getBitcoinNetwork, getTronNetwork, } from './networkConfig';
|