superstack-wallet-sdk 0.4.11 → 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/index.d.ts CHANGED
@@ -144,11 +144,50 @@ interface TransferRequest {
144
144
  token?: string;
145
145
  network: Network;
146
146
  chain_id: number;
147
- need_send_tx: boolean;
148
147
  }
149
- interface TransferResponse {
150
- tx_hash: string;
151
- bs58_raw_tx: string;
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;
152
191
  }
153
192
 
154
193
  interface PhantomWalletAdapterConfig {
@@ -353,8 +392,13 @@ declare class WalletClient {
353
392
  token?: string;
354
393
  network: Network;
355
394
  chain_id: number;
356
- need_send_tx: boolean;
357
- }): Promise<TransferResponse>;
395
+ }): Promise<BuildTransactionResponse>;
396
+ /**
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
400
+ */
401
+ buildTransaction(request: BuildTransactionRequest): Promise<BuildTransactionResponse>;
358
402
  }
359
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>>;
360
404
 
@@ -567,5 +611,5 @@ declare function useCoinbaseOnramp(): {
567
611
  getCoinbaseOnrampUrl: (amount: number, blockchain?: "solana" | "ethereum", redirectUrl?: string) => Promise<string>;
568
612
  };
569
613
 
570
- 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 };
571
- 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 };
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superstack-wallet-sdk",
3
- "version": "0.4.11",
3
+ "version": "0.4.12",
4
4
  "description": "A wallet SDK for superstack",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",