@talken/talkenkit 2.4.24 → 2.4.26
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/AbcCredentialManager-DDHLW2IH.js +7 -0
- package/dist/abcWallet-GFKDYN2Z.js +161 -0
- package/dist/abcWallet-MWUFO3JQ.js +161 -0
- package/dist/abcWallet-OL47MLVO.js +161 -0
- package/dist/abcWallet-VYU3TEGJ.js +161 -0
- package/dist/abcWallet-WZGXGXUA.js +161 -0
- package/dist/chunk-2OHX4KTB.js +5382 -0
- package/dist/chunk-ALBABQ53.js +354 -0
- package/dist/chunk-NQCUKFAV.js +5381 -0
- package/dist/chunk-RIEG3EJO.js +5385 -0
- package/dist/chunk-RKEFBYBO.js +5402 -0
- package/dist/chunk-UKIPSWEV.js +5386 -0
- package/dist/hooks/useProfile.d.ts +13 -6
- package/dist/hooks/useSolanaWallet.d.ts +9 -8
- package/dist/index.d.ts +2 -2
- package/dist/index.js +276 -181
- package/dist/providers/SignConfirmationProvider/useApiClient.d.ts +3 -0
- package/dist/solana/ConfiguredWalletProvider.d.ts +10 -0
- package/dist/solana/LegacySolflareWalletAdapter.d.ts +32 -0
- package/dist/solana/connectExternalWallet.d.ts +9 -0
- package/dist/solana/isWalletReady.d.ts +2 -0
- package/dist/transactions/transactionStore.d.ts +2 -5
- package/dist/utils/apiClientFactory.d.ts +16 -1
- package/dist/wallets/capabilities/detectCapabilities.d.ts +1 -0
- package/dist/wallets/walletConnectors/abcWallet/AbcCredentialManager.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/AbcEvmAutoConnector.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/abcBitcoinConnector.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/abcBitcoinProvider.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/abcConnector.js +6 -6
- package/dist/wallets/walletConnectors/abcWallet/abcProvider.js +4 -4
- package/dist/wallets/walletConnectors/abcWallet/abcSolanaProvider.d.ts +0 -4
- package/dist/wallets/walletConnectors/abcWallet/abcSolanaProvider.js +11 -3
- package/dist/wallets/walletConnectors/abcWallet/abcSolanaWalletAdapter.js +5 -5
- package/dist/wallets/walletConnectors/abcWallet/abcTronProvider.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/abcWallet.js +7 -7
- package/dist/wallets/walletConnectors/abcWallet/api/ConfigApi.d.ts +21 -0
- package/dist/wallets/walletConnectors/abcWallet/api/ConfigApi.js +8 -0
- package/dist/wallets/walletConnectors/abcWallet/api/SolanaApi.d.ts +28 -115
- package/dist/wallets/walletConnectors/abcWallet/api/SolanaApi.js +1 -6
- package/dist/wallets/walletConnectors/abcWallet/api/TalkenApiClient.d.ts +23 -1
- package/dist/wallets/walletConnectors/abcWallet/api/TalkenApiClient.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/api/TokenApi.d.ts +14 -0
- package/dist/wallets/walletConnectors/abcWallet/api/TokenApi.js +8 -0
- package/dist/wallets/walletConnectors/abcWallet/api/WalletscanApi.d.ts +20 -0
- package/dist/wallets/walletConnectors/abcWallet/api/WalletscanApi.js +1 -1
- package/dist/wallets/walletConnectors/abcWallet/api/index.d.ts +3 -0
- package/dist/wallets/walletConnectors/abcWallet/api/index.js +17 -5
- package/dist/wallets/walletConnectors/abcWallet/constants.d.ts +4 -0
- package/dist/wallets/walletConnectors/abcWallet/constants.js +1 -1
- package/dist/wallets/walletConnectors/abcWallet/index.d.ts +1 -1
- package/dist/wallets/walletConnectors/abcWallet/index.js +33 -21
- package/dist/wallets/walletConnectors/abcWallet/sessionUtils.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/types.d.ts +4 -0
- package/dist/wallets/walletConnectors/abcWallet/utils.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/walletGeneration.js +3 -3
- package/dist/wallets/walletConnectors/chunk-6WF4SXLB.js +156 -0
- package/dist/wallets/walletConnectors/chunk-7DM6H5BJ.js +54 -0
- package/dist/wallets/walletConnectors/chunk-7F5DVU5U.js +300 -0
- package/dist/wallets/walletConnectors/chunk-7ORDZ6EQ.js +1479 -0
- package/dist/wallets/walletConnectors/chunk-A66MTFML.js +223 -0
- package/dist/wallets/walletConnectors/chunk-ACLPF2UW.js +96 -0
- package/dist/wallets/walletConnectors/chunk-BXH3GDX5.js +273 -0
- package/dist/wallets/walletConnectors/chunk-CABLJOMU.js +194 -0
- package/dist/wallets/walletConnectors/chunk-CE37VZAR.js +300 -0
- package/dist/wallets/walletConnectors/chunk-DPTDOCWL.js +205 -0
- package/dist/wallets/walletConnectors/chunk-E7TDM6P6.js +205 -0
- package/dist/wallets/walletConnectors/chunk-GBMOX5JN.js +54 -0
- package/dist/wallets/walletConnectors/chunk-GWYZ2IPP.js +1479 -0
- package/dist/wallets/walletConnectors/chunk-HF6GFAE5.js +54 -0
- package/dist/wallets/walletConnectors/chunk-IM7DEERX.js +585 -0
- package/dist/wallets/walletConnectors/chunk-INFMRNND.js +300 -0
- package/dist/wallets/walletConnectors/chunk-JADQLTFW.js +194 -0
- package/dist/wallets/walletConnectors/chunk-JGXJY3SB.js +1 -0
- package/dist/wallets/walletConnectors/chunk-K3VHBOXQ.js +32 -0
- package/dist/wallets/walletConnectors/chunk-KZS2C73S.js +814 -0
- package/dist/wallets/walletConnectors/chunk-L6EUMSX2.js +54 -0
- package/dist/wallets/walletConnectors/chunk-LJNUFDGO.js +205 -0
- package/dist/wallets/walletConnectors/chunk-MO2AXXLI.js +30 -0
- package/dist/wallets/walletConnectors/chunk-NYDDRNUI.js +445 -0
- package/dist/wallets/walletConnectors/chunk-O4DNG6JJ.js +54 -0
- package/dist/wallets/walletConnectors/chunk-OMOYFHBT.js +1485 -0
- package/dist/wallets/walletConnectors/chunk-OTLZVWY7.js +39 -0
- package/dist/wallets/walletConnectors/chunk-PDXO6AOG.js +300 -0
- package/dist/wallets/walletConnectors/chunk-VDWJ3NQ5.js +52 -0
- package/dist/wallets/walletConnectors/chunk-VKOPUEQG.js +445 -0
- package/dist/wallets/walletConnectors/chunk-VTOD7PXP.js +817 -0
- package/dist/wallets/walletConnectors/chunk-WC7BGU5Z.js +814 -0
- package/dist/wallets/walletConnectors/chunk-YDSBY7NO.js +54 -0
- package/dist/wallets/walletConnectors/chunk-YV6IZWGE.js +393 -0
- package/dist/wallets/walletConnectors/chunk-Z5SBGIWT.js +300 -0
- package/dist/wallets/walletConnectors/chunk-ZKCUYHBK.js +300 -0
- package/dist/wallets/walletConnectors/index.js +90 -90
- package/package.json +1 -1
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
* API Client Hook
|
|
3
3
|
* Provides API calls for gas fees, token metadata, and NFT metadata
|
|
4
4
|
*/
|
|
5
|
+
import { createConfigApi } from '../../utils/apiClientFactory';
|
|
5
6
|
import type { ABCNFT, ABCToken, SuggestedGasFees } from '../../wallets/walletConnectors/abcWallet/types';
|
|
6
7
|
/**
|
|
7
8
|
* Hook providing API client functions for transaction confirmation
|
|
8
9
|
*/
|
|
9
10
|
export declare function useApiClient(): {
|
|
11
|
+
createConfigApi: typeof createConfigApi;
|
|
10
12
|
fetchGasFees: (chainId: number) => Promise<SuggestedGasFees | null>;
|
|
11
13
|
fetchGasLimit: (chainId: number, to: string, value: string, data: string, fromAddress?: string) => Promise<string | null>;
|
|
12
14
|
fetchNativeTokenMetadata: (walletAddress: string, chainId: number) => Promise<ABCToken | null>;
|
|
15
|
+
fetchTokenBalance: (ownerAddress: string, tokenAddress: string, chainId: number) => Promise<bigint | null>;
|
|
13
16
|
fetchTokenMetadata: (tokenAddress: string, chainId: number) => Promise<ABCToken | null>;
|
|
14
17
|
fetchNFTMetadata: (contractAddress: string, walletAddress: string, chainId: number) => Promise<ABCNFT | null>;
|
|
15
18
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Adapter } from '@solana/wallet-adapter-base';
|
|
2
|
+
import React, { type ReactNode } from 'react';
|
|
3
|
+
type ConfiguredWalletProviderProps = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
wallets: Adapter[];
|
|
6
|
+
autoConnect?: boolean;
|
|
7
|
+
localStorageKey: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function ConfiguredWalletProvider({ children, wallets: adapters, autoConnect, localStorageKey, }: ConfiguredWalletProviderProps): React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BaseMessageSignerWalletAdapter, type SupportedTransactionVersions, type WalletName, WalletReadyState, type WalletAdapterNetwork } from '@solana/wallet-adapter-base';
|
|
2
|
+
import { PublicKey } from '@solana/web3.js';
|
|
3
|
+
type LegacySolflareWalletAdapterConfig = {
|
|
4
|
+
network?: WalletAdapterNetwork;
|
|
5
|
+
};
|
|
6
|
+
export declare const LegacySolflareWalletName = "Solflare";
|
|
7
|
+
export declare class LegacySolflareWalletAdapter extends BaseMessageSignerWalletAdapter {
|
|
8
|
+
name: WalletName<string>;
|
|
9
|
+
url: string;
|
|
10
|
+
icon: string;
|
|
11
|
+
supportedTransactionVersions: SupportedTransactionVersions;
|
|
12
|
+
private readonly config;
|
|
13
|
+
private wallet;
|
|
14
|
+
private publicKeyRef;
|
|
15
|
+
private connectingRef;
|
|
16
|
+
private readyStateRef;
|
|
17
|
+
constructor(config?: LegacySolflareWalletAdapterConfig);
|
|
18
|
+
get publicKey(): PublicKey | null;
|
|
19
|
+
get connecting(): boolean;
|
|
20
|
+
get connected(): boolean;
|
|
21
|
+
get readyState(): WalletReadyState;
|
|
22
|
+
autoConnect(): Promise<void>;
|
|
23
|
+
connect(): Promise<void>;
|
|
24
|
+
disconnect(): Promise<void>;
|
|
25
|
+
sendTransaction(transaction: any, connection: any, options?: any): Promise<string>;
|
|
26
|
+
signTransaction<T extends any>(transaction: T): Promise<T>;
|
|
27
|
+
signAllTransactions<T extends any>(transactions: T[]): Promise<T[]>;
|
|
28
|
+
signMessage(message: Uint8Array): Promise<Uint8Array>;
|
|
29
|
+
private handleDisconnect;
|
|
30
|
+
private handleAccountChanged;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Wallet } from '@solana/wallet-adapter-react';
|
|
2
|
+
type ConnectExternalSolanaWalletParams = {
|
|
3
|
+
walletName: string;
|
|
4
|
+
wallets: Wallet[];
|
|
5
|
+
selectedWalletName?: Wallet['adapter']['name'] | null;
|
|
6
|
+
selectWallet: (walletName: Wallet['adapter']['name'] | null) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare function connectExternalSolanaWallet({ walletName, wallets, selectedWalletName, selectWallet, }: ConnectExternalSolanaWalletParams): Promise<Wallet>;
|
|
9
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TransactionReceipt } from 'viem';
|
|
2
2
|
type TransactionStatus = 'pending' | 'confirmed' | 'failed';
|
|
3
3
|
export interface Transaction {
|
|
4
4
|
hash: string;
|
|
@@ -7,15 +7,12 @@ export interface Transaction {
|
|
|
7
7
|
confirmations?: number;
|
|
8
8
|
}
|
|
9
9
|
export type NewTransaction = Omit<Transaction, 'status'>;
|
|
10
|
-
export declare function createTransactionStore(
|
|
11
|
-
provider: PublicClient;
|
|
12
|
-
}): {
|
|
10
|
+
export declare function createTransactionStore(): {
|
|
13
11
|
addTransaction: (account: string, chainId: number, transaction: NewTransaction) => void;
|
|
14
12
|
clearTransactions: (account: string, chainId: number) => void;
|
|
15
13
|
getTransactions: (account: string, chainId: number) => Transaction[];
|
|
16
14
|
onTransactionStatus: (fn: (txStatus: TransactionReceipt["status"]) => void) => () => void;
|
|
17
15
|
onChange: (fn: () => void) => () => void;
|
|
18
|
-
setProvider: (newProvider: PublicClient) => void;
|
|
19
16
|
waitForPendingTransactions: (account: string, chainId: number) => Promise<void>;
|
|
20
17
|
};
|
|
21
18
|
export type TransactionStore = ReturnType<typeof createTransactionStore>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Centralizes TalkenApi-backed metadata client creation to avoid code duplication.
|
|
5
5
|
*/
|
|
6
|
-
import { GasApi, WalletscanApi } from '../wallets/walletConnectors/abcWallet/api';
|
|
6
|
+
import { ConfigApi, GasApi, SolanaApi, TokenApi, WalletscanApi } from '../wallets/walletConnectors/abcWallet/api';
|
|
7
7
|
/**
|
|
8
8
|
* Create a WalletscanApi instance
|
|
9
9
|
* Use this for token metadata, NFT info, and wallet balance queries
|
|
@@ -14,3 +14,18 @@ export declare function createWalletscanApi(): WalletscanApi;
|
|
|
14
14
|
* Use this for gas fee estimation and suggestions
|
|
15
15
|
*/
|
|
16
16
|
export declare function createGasApi(): GasApi;
|
|
17
|
+
/**
|
|
18
|
+
* Create a ConfigApi instance
|
|
19
|
+
* Use this for tx status polling and runtime config backed by talken-api
|
|
20
|
+
*/
|
|
21
|
+
export declare function createConfigApi(): ConfigApi;
|
|
22
|
+
/**
|
|
23
|
+
* Create a TokenApi instance
|
|
24
|
+
* Use this for backend-backed token balances and token-specific helpers
|
|
25
|
+
*/
|
|
26
|
+
export declare function createTokenApi(): TokenApi;
|
|
27
|
+
/**
|
|
28
|
+
* Create a SolanaApi instance
|
|
29
|
+
* Use this for backend-backed latest blockhash lookup and tx-status polling.
|
|
30
|
+
*/
|
|
31
|
+
export declare function createSolanaApi(): SolanaApi;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
loadAuthState
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-A66MTFML.js";
|
|
5
5
|
import "../chunk-4P3SPC44.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-DPTDOCWL.js";
|
|
7
7
|
|
|
8
8
|
// src/wallets/walletConnectors/abcWallet/AbcEvmAutoConnector.tsx
|
|
9
9
|
import { useEffect, useRef } from "react";
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import {
|
|
3
3
|
AbcBitcoinConnector,
|
|
4
4
|
createAbcBitcoinConnector
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-BXH3GDX5.js";
|
|
6
6
|
import "../chunk-O4AU63LK.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-A66MTFML.js";
|
|
8
8
|
import "../chunk-4P3SPC44.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-DPTDOCWL.js";
|
|
10
10
|
export {
|
|
11
11
|
AbcBitcoinConnector,
|
|
12
12
|
createAbcBitcoinConnector
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
AbcBitcoinProvider,
|
|
4
4
|
BITCOIN_NETWORKS,
|
|
5
5
|
BitcoinProviderError
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-IM7DEERX.js";
|
|
7
|
+
import "../chunk-6WF4SXLB.js";
|
|
8
|
+
import "../chunk-DPTDOCWL.js";
|
|
9
9
|
export {
|
|
10
10
|
AbcBitcoinProvider,
|
|
11
11
|
BITCOIN_NETWORKS,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
abcConnector
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-7F5DVU5U.js";
|
|
5
5
|
import "../chunk-R6ZE7JAZ.js";
|
|
6
6
|
import "../chunk-O4AU63LK.js";
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-XG2R64B7.js";
|
|
7
|
+
import "../chunk-OMOYFHBT.js";
|
|
8
|
+
import "../chunk-A66MTFML.js";
|
|
10
9
|
import "../chunk-GFWUFYT2.js";
|
|
10
|
+
import "../chunk-VTOD7PXP.js";
|
|
11
11
|
import "../chunk-4P3SPC44.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-6WF4SXLB.js";
|
|
13
|
+
import "../chunk-DPTDOCWL.js";
|
|
14
14
|
export {
|
|
15
15
|
abcConnector
|
|
16
16
|
};
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
AbcEvmProvider,
|
|
4
4
|
createAbcEvmProvider,
|
|
5
5
|
createAbcProvider
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-OMOYFHBT.js";
|
|
7
|
+
import "../chunk-A66MTFML.js";
|
|
8
8
|
import "../chunk-4P3SPC44.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-6WF4SXLB.js";
|
|
10
|
+
import "../chunk-DPTDOCWL.js";
|
|
11
11
|
export {
|
|
12
12
|
AbcEvmProvider,
|
|
13
13
|
createAbcEvmProvider,
|
|
@@ -2,9 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
AbcSolanaProvider,
|
|
4
4
|
SolanaProviderError
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-NYDDRNUI.js";
|
|
6
|
+
import "../chunk-JGXJY3SB.js";
|
|
7
|
+
import "../chunk-MO2AXXLI.js";
|
|
8
|
+
import "../chunk-E7TDM6P6.js";
|
|
9
|
+
import "../chunk-VDWJ3NQ5.js";
|
|
10
|
+
import "../chunk-YPM7FC4M.js";
|
|
11
|
+
import "../chunk-OTLZVWY7.js";
|
|
12
|
+
import "../chunk-VTOD7PXP.js";
|
|
13
|
+
import "../chunk-4P3SPC44.js";
|
|
14
|
+
import "../chunk-6WF4SXLB.js";
|
|
15
|
+
import "../chunk-DPTDOCWL.js";
|
|
8
16
|
export {
|
|
9
17
|
AbcSolanaProvider,
|
|
10
18
|
SolanaProviderError
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
createTalkenApiClient
|
|
4
|
-
} from "../chunk-XG2R64B7.js";
|
|
5
2
|
import {
|
|
6
3
|
resolveTalkenApiUrl
|
|
7
4
|
} from "../chunk-GFWUFYT2.js";
|
|
5
|
+
import {
|
|
6
|
+
createTalkenApiClient
|
|
7
|
+
} from "../chunk-VTOD7PXP.js";
|
|
8
8
|
import "../chunk-4P3SPC44.js";
|
|
9
9
|
import {
|
|
10
10
|
getCredentialManager
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-6WF4SXLB.js";
|
|
12
12
|
import {
|
|
13
13
|
STORAGE_PREFIX
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-DPTDOCWL.js";
|
|
15
15
|
|
|
16
16
|
// src/wallets/walletConnectors/abcWallet/abcSolanaWalletAdapter.ts
|
|
17
17
|
import {
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
AbcTronProvider,
|
|
4
4
|
TRON_NETWORKS,
|
|
5
5
|
TronProviderError
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-YV6IZWGE.js";
|
|
7
|
+
import "../chunk-6WF4SXLB.js";
|
|
8
|
+
import "../chunk-DPTDOCWL.js";
|
|
9
9
|
export {
|
|
10
10
|
AbcTronProvider,
|
|
11
11
|
TRON_NETWORKS,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
abcWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-L6EUMSX2.js";
|
|
5
|
+
import "../chunk-7F5DVU5U.js";
|
|
6
6
|
import "../chunk-R6ZE7JAZ.js";
|
|
7
7
|
import "../chunk-O4AU63LK.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-XG2R64B7.js";
|
|
8
|
+
import "../chunk-OMOYFHBT.js";
|
|
9
|
+
import "../chunk-A66MTFML.js";
|
|
11
10
|
import "../chunk-GFWUFYT2.js";
|
|
11
|
+
import "../chunk-VTOD7PXP.js";
|
|
12
12
|
import "../chunk-4P3SPC44.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-6WF4SXLB.js";
|
|
14
|
+
import "../chunk-DPTDOCWL.js";
|
|
15
15
|
export {
|
|
16
16
|
abcWallet
|
|
17
17
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config API Client
|
|
3
|
+
*
|
|
4
|
+
* Backend-backed runtime/config helpers used to avoid direct client RPC polling.
|
|
5
|
+
*/
|
|
6
|
+
export interface ChainTxStatusResponse {
|
|
7
|
+
chainKey: string;
|
|
8
|
+
txHash: string;
|
|
9
|
+
found: boolean;
|
|
10
|
+
status?: number | string;
|
|
11
|
+
blockNumber?: number;
|
|
12
|
+
message?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface WaitForTxStatusOptions {
|
|
15
|
+
timeoutMs?: number;
|
|
16
|
+
pollIntervalMs?: number;
|
|
17
|
+
}
|
|
18
|
+
export declare class ConfigApi {
|
|
19
|
+
getTxStatus(chainKey: string, txHash: string): Promise<ChainTxStatusResponse>;
|
|
20
|
+
waitForTxStatus(chainKey: string, txHash: string, options?: WaitForTxStatusOptions): Promise<ChainTxStatusResponse>;
|
|
21
|
+
}
|
|
@@ -1,120 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Solana API Client
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* - Solana transaction signing
|
|
6
|
-
* - Solana message signing
|
|
7
|
-
* - Solana transaction broadcasting
|
|
4
|
+
* Backend-backed helpers for external Solana wallet transaction preparation and status polling.
|
|
8
5
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Derive Solana address from Ed25519 public key
|
|
38
|
-
* @param publicKey - Ed25519 public key (hex)
|
|
39
|
-
* @returns Solana address (base58)
|
|
40
|
-
*/
|
|
41
|
-
private deriveAddressFromPublicKey;
|
|
42
|
-
/**
|
|
43
|
-
* Sign Solana transaction with Ed25519 (via talken-api proxy, PIN mode)
|
|
44
|
-
*/
|
|
45
|
-
signSolanaTransaction(params: AbcSignSolanaTransactionParamsV3): Promise<AbcSignatureResponse>;
|
|
46
|
-
/**
|
|
47
|
-
* Sign Solana message with Ed25519 (via talken-api proxy, Share mode — no PIN)
|
|
48
|
-
*/
|
|
49
|
-
signSolanaMessage(params: AbcSignSolanaMessageParamsV3): Promise<AbcSignatureResponse>;
|
|
50
|
-
/**
|
|
51
|
-
* Generate Solana transfer transaction via ABC WaaS API
|
|
52
|
-
* This ensures the transaction uses the same RPC and blockhash as the server
|
|
53
|
-
*/
|
|
54
|
-
generateTransferTransaction(params: {
|
|
55
|
-
network: string;
|
|
56
|
-
amount: number;
|
|
57
|
-
fromAddress: string;
|
|
58
|
-
toAddress: string;
|
|
59
|
-
feePayerAddress: string;
|
|
60
|
-
}): Promise<{
|
|
61
|
-
serialized_tx: string;
|
|
62
|
-
}>;
|
|
63
|
-
/**
|
|
64
|
-
* Send Solana transaction (unsigned transaction + separate signatures)
|
|
65
|
-
* Used for server-generated transactions that need client signatures
|
|
66
|
-
*/
|
|
67
|
-
sendSolanaTransaction(params: AbcSendSolanaTransactionParams): Promise<{
|
|
68
|
-
txHash: string;
|
|
69
|
-
}>;
|
|
70
|
-
/**
|
|
71
|
-
* Send fully signed Solana transaction (for client-built transactions)
|
|
72
|
-
* Sends a completely signed transaction directly to Solana network
|
|
73
|
-
*/
|
|
74
|
-
sendSignedSolanaTransaction(params: {
|
|
75
|
-
network: string;
|
|
76
|
-
serializedTX: string;
|
|
77
|
-
}): Promise<{
|
|
78
|
-
txHash: string;
|
|
79
|
-
}>;
|
|
80
|
-
/**
|
|
81
|
-
* Generate SPL token transfer transaction via ABC WaaS API
|
|
82
|
-
* Uses wallet addresses (not token accounts) - API resolves ATAs internally
|
|
83
|
-
*
|
|
84
|
-
* @param params - SPL transfer parameters
|
|
85
|
-
* @returns Serialized transaction
|
|
86
|
-
*/
|
|
87
|
-
generateSPLTransferTransaction(params: {
|
|
88
|
-
network: string;
|
|
89
|
-
mintAddress: string;
|
|
90
|
-
fromAddress: string;
|
|
91
|
-
toAddress: string;
|
|
92
|
-
amount: number;
|
|
93
|
-
decimals?: number;
|
|
94
|
-
feePayerAddress?: string;
|
|
95
|
-
latestBlockhash?: string;
|
|
96
|
-
}): Promise<{
|
|
97
|
-
serialized_tx: string;
|
|
98
|
-
estimated_fee: {
|
|
99
|
-
context: {
|
|
100
|
-
Slot: number;
|
|
101
|
-
};
|
|
102
|
-
value: number;
|
|
103
|
-
};
|
|
104
|
-
latest_blockhash: string;
|
|
105
|
-
}>;
|
|
106
|
-
/**
|
|
107
|
-
* Get SPL token supply information
|
|
108
|
-
*
|
|
109
|
-
* @param params - Token query parameters
|
|
110
|
-
* @returns Token supply information
|
|
111
|
-
*/
|
|
112
|
-
getTokenInfo(params: {
|
|
113
|
-
network: string;
|
|
114
|
-
tokenAddress: string;
|
|
115
|
-
}): Promise<{
|
|
116
|
-
amount: string;
|
|
117
|
-
decimals: number;
|
|
118
|
-
uiAmountString: string;
|
|
119
|
-
}>;
|
|
6
|
+
export interface SolanaLatestBlockhashResponse {
|
|
7
|
+
network: 'solana' | 'solana_devnet';
|
|
8
|
+
blockhash: string;
|
|
9
|
+
lastValidBlockHeight: number;
|
|
10
|
+
}
|
|
11
|
+
export interface SolanaTransactionStatusResponse {
|
|
12
|
+
network: 'solana' | 'solana_devnet';
|
|
13
|
+
signature: string;
|
|
14
|
+
found: boolean;
|
|
15
|
+
slot: number | null;
|
|
16
|
+
confirmations: number | null;
|
|
17
|
+
confirmationStatus: string | null;
|
|
18
|
+
err: unknown;
|
|
19
|
+
}
|
|
20
|
+
export declare class SolanaApi {
|
|
21
|
+
getLatestBlockhash(network: 'solana' | 'solana_devnet'): Promise<SolanaLatestBlockhashResponse>;
|
|
22
|
+
getTransactionStatus(params: {
|
|
23
|
+
network: 'solana' | 'solana_devnet';
|
|
24
|
+
signature: string;
|
|
25
|
+
}): Promise<SolanaTransactionStatusResponse>;
|
|
26
|
+
waitForTransactionStatus(params: {
|
|
27
|
+
network: 'solana' | 'solana_devnet';
|
|
28
|
+
signature: string;
|
|
29
|
+
}, options?: {
|
|
30
|
+
timeoutMs?: number;
|
|
31
|
+
pollIntervalMs?: number;
|
|
32
|
+
}): Promise<SolanaTransactionStatusResponse>;
|
|
120
33
|
}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
SolanaApi
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-MBRXYEQC.js";
|
|
6
|
-
import "../../chunk-O4AU63LK.js";
|
|
7
|
-
import "../../chunk-LOSXI36Y.js";
|
|
8
|
-
import "../../chunk-D5EFTEOM.js";
|
|
9
|
-
import "../../chunk-BR25RFNF.js";
|
|
4
|
+
} from "../../chunk-OTLZVWY7.js";
|
|
10
5
|
export {
|
|
11
6
|
SolanaApi
|
|
12
7
|
};
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* WaaS-direct operations (not proxied by talken-api):
|
|
14
14
|
* - Solana signMessage, signTransaction, transferSpl — use abcApi.ts directly
|
|
15
15
|
*/
|
|
16
|
-
import type { ABCNFT, ABCToken, GasEstimateResponse, SuggestedGasFees, TalkenApiConfig, TalkenAuthResponse, TalkenAuthorizationResponse, TalkenBtcFeeResponse, TalkenBtcTxHashResponse, TalkenBtcUtxosResponse, TalkenBtcValidateAddressResponse, TalkenEmailCheckResponse, TalkenEvmSignAuthorizationRequest, TalkenEvmSignPersonalRequest, TalkenEvmSignRequest, TalkenEvmSignTypedRequest, TalkenEvmSignatureResponse, TalkenGasEstimateRequest, TalkenOtpResponse, TalkenSnsLoginRequest, TalkenTxBtcRequest, TalkenTxEvmRequest, TalkenTxRawRequest, TalkenTxResponse, TalkenTxSvmRequest, TalkenTxTvmRequest, TalkenWalletscanNativesRequest, TalkenWalletscanNftsRequest, TalkenWalletscanTokenRequest } from '../types';
|
|
16
|
+
import type { ABCNFT, ABCToken, GasEstimateResponse, SuggestedGasFees, TalkenApiConfig, TalkenAuthResponse, TalkenAuthorizationResponse, TalkenBtcFeeResponse, TalkenBtcTxHashResponse, TalkenBtcUtxosResponse, TalkenBtcValidateAddressResponse, TalkenEmailCheckResponse, TalkenEvmSignAuthorizationRequest, TalkenEvmSignPersonalRequest, TalkenEvmSignRequest, TalkenEvmSignTypedRequest, TalkenEvmSignatureResponse, TalkenGasEstimateRequest, TalkenOtpResponse, TalkenSnsLoginRequest, TalkenTxBtcRequest, TalkenTxEvmRequest, TalkenTxRawRequest, TalkenTxResponse, TalkenTxSvmRequest, TalkenTxTvmRequest, TalkenWalletscanNativesRequest, TalkenWalletscanNftsRequest, TalkenWalletscanTokenRequest, TalkenWalletscanTokensRequest } from '../types';
|
|
17
17
|
declare class TalkenAuthModule {
|
|
18
18
|
private client;
|
|
19
19
|
constructor(client: TalkenApiClient);
|
|
@@ -157,6 +157,23 @@ declare class TalkenEvmModule {
|
|
|
157
157
|
declare class TalkenSolanaModule {
|
|
158
158
|
private client;
|
|
159
159
|
constructor(client: TalkenApiClient);
|
|
160
|
+
getLatestBlockhash(network: 'solana' | 'solana_devnet'): Promise<{
|
|
161
|
+
network: 'solana' | 'solana_devnet';
|
|
162
|
+
blockhash: string;
|
|
163
|
+
lastValidBlockHeight: number;
|
|
164
|
+
}>;
|
|
165
|
+
getTransactionStatus(params: {
|
|
166
|
+
network: 'solana' | 'solana_devnet';
|
|
167
|
+
signature: string;
|
|
168
|
+
}): Promise<{
|
|
169
|
+
network: 'solana' | 'solana_devnet';
|
|
170
|
+
signature: string;
|
|
171
|
+
found: boolean;
|
|
172
|
+
slot: number | null;
|
|
173
|
+
confirmations: number | null;
|
|
174
|
+
confirmationStatus: string | null;
|
|
175
|
+
err: unknown;
|
|
176
|
+
}>;
|
|
160
177
|
/**
|
|
161
178
|
* Transfer SOL or SPL token (integrated sign + broadcast)
|
|
162
179
|
* POST /wallet/tx/sol
|
|
@@ -255,6 +272,11 @@ declare class TalkenTronModule {
|
|
|
255
272
|
declare class TalkenWalletscanModule {
|
|
256
273
|
private client;
|
|
257
274
|
constructor(client: TalkenApiClient);
|
|
275
|
+
/**
|
|
276
|
+
* Get all wallet tokens with balances
|
|
277
|
+
* GET /wallet/scan?type=tokens&chainKeys=...&walletAddress=...
|
|
278
|
+
*/
|
|
279
|
+
getTokens(params: TalkenWalletscanTokensRequest): Promise<ABCToken[]>;
|
|
258
280
|
/**
|
|
259
281
|
* Get token metadata by contract address
|
|
260
282
|
* GET /wallet/scan?type=tokens&chainKeys=...&contractAddress=...
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
TalkenApiClient,
|
|
4
4
|
createTalkenApiClient
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-VTOD7PXP.js";
|
|
6
6
|
import "../../chunk-4P3SPC44.js";
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-6WF4SXLB.js";
|
|
8
|
+
import "../../chunk-DPTDOCWL.js";
|
|
9
9
|
export {
|
|
10
10
|
TalkenApiClient,
|
|
11
11
|
createTalkenApiClient
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token API Client
|
|
3
|
+
*
|
|
4
|
+
* Backend-backed token helpers used to reduce direct chain reads in the UI.
|
|
5
|
+
*/
|
|
6
|
+
interface TokenBalanceItem {
|
|
7
|
+
address?: string;
|
|
8
|
+
balance?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class TokenApi {
|
|
11
|
+
getBalances(address: string, chainKey: string): Promise<TokenBalanceItem[]>;
|
|
12
|
+
getTokenBalance(address: string, chainKey: string, tokenAddress: string): Promise<bigint | null>;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -10,6 +10,26 @@ import type { ABCNFT, ABCNFTsRequest, ABCNativeTokensRequest, ABCToken, ABCToken
|
|
|
10
10
|
* Routes through TalkenApiClient backend for all walletscan operations.
|
|
11
11
|
*/
|
|
12
12
|
export declare class WalletscanApi {
|
|
13
|
+
/**
|
|
14
|
+
* Get all wallet tokens with balances via TalkenApiClient walletscan endpoint
|
|
15
|
+
*/
|
|
16
|
+
getWalletTokens(params: ABCNativeTokensRequest): Promise<ABCToken[]>;
|
|
17
|
+
/**
|
|
18
|
+
* Get all wallet tokens with balances with timeout
|
|
19
|
+
*/
|
|
20
|
+
getWalletTokensWithTimeout(params: ABCNativeTokensRequest, timeoutMs?: number): Promise<ABCToken[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Get a specific wallet token balance by contract/mint address.
|
|
23
|
+
*/
|
|
24
|
+
getWalletTokenBalance(params: ABCNativeTokensRequest & {
|
|
25
|
+
contractAddress: string;
|
|
26
|
+
}): Promise<ABCToken | null>;
|
|
27
|
+
/**
|
|
28
|
+
* Get a specific wallet token balance by contract/mint address with timeout.
|
|
29
|
+
*/
|
|
30
|
+
getWalletTokenBalanceWithTimeout(params: ABCNativeTokensRequest & {
|
|
31
|
+
contractAddress: string;
|
|
32
|
+
}, timeoutMs?: number): Promise<ABCToken | null>;
|
|
13
33
|
/**
|
|
14
34
|
* Get token metadata via TalkenApiClient walletscan endpoint
|
|
15
35
|
*
|