superstack-wallet-sdk 0.6.5 → 0.6.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/types.js.map +1 -1
- package/dist/esm/types/client.d.ts +7 -1
- package/dist/esm/types/types.d.ts +28 -0
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +35 -1
- package/package.json +2 -3
package/dist/index.d.ts
CHANGED
|
@@ -164,6 +164,34 @@ interface ApiResponse<T> {
|
|
|
164
164
|
data: T;
|
|
165
165
|
error?: string;
|
|
166
166
|
}
|
|
167
|
+
type SocialProvider = {
|
|
168
|
+
Email: string;
|
|
169
|
+
} | {
|
|
170
|
+
Google: string;
|
|
171
|
+
} | {
|
|
172
|
+
Apple: string;
|
|
173
|
+
} | {
|
|
174
|
+
Twitter: string;
|
|
175
|
+
} | {
|
|
176
|
+
Phone: string;
|
|
177
|
+
} | {
|
|
178
|
+
Phantom: string;
|
|
179
|
+
} | {
|
|
180
|
+
Telegram: number;
|
|
181
|
+
} | {
|
|
182
|
+
Okx: string;
|
|
183
|
+
} | {
|
|
184
|
+
Rabby: string;
|
|
185
|
+
} | {
|
|
186
|
+
MetaMask: string;
|
|
187
|
+
} | {
|
|
188
|
+
Coinbase: string;
|
|
189
|
+
} | {
|
|
190
|
+
WalletConnect: string;
|
|
191
|
+
};
|
|
192
|
+
interface UnbindRequest {
|
|
193
|
+
social_link: SocialProvider;
|
|
194
|
+
}
|
|
167
195
|
interface LoginModalProps {
|
|
168
196
|
client: WalletClient;
|
|
169
197
|
isOpen: boolean;
|
|
@@ -720,6 +748,12 @@ declare class WalletClient {
|
|
|
720
748
|
network?: Network;
|
|
721
749
|
isBackup?: boolean;
|
|
722
750
|
}): Promise<WalletInfo | null>;
|
|
751
|
+
/**
|
|
752
|
+
* Unbind a social account from the current user
|
|
753
|
+
* @param socialProvider The social provider to unbind (must match the format from walletInfo.social_links)
|
|
754
|
+
* @returns Updated wallet info
|
|
755
|
+
*/
|
|
756
|
+
unbind(socialProvider: SocialProvider): Promise<WalletInfo>;
|
|
723
757
|
oauthInit(params: {
|
|
724
758
|
provider: string;
|
|
725
759
|
redirect_uri: string;
|
|
@@ -1167,4 +1201,4 @@ declare function getTwitterOAuth2Link(params: AuthLinkQueryParams): Promise<stri
|
|
|
1167
1201
|
declare function getGoogleOAuth2Link(params: AuthLinkQueryParams): Promise<string>;
|
|
1168
1202
|
|
|
1169
1203
|
export { ACCESS_TOKEN_KEY, AccountMode, BACKUP_WALLET_INFO, BACKUP_WALLET_TYPE_KEY, IS_GOOGLE_AUTH_BIND, LighterGroupingType, LighterMarginMode, LighterOrderSide, LighterOrderType, LighterTimeInForce, Network, STORAGE_STATE_KEY, SocialType, Storage, VaultId, WALLET_TYPE_KEY, WalletClient, WalletProvider, WalletType, buildCodeVerifierAndChallenge, buildOAuthState, getGoogleOAuth2Link, getTwitterOAuth2Link, injectStyles, isVersionedTransaction, retrieveAndClearCodeVerifierAndChallenge, retrieveAndClearState, theme, useCoinbaseOnramp, useConnect, useLoginModal, useWallet, useWalletStatus };
|
|
1170
|
-
export type { AccountInfo, ApiResponse, AuthLinkQueryParams, AuthPayload, AuthRequestV3, AuthResponse, BuildTransactionRequest, BuildTransactionResponse, CloseFinishRequest, CloseFinishResponse, CloseInitRequest, CloseInitResponse, CoinbaseOnrampRequest, CreditAccountInfo, DeBridgeDlnCreateTxRequest, Eip712TypedData, ExchangePayload, ExchangeRequest, ExchangeResponse, ExchangeSignature, ExportFinishRequest, ExportInitRequest, ExportInitResponse, ExportWallet, ExportWalletResponse, IModalManager, LighterAuthRequest, LighterAuthResponse, LighterBuildTransactionRequest, LighterBuildTransactionResponse, LighterCancelAllOrdersParams, LighterCancelOrderParams, LighterChangeKeyRequest, LighterChangeKeyResponse, LighterCreateSubAccountParams, LighterGeneralTransferParams, LighterGroupedOrderEntry, LighterGroupedOrdersParams, LighterLeverageParams, LighterOrderParams, LighterTxContext, LighterWithdrawParams, LoginModalProps, LoginType, MiddleAccount, MiddleAccountRequest, MultiAccountRequest, OAuthLinkRes, OrderState, SignMessageResponse, SignRequestV1, SignRequestV2, SignRequestV3, SignTransactionResponse, SingleCreditAccountInfo, Social, SocialInfo, SubAccountInfo, SupportedTransactionVersions, TransactionOrVersionedTransaction, TransferRequest, UnsignedTxV2, UnsignedTxV3, UserSession, Wallet, WalletInfo, WalletProviderConfig };
|
|
1204
|
+
export type { AccountInfo, ApiResponse, AuthLinkQueryParams, AuthPayload, AuthRequestV3, AuthResponse, BuildTransactionRequest, BuildTransactionResponse, CloseFinishRequest, CloseFinishResponse, CloseInitRequest, CloseInitResponse, CoinbaseOnrampRequest, CreditAccountInfo, DeBridgeDlnCreateTxRequest, Eip712TypedData, ExchangePayload, ExchangeRequest, ExchangeResponse, ExchangeSignature, ExportFinishRequest, ExportInitRequest, ExportInitResponse, ExportWallet, ExportWalletResponse, IModalManager, LighterAuthRequest, LighterAuthResponse, LighterBuildTransactionRequest, LighterBuildTransactionResponse, LighterCancelAllOrdersParams, LighterCancelOrderParams, LighterChangeKeyRequest, LighterChangeKeyResponse, LighterCreateSubAccountParams, LighterGeneralTransferParams, LighterGroupedOrderEntry, LighterGroupedOrdersParams, LighterLeverageParams, LighterOrderParams, LighterTxContext, LighterWithdrawParams, LoginModalProps, LoginType, MiddleAccount, MiddleAccountRequest, MultiAccountRequest, OAuthLinkRes, OrderState, SignMessageResponse, SignRequestV1, SignRequestV2, SignRequestV3, SignTransactionResponse, SingleCreditAccountInfo, Social, SocialInfo, SocialProvider, SubAccountInfo, SupportedTransactionVersions, TransactionOrVersionedTransaction, TransferRequest, UnbindRequest, UnsignedTxV2, UnsignedTxV3, UserSession, Wallet, WalletInfo, WalletProviderConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superstack-wallet-sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.6",
|
|
4
4
|
"description": "A wallet SDK for superstack",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -93,6 +93,5 @@
|
|
|
93
93
|
"ts-jest": "^29.1.2",
|
|
94
94
|
"tslib": "^2.6.2",
|
|
95
95
|
"typescript": "^5.3.3"
|
|
96
|
-
}
|
|
97
|
-
"packageManager": "pnpm@10.25.0+sha512.5e82639027af37cf832061bcc6d639c219634488e0f2baebe785028a793de7b525ffcd3f7ff574f5e9860654e098fe852ba8ac5dd5cefe1767d23a020a92f501"
|
|
96
|
+
}
|
|
98
97
|
}
|