superstack-wallet-sdk 0.4.10 → 0.4.12
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/index.js +1 -1
- package/dist/esm/src/index.js.map +1 -1
- package/dist/esm/src/types.js +1 -1
- package/dist/esm/src/types.js.map +1 -1
- package/dist/esm/types/client.d.ts +8 -14
- package/dist/esm/types/types.d.ts +44 -3
- package/dist/index.cjs +123 -123
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +53 -18
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -141,12 +141,53 @@ 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
147
|
}
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
declare enum VaultId {
|
|
149
|
+
HyperbeatUltraHype = "HyperbeatUltraHype",
|
|
150
|
+
HyperbeatUltraUbtc = "HyperbeatUltraUbtc",
|
|
151
|
+
HyperbeatUsdt = "HyperbeatUsdt",
|
|
152
|
+
HyperbeatUsdc = "HyperbeatUsdc",
|
|
153
|
+
VentualsVlp = "VentualsVlp",
|
|
154
|
+
DnHype = "DnHype",
|
|
155
|
+
DnPump = "DnPump"
|
|
156
|
+
}
|
|
157
|
+
type BuildTransactionRequest = {
|
|
158
|
+
type: "HyperbeatVaultApprove";
|
|
159
|
+
data: {
|
|
160
|
+
vault_id: VaultId;
|
|
161
|
+
token: string;
|
|
162
|
+
amount: string;
|
|
163
|
+
};
|
|
164
|
+
} | {
|
|
165
|
+
type: "HyperbeatVaultDepositInstant";
|
|
166
|
+
data: {
|
|
167
|
+
vault_id: VaultId;
|
|
168
|
+
token: string;
|
|
169
|
+
amount: string;
|
|
170
|
+
min_receive_amount?: string | null;
|
|
171
|
+
referrer_id?: string | null;
|
|
172
|
+
};
|
|
173
|
+
} | {
|
|
174
|
+
type: "HyperbeatVaultRedeemInstant";
|
|
175
|
+
data: {
|
|
176
|
+
vault_id: VaultId;
|
|
177
|
+
token: string;
|
|
178
|
+
amount: string;
|
|
179
|
+
min_receive_amount?: string | null;
|
|
180
|
+
};
|
|
181
|
+
} | {
|
|
182
|
+
type: "HyperbeatVaultRedeemRequest";
|
|
183
|
+
data: {
|
|
184
|
+
vault_id: VaultId;
|
|
185
|
+
token: string;
|
|
186
|
+
amount: string;
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
interface BuildTransactionResponse {
|
|
190
|
+
raw_transaction: string;
|
|
150
191
|
}
|
|
151
192
|
|
|
152
193
|
interface PhantomWalletAdapterConfig {
|
|
@@ -341,29 +382,23 @@ declare class WalletClient {
|
|
|
341
382
|
/**
|
|
342
383
|
* Transfer tokens using the server-side transfer API
|
|
343
384
|
* @param params Transfer parameters
|
|
344
|
-
* @returns
|
|
385
|
+
* @returns Transfer response (tx hash and raw tx)
|
|
345
386
|
*/
|
|
346
387
|
transfer(params: {
|
|
347
388
|
from: string;
|
|
348
389
|
to: string;
|
|
349
390
|
amount: string;
|
|
350
391
|
decimals: number;
|
|
351
|
-
token
|
|
392
|
+
token?: string;
|
|
352
393
|
network: Network;
|
|
353
394
|
chain_id: number;
|
|
354
|
-
}): Promise<
|
|
395
|
+
}): Promise<BuildTransactionResponse>;
|
|
355
396
|
/**
|
|
356
|
-
*
|
|
357
|
-
* @param
|
|
358
|
-
* @returns
|
|
397
|
+
* Build a transaction using the server-side build transaction API
|
|
398
|
+
* @param request Build transaction request
|
|
399
|
+
* @returns Build transaction response with raw transaction
|
|
359
400
|
*/
|
|
360
|
-
|
|
361
|
-
to: string;
|
|
362
|
-
amount: string;
|
|
363
|
-
decimals: number;
|
|
364
|
-
token: string;
|
|
365
|
-
chain_id: number;
|
|
366
|
-
}): Promise<string>;
|
|
401
|
+
buildTransaction(request: BuildTransactionRequest): Promise<BuildTransactionResponse>;
|
|
367
402
|
}
|
|
368
403
|
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
404
|
|
|
@@ -576,5 +611,5 @@ declare function useCoinbaseOnramp(): {
|
|
|
576
611
|
getCoinbaseOnrampUrl: (amount: number, blockchain?: "solana" | "ethereum", redirectUrl?: string) => Promise<string>;
|
|
577
612
|
};
|
|
578
613
|
|
|
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 };
|
|
580
|
-
export type { AccountInfo, ApiResponse, CoinbaseOnrampRequest, IModalManager, LoginModalProps, LoginType, MiddleAccount, MiddleAccountRequest, OrderState, SignMessageResponse, SignRequestV1, SignRequestV2, SignTransactionResponse, SignTransactionReturnType, Social, SocialInfo, SupportedTransactionVersions, TransactionOrVersionedTransaction, TransferRequest,
|
|
614
|
+
export { ACCESS_TOKEN_KEY, Network, STORAGE_STATE_KEY, SocialType, Storage, VaultId, WALLET_TYPE_KEY, WalletClient, WalletProvider, WalletType, injectStyles, isVersionedTransaction, theme, useActiveWallet, useCoinbaseOnramp, useConnect, useLoginModal, useWallet, useWalletStatus };
|
|
615
|
+
export type { AccountInfo, ApiResponse, BuildTransactionRequest, BuildTransactionResponse, CoinbaseOnrampRequest, IModalManager, LoginModalProps, LoginType, MiddleAccount, MiddleAccountRequest, OrderState, SignMessageResponse, SignRequestV1, SignRequestV2, SignTransactionResponse, SignTransactionReturnType, Social, SocialInfo, SupportedTransactionVersions, TransactionOrVersionedTransaction, TransferRequest, UnsignedTx, UserSession, Wallet, WalletInfo, WalletProviderConfig };
|