@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,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "./chunk-TJX4M23U.js";
|
|
3
|
+
|
|
4
|
+
// src/wallets/walletConnectors/klipWallet/klipWallet.svg
|
|
5
|
+
var klipWallet_default = 'data:image/svg+xml,<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">%0A <rect width="28" height="28" rx="6" fill="%23FEE500"/>%0A <path d="M8 8H12V20H8V8Z" fill="%233C1E1E"/>%0A <path d="M14 8L20 14L14 20V8Z" fill="%233C1E1E"/>%0A</svg>%0A';
|
|
6
|
+
export {
|
|
7
|
+
klipWallet_default as default
|
|
8
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sign Confirmation Provider
|
|
3
|
+
*
|
|
4
|
+
* This component:
|
|
5
|
+
* - Auto-detects ABC Wallet connection
|
|
6
|
+
* - Registers request interceptor for sign/transaction confirmation
|
|
7
|
+
* - Shows appropriate confirmation modal based on request type
|
|
8
|
+
* - Uses RainbowKit theme automatically
|
|
9
|
+
*/
|
|
10
|
+
import React, { type ReactNode } from 'react';
|
|
11
|
+
/**
|
|
12
|
+
* Hook to check if SignConfirmation modal is enabled.
|
|
13
|
+
* Returns `true` when `showSignConfirmation={true}` on TalkenKitProvider.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useSignConfirmationEnabled(): boolean;
|
|
16
|
+
export type { SignConfirmationRequest, RequestInterceptor } from './types';
|
|
17
|
+
export type { ResolvedTransactionRequest, ApproveInfo, TransferInfo, SwapInfo, NftApprovalInfo, } from './types';
|
|
18
|
+
interface SignConfirmationProviderProps {
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function SignConfirmationProvider({ children, disabled, }: SignConfirmationProviderProps): React.JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SignConfirmationProvider Module
|
|
3
|
+
* Re-exports all public APIs
|
|
4
|
+
*/
|
|
5
|
+
export { SignConfirmationProvider, useSignConfirmationEnabled, } from './SignConfirmationProvider';
|
|
6
|
+
export type { SignConfirmationRequest, RequestInterceptor, ResolvedTransactionRequest, ApproveInfo, TransferInfo, SwapInfo, NftApprovalInfo, RequestType, ParsedSignRequest, ParsedTypedDataRequest, ParsedTransactionParams, } from './types';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request Parsing Utilities
|
|
3
|
+
* Parse and decode various EVM request types for sign confirmation
|
|
4
|
+
*/
|
|
5
|
+
import type { ParsedSignRequest, ParsedTransactionParams, ParsedTypedDataRequest, RequestType } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* Determine request type from method
|
|
8
|
+
*/
|
|
9
|
+
export declare function getRequestType(method: string): RequestType;
|
|
10
|
+
/**
|
|
11
|
+
* Parse personal_sign request params
|
|
12
|
+
* personal_sign: [message, address] - message can be hex or utf8
|
|
13
|
+
*/
|
|
14
|
+
export declare function parsePersonalSignParams(params: unknown[]): ParsedSignRequest;
|
|
15
|
+
/**
|
|
16
|
+
* Parse eth_signTypedData_v4 request params
|
|
17
|
+
* eth_signTypedData_v4: [address, typedDataJson]
|
|
18
|
+
*/
|
|
19
|
+
export declare function parseTypedDataParams(params: unknown[]): ParsedTypedDataRequest | null;
|
|
20
|
+
/**
|
|
21
|
+
* Parse eth_sendTransaction request params
|
|
22
|
+
* Extracts basic tx fields and decodes function data (sync, pure function)
|
|
23
|
+
*/
|
|
24
|
+
export declare function parseTransactionParams(params: unknown[]): ParsedTransactionParams | null;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SignConfirmationProvider Types
|
|
3
|
+
* Extracted from SignConfirmationProvider.tsx for better modularity
|
|
4
|
+
*/
|
|
5
|
+
import type { FunctionType } from '../../components/ConfirmationModal/transactionUIRegistry';
|
|
6
|
+
import type { GasOption } from '../../components/GasFeeModal';
|
|
7
|
+
import type { NetworkConfig } from '../../config/networks';
|
|
8
|
+
import type { FungibleToken, NonFungibleToken } from '../../types/token';
|
|
9
|
+
import type { DecodedTransaction } from '../../utils/abi/abiDecoder';
|
|
10
|
+
import type { ABCToken, SuggestedGasFees } from '../../wallets/walletConnectors/abcWallet/types';
|
|
11
|
+
/**
|
|
12
|
+
* Sign confirmation request data
|
|
13
|
+
*/
|
|
14
|
+
export interface SignConfirmationRequest {
|
|
15
|
+
method: string;
|
|
16
|
+
params: unknown[];
|
|
17
|
+
chainId: number;
|
|
18
|
+
address: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Request interceptor function type
|
|
22
|
+
* Returns resolved transaction with user modifications if changed, undefined otherwise
|
|
23
|
+
*/
|
|
24
|
+
export type RequestInterceptor = (request: SignConfirmationRequest) => Promise<ResolvedTransactionRequest | undefined>;
|
|
25
|
+
/**
|
|
26
|
+
* Request type classification
|
|
27
|
+
*/
|
|
28
|
+
export type RequestType = 'sign' | 'typedData' | 'transaction' | null;
|
|
29
|
+
export interface ParsedSignRequest {
|
|
30
|
+
message: string;
|
|
31
|
+
}
|
|
32
|
+
export interface ParsedTypedDataRequest {
|
|
33
|
+
readableMessage: string;
|
|
34
|
+
}
|
|
35
|
+
/** Parsed transaction parameters (sync parsing result) */
|
|
36
|
+
export interface ParsedTransactionParams {
|
|
37
|
+
to: string | null;
|
|
38
|
+
value: string;
|
|
39
|
+
data: string;
|
|
40
|
+
gasLimit?: string;
|
|
41
|
+
providedMaxFee?: string;
|
|
42
|
+
providedPriorityFee?: string;
|
|
43
|
+
decodedFunction?: DecodedTransaction;
|
|
44
|
+
functionType?: FunctionType;
|
|
45
|
+
}
|
|
46
|
+
/** ERC20 approve transaction info */
|
|
47
|
+
export interface ApproveInfo {
|
|
48
|
+
spender: string;
|
|
49
|
+
amount: bigint;
|
|
50
|
+
balance?: bigint;
|
|
51
|
+
token: FungibleToken;
|
|
52
|
+
}
|
|
53
|
+
/** Token/Native transfer info */
|
|
54
|
+
export interface TransferInfo {
|
|
55
|
+
from: string;
|
|
56
|
+
to: string;
|
|
57
|
+
token: FungibleToken | NonFungibleToken;
|
|
58
|
+
amount: string;
|
|
59
|
+
amountUsd?: string;
|
|
60
|
+
}
|
|
61
|
+
/** DEX swap transaction info */
|
|
62
|
+
export interface SwapInfo {
|
|
63
|
+
tokenIn: FungibleToken;
|
|
64
|
+
tokenOut: FungibleToken;
|
|
65
|
+
amountIn: bigint;
|
|
66
|
+
amountOutMin: bigint;
|
|
67
|
+
}
|
|
68
|
+
/** NFT setApprovalForAll transaction info */
|
|
69
|
+
export interface NftApprovalInfo {
|
|
70
|
+
operator: string;
|
|
71
|
+
approved: boolean;
|
|
72
|
+
nft?: NonFungibleToken;
|
|
73
|
+
}
|
|
74
|
+
/** Fully resolved transaction with decoded info and metadata */
|
|
75
|
+
export interface ResolvedTransactionRequest {
|
|
76
|
+
to: string | null;
|
|
77
|
+
value: string;
|
|
78
|
+
data: string;
|
|
79
|
+
gasLimit?: string;
|
|
80
|
+
networkConfig?: NetworkConfig;
|
|
81
|
+
chainIconUrl?: string;
|
|
82
|
+
suggestedGasFees?: SuggestedGasFees;
|
|
83
|
+
gasFee?: GasOption;
|
|
84
|
+
functionType?: FunctionType;
|
|
85
|
+
decodedFunction?: DecodedTransaction;
|
|
86
|
+
approveInfo?: ApproveInfo;
|
|
87
|
+
transferInfo?: TransferInfo;
|
|
88
|
+
swapInfo?: SwapInfo;
|
|
89
|
+
nftApprovalInfo?: NftApprovalInfo;
|
|
90
|
+
nativeCoin?: ABCToken;
|
|
91
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API Client Hook
|
|
3
|
+
* Provides API calls for gas fees, token metadata, and NFT metadata
|
|
4
|
+
*/
|
|
5
|
+
import type { ABCNFT, ABCToken, SuggestedGasFees } from '../../wallets/walletConnectors/abcWallet/types';
|
|
6
|
+
/**
|
|
7
|
+
* Hook providing API client functions for transaction confirmation
|
|
8
|
+
*/
|
|
9
|
+
export declare function useApiClient(): {
|
|
10
|
+
fetchGasFees: (chainId: number) => Promise<SuggestedGasFees | null>;
|
|
11
|
+
fetchGasLimit: (chainId: number, to: string, value: string, data: string, fromAddress?: string) => Promise<string | null>;
|
|
12
|
+
fetchNativeTokenMetadata: (walletAddress: string, chainId: number) => Promise<ABCToken | null>;
|
|
13
|
+
fetchTokenMetadata: (tokenAddress: string, chainId: number) => Promise<ABCToken | null>;
|
|
14
|
+
fetchNFTMetadata: (contractAddress: string, walletAddress: string, chainId: number) => Promise<ABCNFT | null>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transaction Resolver Hook
|
|
3
|
+
* Resolves transaction parameters including gas estimation, function decoding,
|
|
4
|
+
* and metadata fetching for different transaction types
|
|
5
|
+
*/
|
|
6
|
+
import type { ParsedTransactionParams, ResolvedTransactionRequest, SignConfirmationRequest } from './types';
|
|
7
|
+
/**
|
|
8
|
+
* Hook providing transaction resolution functions
|
|
9
|
+
*/
|
|
10
|
+
export declare function useTransactionResolver(): {
|
|
11
|
+
resolveTransaction: (request: SignConfirmationRequest) => Promise<ResolvedTransactionRequest | null>;
|
|
12
|
+
resolveGasAndMetadata: (parsed: ParsedTransactionParams, chainId: number, fromAddress?: string) => Promise<ResolvedTransactionRequest | null>;
|
|
13
|
+
resolveTransferInfo: (parsed: ResolvedTransactionRequest, request: SignConfirmationRequest) => Promise<void>;
|
|
14
|
+
resolveNativeTransferInfo: (parsed: ResolvedTransactionRequest, request: SignConfirmationRequest) => void;
|
|
15
|
+
resolveApproveInfo: (parsed: ResolvedTransactionRequest, request: SignConfirmationRequest) => Promise<void>;
|
|
16
|
+
resolveSwapInfo: (parsed: ResolvedTransactionRequest, request: SignConfirmationRequest) => Promise<void>;
|
|
17
|
+
resolveNftApprovalInfo: (parsed: ResolvedTransactionRequest, request: SignConfirmationRequest) => Promise<void>;
|
|
18
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ABC Agentic Wallet Service
|
|
3
|
+
*
|
|
4
|
+
* API-first helper for:
|
|
5
|
+
* - Email OTP signup/login (Coinbase-like embedded onboarding)
|
|
6
|
+
* - Wallet bootstrap with ABC MPC
|
|
7
|
+
* - Talken agent session lifecycle (issue/sign/revoke)
|
|
8
|
+
*/
|
|
9
|
+
import type { AbcApiResponse, AbcLoginResponse, AbcWalletResponse } from '../wallets/walletConnectors/abcWallet/types';
|
|
10
|
+
type RuntimeEnv = 'development' | 'production';
|
|
11
|
+
export interface AgentSessionScope {
|
|
12
|
+
chains?: number[];
|
|
13
|
+
methods?: string[];
|
|
14
|
+
addresses?: string[];
|
|
15
|
+
}
|
|
16
|
+
export interface AgentSessionBudget {
|
|
17
|
+
amount: string;
|
|
18
|
+
symbol: string;
|
|
19
|
+
period: 'hour' | 'day' | 'week' | 'month' | 'lifetime';
|
|
20
|
+
}
|
|
21
|
+
export interface CreateAgentSessionParams {
|
|
22
|
+
subject: string;
|
|
23
|
+
ttlSeconds: number;
|
|
24
|
+
scope?: AgentSessionScope;
|
|
25
|
+
budget?: AgentSessionBudget;
|
|
26
|
+
metadata?: Record<string, unknown>;
|
|
27
|
+
}
|
|
28
|
+
export interface AgentSession {
|
|
29
|
+
sessionId: string;
|
|
30
|
+
expiresAt: string;
|
|
31
|
+
scope?: AgentSessionScope;
|
|
32
|
+
budget?: AgentSessionBudget;
|
|
33
|
+
status?: 'active' | 'revoked' | 'expired';
|
|
34
|
+
}
|
|
35
|
+
export interface AgentSignRequest {
|
|
36
|
+
operation: 'signTransaction' | 'signMessage' | 'signTypedData';
|
|
37
|
+
chainId: number;
|
|
38
|
+
payload: Record<string, unknown>;
|
|
39
|
+
}
|
|
40
|
+
export interface AgentSignResponse {
|
|
41
|
+
signature?: string;
|
|
42
|
+
txHash?: string;
|
|
43
|
+
raw?: Record<string, unknown>;
|
|
44
|
+
}
|
|
45
|
+
export interface AbcAgenticWalletServiceConfig {
|
|
46
|
+
waasUrl?: string;
|
|
47
|
+
apiServer?: string;
|
|
48
|
+
environment?: RuntimeEnv;
|
|
49
|
+
plain?: string;
|
|
50
|
+
agentSessionBasePath?: string;
|
|
51
|
+
fetchImpl?: typeof fetch;
|
|
52
|
+
}
|
|
53
|
+
export interface EnsureEmailOtpUserParams {
|
|
54
|
+
email: string;
|
|
55
|
+
otpCode: string;
|
|
56
|
+
displayName?: string;
|
|
57
|
+
refererUid?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface EnsureEmailOtpUserResult {
|
|
60
|
+
isNewUser: boolean;
|
|
61
|
+
login: AbcLoginResponse;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Email-OTP + Agent Session orchestrator using the real ABC MPC integration.
|
|
65
|
+
*/
|
|
66
|
+
export declare class AbcAgenticWalletService {
|
|
67
|
+
private readonly apiServer;
|
|
68
|
+
private readonly agentSessionBasePath;
|
|
69
|
+
private readonly fetchImpl;
|
|
70
|
+
private readonly client;
|
|
71
|
+
constructor(config?: AbcAgenticWalletServiceConfig);
|
|
72
|
+
/**
|
|
73
|
+
* Coinbase-like onboarding:
|
|
74
|
+
* 1) if user does not exist -> signup with OTP
|
|
75
|
+
* 2) login with OTP
|
|
76
|
+
*/
|
|
77
|
+
ensureEmailOtpUser(params: EnsureEmailOtpUserParams): Promise<EnsureEmailOtpUserResult>;
|
|
78
|
+
/**
|
|
79
|
+
* Explicit OTP send endpoint for email onboarding UI/CLI.
|
|
80
|
+
*/
|
|
81
|
+
sendSignupOtp(email: string): Promise<AbcApiResponse<any>>;
|
|
82
|
+
/**
|
|
83
|
+
* Explicit OTP verify endpoint for email onboarding UI/CLI.
|
|
84
|
+
*/
|
|
85
|
+
verifySignupOtp(email: string, otpCode: string): Promise<AbcApiResponse<any>>;
|
|
86
|
+
/**
|
|
87
|
+
* Generate/recover EVM MPC wallet after auth.
|
|
88
|
+
*/
|
|
89
|
+
bootstrapEvmWallet(params: {
|
|
90
|
+
uid: string;
|
|
91
|
+
pin: string;
|
|
92
|
+
chainId: number;
|
|
93
|
+
network?: 'mainnet' | 'testnet';
|
|
94
|
+
}): Promise<AbcWalletResponse>;
|
|
95
|
+
/**
|
|
96
|
+
* Talken server session issue.
|
|
97
|
+
*/
|
|
98
|
+
createAgentSession(accessToken: string, params: CreateAgentSessionParams): Promise<AgentSession>;
|
|
99
|
+
/**
|
|
100
|
+
* Request server-side signing with an issued agent session.
|
|
101
|
+
*/
|
|
102
|
+
signWithAgentSession(accessToken: string, sessionId: string, request: AgentSignRequest): Promise<AgentSignResponse>;
|
|
103
|
+
/**
|
|
104
|
+
* Revoke active agent session.
|
|
105
|
+
*/
|
|
106
|
+
revokeAgentSession(accessToken: string, sessionId: string): Promise<void>;
|
|
107
|
+
private isExistingUser;
|
|
108
|
+
private requestAgentApi;
|
|
109
|
+
}
|
|
110
|
+
export declare function createAbcAgenticWalletService(config?: AbcAgenticWalletServiceConfig): AbcAgenticWalletService;
|
|
111
|
+
export {};
|
|
@@ -35,66 +35,72 @@ export interface LoginParams {
|
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* Register new user with email, password, and OTP
|
|
38
|
-
*
|
|
39
|
-
* Use case: Full email + password registration
|
|
38
|
+
* POST /wallet/auth { action: 'register' }
|
|
40
39
|
*/
|
|
41
|
-
export declare function registerUser(params: RegisterUserParams,
|
|
40
|
+
export declare function registerUser(params: RegisterUserParams, _config?: {
|
|
42
41
|
waasUrl?: string;
|
|
43
42
|
environment?: string;
|
|
44
43
|
}): Promise<AbcApiResponse<any>>;
|
|
45
44
|
/**
|
|
46
45
|
* Register SNS user with email and OTP only (no password)
|
|
47
|
-
*
|
|
48
|
-
* Use case: Google login or OTP-only registration
|
|
46
|
+
* POST /wallet/auth { action: 'register' }
|
|
49
47
|
*/
|
|
50
|
-
export declare function registerSnsUser(params: RegisterSnsUserParams,
|
|
48
|
+
export declare function registerSnsUser(params: RegisterSnsUserParams, _config?: {
|
|
51
49
|
waasUrl?: string;
|
|
52
50
|
environment?: string;
|
|
53
51
|
}): Promise<AbcApiResponse<any>>;
|
|
54
52
|
/**
|
|
55
53
|
* Set/Reset password for existing user
|
|
56
|
-
*
|
|
57
|
-
* Use case: Password setup for users registered via SNS (Code 619)
|
|
54
|
+
* POST /wallet/auth { action: 'password.reset' }
|
|
58
55
|
*/
|
|
59
|
-
export declare function resetPassword(params: ResetPasswordParams,
|
|
56
|
+
export declare function resetPassword(params: ResetPasswordParams, _config?: {
|
|
60
57
|
waasUrl?: string;
|
|
61
58
|
environment?: string;
|
|
62
59
|
}): Promise<AbcApiResponse<any>>;
|
|
63
60
|
/**
|
|
64
61
|
* Check if email already exists
|
|
65
|
-
*
|
|
62
|
+
* POST /wallet/auth { action: 'email.check' }
|
|
66
63
|
*/
|
|
67
|
-
export declare function emailCheck(email: string,
|
|
64
|
+
export declare function emailCheck(email: string, _config?: {
|
|
68
65
|
waasUrl?: string;
|
|
69
66
|
environment?: string;
|
|
70
67
|
}): Promise<AbcApiResponse<any>>;
|
|
71
68
|
/**
|
|
72
69
|
* Send OTP code to email
|
|
73
|
-
*
|
|
70
|
+
* POST /wallet/auth { action: 'otp.send' }
|
|
74
71
|
*/
|
|
75
|
-
export declare function sendOtpCode(email: string,
|
|
72
|
+
export declare function sendOtpCode(email: string, _config?: {
|
|
76
73
|
waasUrl?: string;
|
|
77
74
|
environment?: string;
|
|
78
75
|
}): Promise<AbcApiResponse<any>>;
|
|
79
76
|
/**
|
|
80
77
|
* Verify OTP code for signup
|
|
81
|
-
*
|
|
78
|
+
* POST /wallet/auth { action: 'otp.verify' }
|
|
82
79
|
*/
|
|
83
|
-
export declare function verifyOtpCode(email: string, code: string,
|
|
80
|
+
export declare function verifyOtpCode(email: string, code: string, _config?: {
|
|
84
81
|
waasUrl?: string;
|
|
85
82
|
environment?: string;
|
|
86
83
|
}): Promise<AbcApiResponse<any>>;
|
|
87
84
|
/**
|
|
88
85
|
* Login with email and password
|
|
89
|
-
*
|
|
86
|
+
* POST /wallet/auth { action: 'login', method: 'password' }
|
|
90
87
|
*/
|
|
91
|
-
export declare function loginWithPassword(params: LoginParams,
|
|
88
|
+
export declare function loginWithPassword(params: LoginParams, _apiServer?: string): Promise<any>;
|
|
92
89
|
/**
|
|
93
90
|
* Google OAuth Login
|
|
94
|
-
* Flow: Firebase popup → ID token →
|
|
95
|
-
* Reference: tg-wallet-frontend LoginView/index.tsx:212-228
|
|
91
|
+
* Flow: Firebase popup → ID token → TalkenApiClient SNS login → Access token
|
|
96
92
|
*/
|
|
97
|
-
export declare function googleLogin(
|
|
93
|
+
export declare function googleLogin(_config?: {
|
|
94
|
+
waasUrl?: string;
|
|
95
|
+
environment?: string;
|
|
96
|
+
apiServer?: string;
|
|
97
|
+
}): Promise<AbcSnsLoginResponse | null>;
|
|
98
|
+
export declare function appleLogin(_config?: {
|
|
99
|
+
waasUrl?: string;
|
|
100
|
+
environment?: string;
|
|
101
|
+
apiServer?: string;
|
|
102
|
+
}): Promise<AbcSnsLoginResponse | null>;
|
|
103
|
+
export declare function kakaoLogin(_config?: {
|
|
98
104
|
waasUrl?: string;
|
|
99
105
|
environment?: string;
|
|
100
106
|
apiServer?: string;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base Token interface
|
|
3
|
+
* Common fields shared by FungibleToken and NonFungibleToken
|
|
4
|
+
*/
|
|
5
|
+
export interface Token {
|
|
6
|
+
chainId?: number;
|
|
7
|
+
network?: string;
|
|
8
|
+
platform?: string;
|
|
9
|
+
contractAddress?: string;
|
|
10
|
+
symbol?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
possibleSpam?: boolean;
|
|
13
|
+
enable?: boolean;
|
|
14
|
+
favorite?: boolean;
|
|
15
|
+
isCustom?: boolean;
|
|
16
|
+
mintAddress?: string;
|
|
17
|
+
associatedTokenAddress?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Fungible Token model
|
|
21
|
+
* Compatible with ABC backend API and multi-chain support (EVM, Solana)
|
|
22
|
+
*/
|
|
23
|
+
export interface FungibleToken extends Token {
|
|
24
|
+
symbol: string;
|
|
25
|
+
decimals?: number;
|
|
26
|
+
icon?: string;
|
|
27
|
+
balance?: string;
|
|
28
|
+
usdRate?: number;
|
|
29
|
+
krwRate?: number;
|
|
30
|
+
isNative?: boolean;
|
|
31
|
+
website?: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
totalSupply?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Contract Type enum
|
|
37
|
+
* Supports ERC (Ethereum), KIP (Klaytn), and SPL (Solana) standards
|
|
38
|
+
*/
|
|
39
|
+
export declare const ContractType: {
|
|
40
|
+
readonly ERC20: "ERC20";
|
|
41
|
+
readonly ERC721: "ERC721";
|
|
42
|
+
readonly ERC1155: "ERC1155";
|
|
43
|
+
readonly KIP7: "KIP7";
|
|
44
|
+
readonly KIP17: "KIP17";
|
|
45
|
+
readonly KIP37: "KIP37";
|
|
46
|
+
readonly SPLToken: "SPLToken";
|
|
47
|
+
};
|
|
48
|
+
export type ContractType = (typeof ContractType)[keyof typeof ContractType];
|
|
49
|
+
/**
|
|
50
|
+
* Parse contract type from string value
|
|
51
|
+
* @param value - Contract type string (e.g., 'ERC-721', 'erc721', 'KIP-7')
|
|
52
|
+
* @returns ContractType or null if not found
|
|
53
|
+
*/
|
|
54
|
+
export declare function contractTypeNameOf(value: string): ContractType | null;
|
|
55
|
+
/**
|
|
56
|
+
* NFT Metadata (attributes, traits, etc.)
|
|
57
|
+
*/
|
|
58
|
+
export interface NFTMetadata {
|
|
59
|
+
attributes?: Array<{
|
|
60
|
+
trait_type?: string;
|
|
61
|
+
value?: string | number;
|
|
62
|
+
}>;
|
|
63
|
+
[key: string]: unknown;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Non-Fungible Token model
|
|
67
|
+
* Compatible with ABC backend API response (ABCNFT → NonFungibleToken conversion)
|
|
68
|
+
*/
|
|
69
|
+
export interface NonFungibleToken extends Token {
|
|
70
|
+
contractAddress: string;
|
|
71
|
+
tokenId: string;
|
|
72
|
+
contractType?: ContractType;
|
|
73
|
+
collectionName?: string;
|
|
74
|
+
description?: string;
|
|
75
|
+
image?: string;
|
|
76
|
+
animationUrl?: string;
|
|
77
|
+
tokenUri?: string;
|
|
78
|
+
balance?: string;
|
|
79
|
+
isSbt?: boolean;
|
|
80
|
+
lastTransferAt?: string;
|
|
81
|
+
meta?: NFTMetadata;
|
|
82
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ABI Decoder
|
|
3
|
+
*
|
|
4
|
+
* Decodes transaction hex data using selector_index.json
|
|
5
|
+
* TypeScript port from Android ABIDecoder
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Input parameter definition
|
|
9
|
+
*/
|
|
10
|
+
export interface InputParam {
|
|
11
|
+
name: string;
|
|
12
|
+
type: string;
|
|
13
|
+
components?: InputParam[];
|
|
14
|
+
internalType?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Function info from selector index
|
|
18
|
+
*/
|
|
19
|
+
export interface FunctionInfo {
|
|
20
|
+
name: string;
|
|
21
|
+
signature: string;
|
|
22
|
+
inputs: InputParam[];
|
|
23
|
+
sources: string[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Metadata sources info
|
|
27
|
+
*/
|
|
28
|
+
export interface MetadataSources {
|
|
29
|
+
standards?: {
|
|
30
|
+
files: number;
|
|
31
|
+
functions: number;
|
|
32
|
+
};
|
|
33
|
+
implementations?: {
|
|
34
|
+
files: number;
|
|
35
|
+
functions: number;
|
|
36
|
+
};
|
|
37
|
+
sourcify?: {
|
|
38
|
+
contracts: number;
|
|
39
|
+
functions: number;
|
|
40
|
+
};
|
|
41
|
+
total?: number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Selector index metadata
|
|
45
|
+
*/
|
|
46
|
+
export interface Metadata {
|
|
47
|
+
generatedAt: string;
|
|
48
|
+
totalFunctions: number;
|
|
49
|
+
sources?: MetadataSources;
|
|
50
|
+
collisions?: number;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Selector index structure
|
|
54
|
+
*/
|
|
55
|
+
export interface SelectorIndex {
|
|
56
|
+
functions: Record<string, FunctionInfo>;
|
|
57
|
+
metadata: Metadata;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Decoded transaction result
|
|
61
|
+
*/
|
|
62
|
+
export interface DecodedTransaction {
|
|
63
|
+
functionName: string;
|
|
64
|
+
signature: string;
|
|
65
|
+
selector: string;
|
|
66
|
+
parameters: Record<string, unknown>;
|
|
67
|
+
sources: string[];
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* ABI Decoder class
|
|
71
|
+
* Decodes EVM transaction calldata using a selector index
|
|
72
|
+
*/
|
|
73
|
+
export declare class ABIDecoder {
|
|
74
|
+
private selectorIndex;
|
|
75
|
+
constructor(selectorIndexJson: string | SelectorIndex);
|
|
76
|
+
/**
|
|
77
|
+
* Get function info by selector
|
|
78
|
+
*/
|
|
79
|
+
getFunctionInfo(selector: string): FunctionInfo | null;
|
|
80
|
+
/**
|
|
81
|
+
* Get all known selectors
|
|
82
|
+
*/
|
|
83
|
+
getKnownSelectors(): string[];
|
|
84
|
+
/**
|
|
85
|
+
* Get metadata
|
|
86
|
+
*/
|
|
87
|
+
getMetadata(): Metadata;
|
|
88
|
+
/**
|
|
89
|
+
* Decode transaction hex data
|
|
90
|
+
*
|
|
91
|
+
* @param hexData Transaction input data (starts with 0x)
|
|
92
|
+
* @returns Decoded transaction information or null if unknown
|
|
93
|
+
*/
|
|
94
|
+
decode(hexData: string): DecodedTransaction | null;
|
|
95
|
+
/**
|
|
96
|
+
* Decode ABI parameters
|
|
97
|
+
*/
|
|
98
|
+
private decodeParameters;
|
|
99
|
+
/**
|
|
100
|
+
* Decode single value from data at given offset
|
|
101
|
+
*/
|
|
102
|
+
private decodeValue;
|
|
103
|
+
/**
|
|
104
|
+
* Convert hex string to byte array
|
|
105
|
+
*/
|
|
106
|
+
private hexToBytes;
|
|
107
|
+
/**
|
|
108
|
+
* Convert byte array to hex string
|
|
109
|
+
*/
|
|
110
|
+
private bytesToHex;
|
|
111
|
+
/**
|
|
112
|
+
* Convert byte array to BigInt (unsigned)
|
|
113
|
+
*/
|
|
114
|
+
private bytesToBigInt;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Create ABIDecoder from JSON string or object
|
|
118
|
+
*/
|
|
119
|
+
export declare function createABIDecoder(selectorIndex: string | SelectorIndex): ABIDecoder;
|
|
120
|
+
/**
|
|
121
|
+
* Default selector index (common ERC20/721/1155 functions)
|
|
122
|
+
* This is a minimal set; for full coverage, load selector_index.json
|
|
123
|
+
*/
|
|
124
|
+
export declare const DEFAULT_SELECTORS: SelectorIndex;
|
|
125
|
+
/**
|
|
126
|
+
* Usage example:
|
|
127
|
+
*
|
|
128
|
+
* // Using default selectors
|
|
129
|
+
* const decoder = new ABIDecoder(DEFAULT_SELECTORS);
|
|
130
|
+
*
|
|
131
|
+
* // Or load full selector index
|
|
132
|
+
* import selectorIndex from './selector_index.json';
|
|
133
|
+
* const fullDecoder = new ABIDecoder(selectorIndex);
|
|
134
|
+
*
|
|
135
|
+
* // Decode transaction
|
|
136
|
+
* const hexData = '0xa9059cbb000000000000000000000000742d35cc6634c0532925a3b844bc9e7595f0bee40000000000000000000000000000000000000000000000000de0b6b3a7640000';
|
|
137
|
+
* const result = decoder.decode(hexData);
|
|
138
|
+
*
|
|
139
|
+
* result?.let {
|
|
140
|
+
* console.log('Function:', result.functionName); // 'transfer'
|
|
141
|
+
* console.log('Signature:', result.signature); // 'transfer(address,uint256)'
|
|
142
|
+
* console.log('Parameters:', result.parameters); // { to: '0x...', amount: '1000000000000000000' }
|
|
143
|
+
* }
|
|
144
|
+
*/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API Client Factory Utilities
|
|
3
|
+
*
|
|
4
|
+
* Centralizes ABC WaaS API client creation to avoid code duplication.
|
|
5
|
+
*/
|
|
6
|
+
import { GasApi, WalletscanApi } from '../wallets/walletConnectors/abcWallet/api';
|
|
7
|
+
import type { AbcWalletConfig } from '../wallets/walletConnectors/abcWallet/types';
|
|
8
|
+
/**
|
|
9
|
+
* Get the ABC API configuration from environment variables
|
|
10
|
+
*/
|
|
11
|
+
export declare function getAbcApiConfig(): AbcWalletConfig;
|
|
12
|
+
/**
|
|
13
|
+
* Create a WalletscanApi instance
|
|
14
|
+
* Use this for token metadata, NFT info, and wallet balance queries
|
|
15
|
+
*/
|
|
16
|
+
export declare function createWalletscanApi(): WalletscanApi;
|
|
17
|
+
/**
|
|
18
|
+
* Create a GasApi instance
|
|
19
|
+
* Use this for gas fee estimation and suggestions
|
|
20
|
+
*/
|
|
21
|
+
export declare function createGasApi(): GasApi;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blockies - Ethereum address identicon generator
|
|
3
|
+
* Creates a data URL for a blockie image based on address
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Generate a blockies data URL for an Ethereum address
|
|
7
|
+
* @param address - Ethereum address (0x...)
|
|
8
|
+
* @param size - Size of the blockie (default: 8)
|
|
9
|
+
* @param scale - Scale factor (default: 4)
|
|
10
|
+
* @returns Data URL string for the blockie image
|
|
11
|
+
*/
|
|
12
|
+
export declare function createBlockiesDataUrl(address: string, size?: number, scale?: number): string;
|