superstack-wallet-sdk 0.5.4 → 0.5.6
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/context_backup.js +1 -1
- package/dist/esm/src/context_backup.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/storage.js +1 -1
- package/dist/esm/src/storage.js.map +1 -1
- package/dist/esm/src/types.js.map +1 -1
- package/dist/esm/types/storage.d.ts +4 -1
- package/dist/esm/types/types.d.ts +46 -0
- package/dist/index.cjs +123 -123
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +51 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -156,6 +156,38 @@ declare enum VaultId {
|
|
|
156
156
|
DnHype = "DnHype",
|
|
157
157
|
DnPump = "DnPump"
|
|
158
158
|
}
|
|
159
|
+
interface DeBridgeDlnCreateTxRequest {
|
|
160
|
+
srcChainId: number;
|
|
161
|
+
srcChainTokenIn: string;
|
|
162
|
+
srcChainTokenInAmount: string;
|
|
163
|
+
dstChainId: number;
|
|
164
|
+
dstChainTokenOut: string;
|
|
165
|
+
dstChainTokenOutAmount?: string | null;
|
|
166
|
+
dstChainTokenOutRecipient?: string | null;
|
|
167
|
+
additionalTakerRewardBps?: number | null;
|
|
168
|
+
srcIntermediaryTokenAddress?: string | null;
|
|
169
|
+
dstIntermediaryTokenAddress?: string | null;
|
|
170
|
+
dstIntermediaryTokenSpenderAddress?: string | null;
|
|
171
|
+
intermediaryTokenUsdPrice?: number | null;
|
|
172
|
+
senderAddress?: string | null;
|
|
173
|
+
srcChainOrderAuthorityAddress?: string | null;
|
|
174
|
+
srcAllowedCancelBeneficiary?: string | null;
|
|
175
|
+
referralCode?: string | null;
|
|
176
|
+
affiliateFeePercentage?: number | null;
|
|
177
|
+
affiliateFeeRecipient?: string | null;
|
|
178
|
+
srcChainTokenInSenderPermit?: string | null;
|
|
179
|
+
dstChainOrderAuthorityAddress?: string | null;
|
|
180
|
+
enableEstimate?: boolean | null;
|
|
181
|
+
allowedTaker?: string | null;
|
|
182
|
+
externalCall?: string | null;
|
|
183
|
+
dlnHook?: string | null;
|
|
184
|
+
prependOperatingExpenses?: boolean | null;
|
|
185
|
+
metadata?: string | null;
|
|
186
|
+
otc?: boolean | null;
|
|
187
|
+
ptp?: boolean | null;
|
|
188
|
+
skipSolanaRecipientValidation?: boolean | null;
|
|
189
|
+
srcChainPriorityLevel?: string | null;
|
|
190
|
+
}
|
|
159
191
|
type BuildTransactionRequest = {
|
|
160
192
|
type: "HyperbeatVaultApprove";
|
|
161
193
|
data: {
|
|
@@ -187,6 +219,20 @@ type BuildTransactionRequest = {
|
|
|
187
219
|
token: string;
|
|
188
220
|
amount: string;
|
|
189
221
|
};
|
|
222
|
+
} | {
|
|
223
|
+
type: "Erc20Approve";
|
|
224
|
+
data: {
|
|
225
|
+
chain_id: number;
|
|
226
|
+
token: string;
|
|
227
|
+
spender: string;
|
|
228
|
+
amount: string;
|
|
229
|
+
decimals: number;
|
|
230
|
+
};
|
|
231
|
+
} | {
|
|
232
|
+
type: "DeBridgeDlnOrderTx";
|
|
233
|
+
data: {
|
|
234
|
+
request: DeBridgeDlnCreateTxRequest;
|
|
235
|
+
};
|
|
190
236
|
};
|
|
191
237
|
interface BuildTransactionResponse {
|
|
192
238
|
raw_transaction: string;
|
|
@@ -669,6 +715,7 @@ declare const WALLET_TYPE_KEY = "superstack_wallet_type";
|
|
|
669
715
|
declare const BACKUP_WALLET_TYPE_KEY = "superstack_backup_wallet_type";
|
|
670
716
|
declare const ACCESS_TOKEN_KEY = "embedded_wallet_access_token";
|
|
671
717
|
declare const SWITCHED_ACCOUNT_ADDRESS = "switched_account_address";
|
|
718
|
+
declare const BACKUP_WALLET_INFO = "backup_wallet_info";
|
|
672
719
|
interface StorageState {
|
|
673
720
|
accessToken: string;
|
|
674
721
|
socials: Social[];
|
|
@@ -680,12 +727,14 @@ declare class Storage {
|
|
|
680
727
|
static saveWalletType(type: "phantom" | "embedded"): void;
|
|
681
728
|
static saveBackupWalletType(type: "phantom_backup" | "embedded_backup"): void;
|
|
682
729
|
static saveSwitchedAccountAddress(address: string): void;
|
|
730
|
+
static saveBackupWalletInfo(wallet: WalletInfo): void;
|
|
683
731
|
static getWalletType(): "phantom" | "embedded" | null;
|
|
684
732
|
static getBackupWalletType(): "phantom_backup" | "embedded_backup" | null;
|
|
685
733
|
static getState(): StorageState | null;
|
|
686
734
|
static getSocials(): Social[] | null;
|
|
687
735
|
static getAccessToken(): string | null;
|
|
688
736
|
static getSwitchedAccountAddress(): string | null;
|
|
737
|
+
static getBackupWalletInfo(): WalletInfo | null;
|
|
689
738
|
static clear(): void;
|
|
690
739
|
static clearBackup(): void;
|
|
691
740
|
}
|
|
@@ -799,5 +848,5 @@ declare function useCoinbaseOnramp(): {
|
|
|
799
848
|
getCoinbaseOnrampUrl: (amount: number, blockchain?: "solana" | "ethereum", redirectUrl?: string) => Promise<string>;
|
|
800
849
|
};
|
|
801
850
|
|
|
802
|
-
export { ACCESS_TOKEN_KEY, BACKUP_WALLET_TYPE_KEY, BorrowedAsset, CollateralAsset, CrossMarginOperationType, CrossMarginPositionStatus, Network, STORAGE_STATE_KEY, SWITCHED_ACCOUNT_ADDRESS, SocialType, Storage, VaultId, WALLET_TYPE_KEY, WalletClient, WalletProvider, WalletProviderBackup, WalletType, injectStyles, isVersionedTransaction, theme, useActiveWallet, useCoinbaseOnramp, useConnect, useLoginModal, useWallet, useWalletBackup, useWalletBackupStatus, useWalletStatus };
|
|
803
|
-
export type { AccountInfo, ApiResponse, BigDecimalString, BorrowedAssetGeneralInfo, BuildTransactionRequest, BuildTransactionResponse, CoinbaseOnrampRequest, CollateralAssetGeneralInfo, CollateralAssetInfo, CrossMarginAdjustMarginRequest, CrossMarginAdjustMarginResponse, CrossMarginBorrowQuoteRequest, CrossMarginBorrowQuoteResponse, CrossMarginBorrowRequest, CrossMarginBorrowResponse, CrossMarginGeneralInfoResponse, CrossMarginRepayQuoteRequest, CrossMarginRepayQuoteResponse, CrossMarginRepayRequest, CrossMarginRepayResponse, IModalManager, LoginModalProps, LoginType, MiddleAccount, MiddleAccountRequest, OrderState, SignMessageResponse, SignRequestV1, SignRequestV2, SignTransactionResponse, SignTransactionReturnType, Social, SocialInfo, SupportedTransactionVersions, TransactionOrVersionedTransaction, TransferRequest, UnsignedTx, UserClosedPositionInfo, UserHistoryResponse, UserOpenPositionInfo, UserOpenPositionsResponse, UserOperationInfo, UserSession, Wallet, WalletInfo, WalletProviderConfig };
|
|
851
|
+
export { ACCESS_TOKEN_KEY, BACKUP_WALLET_INFO, BACKUP_WALLET_TYPE_KEY, BorrowedAsset, CollateralAsset, CrossMarginOperationType, CrossMarginPositionStatus, Network, STORAGE_STATE_KEY, SWITCHED_ACCOUNT_ADDRESS, SocialType, Storage, VaultId, WALLET_TYPE_KEY, WalletClient, WalletProvider, WalletProviderBackup, WalletType, injectStyles, isVersionedTransaction, theme, useActiveWallet, useCoinbaseOnramp, useConnect, useLoginModal, useWallet, useWalletBackup, useWalletBackupStatus, useWalletStatus };
|
|
852
|
+
export type { AccountInfo, ApiResponse, BigDecimalString, BorrowedAssetGeneralInfo, BuildTransactionRequest, BuildTransactionResponse, CoinbaseOnrampRequest, CollateralAssetGeneralInfo, CollateralAssetInfo, CrossMarginAdjustMarginRequest, CrossMarginAdjustMarginResponse, CrossMarginBorrowQuoteRequest, CrossMarginBorrowQuoteResponse, CrossMarginBorrowRequest, CrossMarginBorrowResponse, CrossMarginGeneralInfoResponse, CrossMarginRepayQuoteRequest, CrossMarginRepayQuoteResponse, CrossMarginRepayRequest, CrossMarginRepayResponse, DeBridgeDlnCreateTxRequest, IModalManager, LoginModalProps, LoginType, MiddleAccount, MiddleAccountRequest, OrderState, SignMessageResponse, SignRequestV1, SignRequestV2, SignTransactionResponse, SignTransactionReturnType, Social, SocialInfo, SupportedTransactionVersions, TransactionOrVersionedTransaction, TransferRequest, UnsignedTx, UserClosedPositionInfo, UserHistoryResponse, UserOpenPositionInfo, UserOpenPositionsResponse, UserOperationInfo, UserSession, Wallet, WalletInfo, WalletProviderConfig };
|