superstack-wallet-sdk 0.4.8 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/src/client.js +1 -1
- package/dist/esm/src/client.js.map +1 -1
- package/dist/esm/types/client.d.ts +26 -0
- package/dist/esm/types/types.d.ts +13 -0
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +40 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -135,6 +135,19 @@ interface OrderState {
|
|
|
135
135
|
payment_address: string;
|
|
136
136
|
received: number;
|
|
137
137
|
}
|
|
138
|
+
interface TransferRequest {
|
|
139
|
+
user_id: string;
|
|
140
|
+
from: string;
|
|
141
|
+
to: string;
|
|
142
|
+
amount: string;
|
|
143
|
+
decimals: number;
|
|
144
|
+
token: string;
|
|
145
|
+
network: Network;
|
|
146
|
+
chain_id: number;
|
|
147
|
+
}
|
|
148
|
+
interface TransferResponse {
|
|
149
|
+
tx_hash: string;
|
|
150
|
+
}
|
|
138
151
|
|
|
139
152
|
interface PhantomWalletAdapterConfig {
|
|
140
153
|
}
|
|
@@ -325,6 +338,32 @@ declare class WalletClient {
|
|
|
325
338
|
* @returns order status
|
|
326
339
|
*/
|
|
327
340
|
getOrderState(orderId: string): Promise<OrderState>;
|
|
341
|
+
/**
|
|
342
|
+
* Transfer tokens using the server-side transfer API
|
|
343
|
+
* @param params Transfer parameters
|
|
344
|
+
* @returns Transaction hash
|
|
345
|
+
*/
|
|
346
|
+
transfer(params: {
|
|
347
|
+
from: string;
|
|
348
|
+
to: string;
|
|
349
|
+
amount: string;
|
|
350
|
+
decimals: number;
|
|
351
|
+
token: string;
|
|
352
|
+
network: Network;
|
|
353
|
+
chain_id: number;
|
|
354
|
+
}): Promise<string>;
|
|
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>;
|
|
328
367
|
}
|
|
329
368
|
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>>;
|
|
330
369
|
|
|
@@ -538,4 +577,4 @@ declare function useCoinbaseOnramp(): {
|
|
|
538
577
|
};
|
|
539
578
|
|
|
540
579
|
export { ACCESS_TOKEN_KEY, Network, STORAGE_STATE_KEY, SocialType, Storage, WALLET_TYPE_KEY, WalletClient, WalletProvider, WalletType, injectStyles, isVersionedTransaction, theme, useActiveWallet, useCoinbaseOnramp, useConnect, useLoginModal, useWallet, useWalletStatus };
|
|
541
|
-
export type { AccountInfo, ApiResponse, CoinbaseOnrampRequest, IModalManager, LoginModalProps, LoginType, MiddleAccount, MiddleAccountRequest, OrderState, SignMessageResponse, SignRequestV1, SignRequestV2, SignTransactionResponse, SignTransactionReturnType, Social, SocialInfo, SupportedTransactionVersions, TransactionOrVersionedTransaction, UnsignedTx, UserSession, Wallet, WalletInfo, WalletProviderConfig };
|
|
580
|
+
export type { AccountInfo, ApiResponse, CoinbaseOnrampRequest, IModalManager, LoginModalProps, LoginType, MiddleAccount, MiddleAccountRequest, OrderState, SignMessageResponse, SignRequestV1, SignRequestV2, SignTransactionResponse, SignTransactionReturnType, Social, SocialInfo, SupportedTransactionVersions, TransactionOrVersionedTransaction, TransferRequest, TransferResponse, UnsignedTx, UserSession, Wallet, WalletInfo, WalletProviderConfig };
|