signer-test-sdk-react 0.0.14 → 0.0.16
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/src/AbstraxnProvider.js +264 -2
- package/dist/src/AbstraxnProvider.js.map +1 -1
- package/dist/src/OnboardingUI.d.ts +1 -1
- package/dist/src/OnboardingUI.js +1 -1
- package/dist/src/components/OnboardingUI/OnboardingUI.css +227 -75
- package/dist/src/components/OnboardingUI/OnboardingUIReact.d.ts +3 -3
- package/dist/src/components/OnboardingUI/OnboardingUIReact.js +109 -55
- package/dist/src/components/OnboardingUI/OnboardingUIReact.js.map +1 -1
- package/dist/src/components/OnboardingUI/OnboardingUIWeb.d.ts +1 -2
- package/dist/src/components/OnboardingUI/OnboardingUIWeb.js +953 -861
- package/dist/src/components/OnboardingUI/OnboardingUIWeb.js.map +1 -1
- package/dist/src/components/OnboardingUI/components/EmailForm.d.ts +3 -3
- package/dist/src/components/OnboardingUI/components/EmailForm.js +13 -5
- package/dist/src/components/OnboardingUI/components/EmailForm.js.map +1 -1
- package/dist/src/components/OnboardingUI/components/Modal.d.ts +0 -1
- package/dist/src/components/OnboardingUI/components/Modal.js +4 -11
- package/dist/src/components/OnboardingUI/components/Modal.js.map +1 -1
- package/dist/src/components/OnboardingUI/components/OtpForm.d.ts +4 -3
- package/dist/src/components/OnboardingUI/components/OtpForm.js +19 -22
- package/dist/src/components/OnboardingUI/components/OtpForm.js.map +1 -1
- package/dist/src/components/OnboardingUI/hooks/useAuthMethods.js +40 -0
- package/dist/src/components/OnboardingUI/hooks/useAuthMethods.js.map +1 -1
- package/dist/src/components/OnboardingUI/hooks/useOnboarding.js +16 -0
- package/dist/src/components/OnboardingUI/hooks/useOnboarding.js.map +1 -1
- package/dist/src/connectors.d.ts +27 -0
- package/dist/src/connectors.js +70 -0
- package/dist/src/connectors.js.map +1 -0
- package/dist/src/hooks.d.ts +33 -0
- package/dist/src/hooks.js +62 -0
- package/dist/src/hooks.js.map +1 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.js +2 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/types.d.ts +12 -16
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -2
package/dist/src/index.js
CHANGED
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
* when used in a React project
|
|
5
5
|
*/
|
|
6
6
|
export { AbstraxnProvider, useAbstraxnWallet } from './AbstraxnProvider';
|
|
7
|
-
export { useIsConnected, useAddress, useUser, useChainId, useIsInitialized, useLoading, useError, useWallet, usePrepareTransaction, useSignTransaction, useSignAndSendTransaction, useExportWallet, useWhoami, useExternalWallet, useExternalWalletBalance, useExternalWalletChain, useExternalWalletInfo, usePublicClient, useWalletClient, useContract, usePrepareRawTxn, useSignTxn, useSignAndSendTxn, useWaitForTxnReceipt, useReadContract, useExternalWalletClient, useWriteContract, } from './hooks';
|
|
7
|
+
export { useIsConnected, useAddress, useUser, useChainId, useIsInitialized, useLoading, useError, useWallet, usePrepareTransaction, useSignTransaction, useSignAndSendTransaction, useExportWallet, useWhoami, useExternalWallet, useExternalWalletBalance, useExternalWalletChain, useExternalWalletInfo, usePublicClient, useWalletClient, useContract, usePrepareRawTxn, useSignTxn, useSignAndSendTxn, useWaitForTxnReceipt, useReadContract, useExternalWalletClient, useWriteContract, useConnectionType, } from './hooks';
|
|
8
8
|
export { ConnectButton } from './ConnectButton';
|
|
9
9
|
export { WalletModal } from './WalletModal';
|
|
10
10
|
export { OnboardingUIComponent as OnboardingUI } from './OnboardingUI';
|
|
11
11
|
export { ALL_CHAINS, EVM_CHAINS, SOLANA_CHAINS, getChainById, getChainsByType, getDefaultChains, toCoreChain, } from './chains';
|
|
12
|
+
export { CONNECTORS, getConnectorMeta, isOAuthConnector, isWalletConnector, isAuthConnector, } from './connectors';
|
|
12
13
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EACL,cAAc,EACd,UAAU,EACV,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACR,SAAS,EACT,qBAAqB,EACrB,kBAAkB,EAClB,yBAAyB,EACzB,eAAe,EACf,SAAS,EACT,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,uBAAuB,EACvB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EACL,cAAc,EACd,UAAU,EACV,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACR,SAAS,EACT,qBAAqB,EACrB,kBAAkB,EAClB,yBAAyB,EACzB,eAAe,EACf,SAAS,EACT,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,qBAAqB,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAUvE,OAAO,EACL,UAAU,EACV,UAAU,EACV,aAAa,EACb,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,WAAW,GAEZ,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,GAGhB,MAAM,cAAc,CAAC"}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* React-specific types for Abstraxn Wallet SDK
|
|
3
3
|
*/
|
|
4
|
-
import type { AbstraxnWalletConfig, User, WhoamiResponse } from
|
|
5
|
-
import type { Theme } from
|
|
4
|
+
import type { AbstraxnWalletConfig, User, WhoamiResponse } from "signer-test-sdk-core";
|
|
5
|
+
import type { Theme } from "signer-test-sdk-core";
|
|
6
6
|
/**
|
|
7
7
|
* UI Configuration for the provider
|
|
8
8
|
*/
|
|
@@ -18,7 +18,7 @@ export interface AbstraxnUIConfig {
|
|
|
18
18
|
logo?: string;
|
|
19
19
|
/**
|
|
20
20
|
* Onboarding title/heading
|
|
21
|
-
* @default 'Sign
|
|
21
|
+
* @default 'Sign In'
|
|
22
22
|
*/
|
|
23
23
|
onboardTitle?: string;
|
|
24
24
|
/**
|
|
@@ -44,11 +44,6 @@ export interface AbstraxnUIConfig {
|
|
|
44
44
|
* @default true
|
|
45
45
|
*/
|
|
46
46
|
closeOnBackdropClick?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Show close button
|
|
49
|
-
* @default true
|
|
50
|
-
*/
|
|
51
|
-
showCloseButton?: boolean;
|
|
52
47
|
/**
|
|
53
48
|
* Custom CSS overrides (injected as style tag)
|
|
54
49
|
*/
|
|
@@ -85,7 +80,7 @@ export interface AbstraxnUIConfig {
|
|
|
85
80
|
* If not provided, shows both email and Google options
|
|
86
81
|
* @default ['otp', 'google']
|
|
87
82
|
*/
|
|
88
|
-
authMethods?: (
|
|
83
|
+
authMethods?: ("otp" | "google" | "passkey" | "twitter" | "discord")[];
|
|
89
84
|
}
|
|
90
85
|
/**
|
|
91
86
|
* External wallet configuration
|
|
@@ -104,7 +99,7 @@ export interface ExternalWalletConfig {
|
|
|
104
99
|
* Enabled connectors
|
|
105
100
|
* @default ['injected']
|
|
106
101
|
*/
|
|
107
|
-
connectors?: (
|
|
102
|
+
connectors?: ("injected" | "metaMask" | "walletConnect")[];
|
|
108
103
|
}
|
|
109
104
|
/**
|
|
110
105
|
* Chain Configuration
|
|
@@ -158,7 +153,7 @@ export interface AbstraxnProviderConfig extends AbstraxnWalletConfig {
|
|
|
158
153
|
* Context value type
|
|
159
154
|
*/
|
|
160
155
|
export interface AbstraxnContextValue {
|
|
161
|
-
wallet: import(
|
|
156
|
+
wallet: import("signer-test-sdk-core").AbstraxnWallet | null;
|
|
162
157
|
isInitialized: boolean;
|
|
163
158
|
isConnected: boolean;
|
|
164
159
|
address: string | null;
|
|
@@ -176,12 +171,12 @@ export interface AbstraxnContextValue {
|
|
|
176
171
|
getChainId: () => Promise<number>;
|
|
177
172
|
switchChain: (chainId: number) => Promise<void>;
|
|
178
173
|
signMessage: (message: string) => Promise<string>;
|
|
179
|
-
signTransaction: (tx: import(
|
|
180
|
-
sendTransaction: (tx: import(
|
|
174
|
+
signTransaction: (tx: import("signer-test-sdk-core").TransactionRequest) => Promise<string>;
|
|
175
|
+
sendTransaction: (tx: import("signer-test-sdk-core").TransactionRequest) => Promise<import("signer-test-sdk-core").TransactionResponse>;
|
|
181
176
|
signTransactionViaAPI: (unsignedTransaction: string, fromAddress: string) => Promise<{
|
|
182
177
|
signedTransaction: string;
|
|
183
178
|
}>;
|
|
184
|
-
signAndSendTransaction: (unsignedTransaction: string, fromAddress: string, rpcUrl?: string) => Promise<import(
|
|
179
|
+
signAndSendTransaction: (unsignedTransaction: string, fromAddress: string, rpcUrl?: string) => Promise<import("signer-test-sdk-core").TransactionResponse>;
|
|
185
180
|
loginWithOTP: (email: string) => Promise<{
|
|
186
181
|
otpId: string;
|
|
187
182
|
}>;
|
|
@@ -204,7 +199,8 @@ export interface AbstraxnContextValue {
|
|
|
204
199
|
switchExternalWalletChain?: (chainId: number) => Promise<void>;
|
|
205
200
|
uiConfig?: AbstraxnUIConfig;
|
|
206
201
|
switchChainEnhanced?: (chainId: number) => Promise<void>;
|
|
207
|
-
currentChain?: import(
|
|
208
|
-
availableChains?: import(
|
|
202
|
+
currentChain?: import("./chains").ChainData | null;
|
|
203
|
+
availableChains?: import("./chains").ChainData[];
|
|
209
204
|
walletBalance?: bigint | null;
|
|
205
|
+
connectionType?: string | null;
|
|
210
206
|
}
|