superstack-wallet-sdk 0.4.9 → 0.4.11
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/esm/src/client.js +1 -1
- package/dist/esm/src/client.js.map +1 -1
- package/dist/esm/src/types.js.map +1 -1
- package/dist/esm/types/client.d.ts +6 -17
- package/dist/esm/types/hooks.d.ts +1 -1
- package/dist/esm/types/types.d.ts +4 -2
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +10 -19
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import react__default, { ReactNode } from 'react';
|
|
|
7
7
|
type SupportedTransactionVersions = ReadonlySet<TransactionVersion> | null | undefined;
|
|
8
8
|
type TransactionOrVersionedTransaction<S extends SupportedTransactionVersions> = S extends null | undefined ? Transaction : Transaction | VersionedTransaction;
|
|
9
9
|
declare function isVersionedTransaction(transaction: Transaction | VersionedTransaction): transaction is VersionedTransaction;
|
|
10
|
-
type LoginType = "TwitterOAuth" | "GoogleOAuth" | "Phantom" | "Okx" | "Email" | "Phone" | "Telegram" | "TelegramOAuth" | "MetaMask" | "Rabby" | "Coinbase";
|
|
10
|
+
type LoginType = "TwitterOAuth" | "GoogleOAuth" | "Phantom" | "Okx" | "Email" | "Phone" | "Telegram" | "TelegramOAuth" | "MetaMask" | "Rabby" | "Coinbase" | "WalletConnect";
|
|
11
11
|
declare enum Network {
|
|
12
12
|
Solana = "Solana",
|
|
13
13
|
Ethereum = "Ethereum"
|
|
@@ -141,12 +141,14 @@ interface TransferRequest {
|
|
|
141
141
|
to: string;
|
|
142
142
|
amount: string;
|
|
143
143
|
decimals: number;
|
|
144
|
-
token
|
|
144
|
+
token?: string;
|
|
145
145
|
network: Network;
|
|
146
146
|
chain_id: number;
|
|
147
|
+
need_send_tx: boolean;
|
|
147
148
|
}
|
|
148
149
|
interface TransferResponse {
|
|
149
150
|
tx_hash: string;
|
|
151
|
+
bs58_raw_tx: string;
|
|
150
152
|
}
|
|
151
153
|
|
|
152
154
|
interface PhantomWalletAdapterConfig {
|
|
@@ -289,7 +291,7 @@ declare class WalletClient {
|
|
|
289
291
|
client_id: string;
|
|
290
292
|
}>;
|
|
291
293
|
getSignChallenge(params: {
|
|
292
|
-
method: "phantom" | "metamask" | "rabby" | "coinbase";
|
|
294
|
+
method: "phantom" | "metamask" | "rabby" | "coinbase" | "walletconnect";
|
|
293
295
|
id: string;
|
|
294
296
|
}): Promise<{
|
|
295
297
|
challenge: string;
|
|
@@ -341,29 +343,18 @@ declare class WalletClient {
|
|
|
341
343
|
/**
|
|
342
344
|
* Transfer tokens using the server-side transfer API
|
|
343
345
|
* @param params Transfer parameters
|
|
344
|
-
* @returns
|
|
346
|
+
* @returns Transfer response (tx hash and raw tx)
|
|
345
347
|
*/
|
|
346
348
|
transfer(params: {
|
|
347
349
|
from: string;
|
|
348
350
|
to: string;
|
|
349
351
|
amount: string;
|
|
350
352
|
decimals: number;
|
|
351
|
-
token
|
|
353
|
+
token?: string;
|
|
352
354
|
network: Network;
|
|
353
355
|
chain_id: number;
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
* Transfer Ethereum tokens (ERC-20 or native ETH)
|
|
357
|
-
* @param params Transfer parameters
|
|
358
|
-
* @returns Transaction hash
|
|
359
|
-
*/
|
|
360
|
-
transferEthereum(params: {
|
|
361
|
-
to: string;
|
|
362
|
-
amount: string;
|
|
363
|
-
decimals: number;
|
|
364
|
-
token: string;
|
|
365
|
-
chain_id: number;
|
|
366
|
-
}): Promise<string>;
|
|
356
|
+
need_send_tx: boolean;
|
|
357
|
+
}): Promise<TransferResponse>;
|
|
367
358
|
}
|
|
368
359
|
type SignTransactionReturnType<serializer extends viem.SerializeTransactionFn<viem.TransactionSerializable> = viem.SerializeTransactionFn<viem.TransactionSerializable>, transaction extends Parameters<serializer>[0] = Parameters<serializer>[0]> = viem.TransactionSerialized<viem.GetTransactionType<transaction>>;
|
|
369
360
|
|
|
@@ -426,7 +417,7 @@ declare function useLoginModal({ client, isOpen, onClose, onLogin, isLoading, }:
|
|
|
426
417
|
handleCodeSubmit: (code?: string, emailInput?: string) => Promise<void>;
|
|
427
418
|
handlePhoneCodeSubmit: (code?: string, phoneInput?: string) => Promise<void>;
|
|
428
419
|
handleSendPhoneVerificationCode: (phoneInput?: string) => Promise<void>;
|
|
429
|
-
handleGetChallenge: (address: string, method?: "metamask" | "phantom" | "rabby" | "coinbase") => Promise<{
|
|
420
|
+
handleGetChallenge: (address: string, method?: "metamask" | "phantom" | "rabby" | "coinbase" | "walletconnect") => Promise<{
|
|
430
421
|
challenge: string;
|
|
431
422
|
nonce: string;
|
|
432
423
|
expires_at: number;
|