zh-web-sdk 2.17.0 → 3.0.0
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/CHANGELOG.md +23 -0
- package/README.md +44 -32
- package/dist/__mocks__/@zerohash-sdk/sdk-react-mock.d.ts +1 -0
- package/dist/__tests__/explicit-env.test.d.ts +1 -0
- package/dist/__tests__/message-router-origins.test.d.ts +1 -0
- package/dist/__tests__/sdk-version-attribution.test.d.ts +1 -0
- package/dist/__tests__/styles.test.d.ts +1 -0
- package/dist/api/convert-token.d.ts +12 -0
- package/dist/iframe-container/AppContainer.d.ts +13 -3
- package/dist/iframe-container/__tests__/get-new-sdk-env.test.d.ts +1 -0
- package/dist/iframe-container/hooks/use-style-updates.d.ts +1 -0
- package/dist/index.d.ts +30 -2
- package/dist/index.js +56 -54
- package/dist/index.js.map +4 -4
- package/dist/new-sdk/env.d.ts +35 -0
- package/dist/redux/__tests__/set-theme.test.d.ts +1 -0
- package/dist/redux/__tests__/set-use-new-sdk.test.d.ts +1 -0
- package/dist/redux/actions/index.d.ts +13 -1
- package/dist/redux/reducers/constants.d.ts +2 -0
- package/dist/redux/reducers/index.d.ts +3 -1
- package/dist/redux/reducers/new-sdk-flags.d.ts +11 -0
- package/dist/redux/reducers/theme.d.ts +10 -0
- package/dist/redux/store/index.d.ts +3 -1
- package/dist/styles.d.ts +7 -0
- package/dist/types.d.ts +42 -0
- package/dist/utils/test-utils.d.ts +48 -48
- package/dist/version.d.ts +1 -0
- package/package.json +27 -13
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Environment, InternalEnvironment } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Resolved env used internally to pick the CDN origin and forward to
|
|
4
|
+
* `@zerohash-sdk/*-react` components. Combines the public {@link Environment}
|
|
5
|
+
* surface (`'cert' | 'prod'`) with internal-only QA targets
|
|
6
|
+
* ({@link InternalEnvironment} — `'local' | 'dev'`).
|
|
7
|
+
*/
|
|
8
|
+
export type NewSdkEnv = Environment | InternalEnvironment;
|
|
9
|
+
/**
|
|
10
|
+
* CDN origin that hosts the new `@zerohash-sdk/*` web components for a
|
|
11
|
+
* given environment. The `messageRouter` uses this to decide which
|
|
12
|
+
* origin is trusted to post lifecycle events back to the parent window.
|
|
13
|
+
*/
|
|
14
|
+
export declare const NEW_SDK_ORIGIN_BY_ENV: Record<NewSdkEnv, string>;
|
|
15
|
+
/**
|
|
16
|
+
* Derive the environment from the host app's `zeroHashAppsURL`. Returns
|
|
17
|
+
* `'prod'` for any hostname not in the known lists, which is the safest
|
|
18
|
+
* default for a production-hardcoded CDN. When the fallback path is taken
|
|
19
|
+
* we log a one-time `console.warn` so integrators on a host outside the
|
|
20
|
+
* allowlist can spot the misconfiguration instead of silently being
|
|
21
|
+
* pointed at the production CDN.
|
|
22
|
+
*/
|
|
23
|
+
export declare function getNewSdkEnv(url: string): NewSdkEnv;
|
|
24
|
+
/**
|
|
25
|
+
* Test-only: clear the warn-once cache so suites can assert the warning
|
|
26
|
+
* fires per URL without leaking state across tests.
|
|
27
|
+
*/
|
|
28
|
+
export declare function _resetWarnedFallbackUrls(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Auth-component env literal. `@connect-xyz/auth-react` only accepts
|
|
31
|
+
* `'sandbox' | 'production'` (no `dev` or `local`), so non-prod SDK envs
|
|
32
|
+
* collapse to `sandbox` — Auth's sandbox API serves cert/dev/local data.
|
|
33
|
+
*/
|
|
34
|
+
export type AuthEnv = 'sandbox' | 'production';
|
|
35
|
+
export declare function toAuthEnv(env: NewSdkEnv): AuthEnv;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
import { AppIdentifier } from "../../types";
|
|
1
|
+
import { AppIdentifier, Theme } from "../../types";
|
|
2
2
|
export declare const openModal: (appIdentifier: AppIdentifier) => void;
|
|
3
3
|
export declare const closeModal: (appIdentifier: AppIdentifier) => void;
|
|
4
4
|
export declare const appLoaded: (appIdentifier: AppIdentifier) => void;
|
|
5
5
|
export declare const appPendingApproval: (appIdentifier: AppIdentifier) => void;
|
|
6
6
|
export declare const appCompleted: (appIdentifier: AppIdentifier) => void;
|
|
7
7
|
export declare const appFailed: (appIdentifier: AppIdentifier) => void;
|
|
8
|
+
/**
|
|
9
|
+
* setUseNewSdk dispatches into the `new-sdk-flags` slice directly (not
|
|
10
|
+
* through `dispatchActionBasedOnAppIdentifier`), because that slice is keyed
|
|
11
|
+
* by appIdentifier internally rather than having one reducer per app.
|
|
12
|
+
*/
|
|
13
|
+
export declare const setUseNewSdk: (appIdentifier: AppIdentifier, useNewSdk: boolean) => void;
|
|
14
|
+
/**
|
|
15
|
+
* setTheme dispatches into the global `theme` slice. Forwarded to new
|
|
16
|
+
* @zerohash-sdk/*-react components via AppContainer; legacy iframe and
|
|
17
|
+
* Connect Auth paths ignore it.
|
|
18
|
+
*/
|
|
19
|
+
export declare const setTheme: (theme: Theme) => void;
|
|
@@ -7,3 +7,5 @@ export declare const ACTION_FAILED = "FAILED";
|
|
|
7
7
|
export declare const ACTION_SET_FILTERS = "ACTION_SET_FILTERS";
|
|
8
8
|
export declare const ACTION_SET_NAVIGATE = "SET_NAVIGATE";
|
|
9
9
|
export declare const ACTION_SET_USE_AUTH = "SET_USE_AUTH";
|
|
10
|
+
export declare const ACTION_SET_USE_NEW_SDK = "SET_USE_NEW_SDK";
|
|
11
|
+
export declare const ACTION_SET_THEME = "SET_THEME";
|
|
@@ -15,5 +15,7 @@ declare const rootReducer: import("redux").Reducer<import("redux").CombinedState
|
|
|
15
15
|
payouts: import("./payouts").IPayoutsState;
|
|
16
16
|
pay: import("./pay").IPayState;
|
|
17
17
|
"fiat-account-link": import("./fiat-account-link").IFiatAccountLinkState;
|
|
18
|
-
|
|
18
|
+
"new-sdk-flags": import("./new-sdk-flags").INewSdkFlagsState;
|
|
19
|
+
theme: import("./theme").IThemeState;
|
|
20
|
+
}>, import("./crypto-withdrawals").ICryptoWithdrawalsAction | import("./onboarding").IOnboardingAction | import("./crypto-buy").ICryptoBuyAction | import("./fund").IFundAction | import("./new-sdk-flags").INewSdkFlagsAction | import("./theme").IThemeAction>;
|
|
19
21
|
export default rootReducer;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AppIdentifier } from "../../types";
|
|
2
|
+
export interface INewSdkFlagsState {
|
|
3
|
+
flags: Partial<Record<AppIdentifier, boolean>>;
|
|
4
|
+
}
|
|
5
|
+
export interface INewSdkFlagsAction {
|
|
6
|
+
type: string;
|
|
7
|
+
appIdentifier?: AppIdentifier;
|
|
8
|
+
useNewSdk?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const newSdkFlagsReducer: (state: INewSdkFlagsState | undefined, action: INewSdkFlagsAction) => INewSdkFlagsState;
|
|
11
|
+
export default newSdkFlagsReducer;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Theme } from "../../types";
|
|
2
|
+
export interface IThemeState {
|
|
3
|
+
value: Theme;
|
|
4
|
+
}
|
|
5
|
+
export interface IThemeAction {
|
|
6
|
+
type: string;
|
|
7
|
+
theme?: Theme;
|
|
8
|
+
}
|
|
9
|
+
declare const themeReducer: (state: IThemeState | undefined, action: IThemeAction) => IThemeState;
|
|
10
|
+
export default themeReducer;
|
|
@@ -17,7 +17,9 @@ declare const store: import("redux").Store<import("redux").EmptyObject & {
|
|
|
17
17
|
payouts: import("../reducers/payouts").IPayoutsState;
|
|
18
18
|
pay: import("../reducers/pay").IPayState;
|
|
19
19
|
"fiat-account-link": import("../reducers/fiat-account-link").IFiatAccountLinkState;
|
|
20
|
-
|
|
20
|
+
"new-sdk-flags": import("../reducers/new-sdk-flags").INewSdkFlagsState;
|
|
21
|
+
theme: import("../reducers/theme").IThemeState;
|
|
22
|
+
}, import("../reducers/crypto-withdrawals").ICryptoWithdrawalsAction | import("../reducers/onboarding").IOnboardingAction | import("../reducers/crypto-buy").ICryptoBuyAction | import("../reducers/fund").IFundAction | import("../reducers/new-sdk-flags").INewSdkFlagsAction | import("../reducers/theme").IThemeAction>;
|
|
21
23
|
export default store;
|
|
22
24
|
export type RootState = ReturnType<typeof rootReducer>;
|
|
23
25
|
export type AppStore = ReturnType<typeof createStore>;
|
package/dist/styles.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
|
+
import { Theme } from "./types";
|
|
2
3
|
/**
|
|
3
4
|
* Returns the modal border radius based on device type
|
|
4
5
|
* Mobile devices: 0
|
|
@@ -19,6 +20,12 @@ export declare const containerMediaStyles: {
|
|
|
19
20
|
[id: string]: CSSProperties;
|
|
20
21
|
};
|
|
21
22
|
export declare const appWrapperStyle: CSSProperties;
|
|
23
|
+
export declare const getModalStyle: (theme?: Theme) => CSSProperties;
|
|
24
|
+
/**
|
|
25
|
+
* Default light-mode modal style retained as a named export so existing
|
|
26
|
+
* imports keep compiling. Prefer `getModalStyle(theme)` in render paths
|
|
27
|
+
* that have the resolved theme available.
|
|
28
|
+
*/
|
|
22
29
|
export declare const modalStyle: CSSProperties;
|
|
23
30
|
export declare const iframeWrapperStyle: CSSProperties;
|
|
24
31
|
export declare const iframeStyle: CSSProperties;
|
package/dist/types.d.ts
CHANGED
|
@@ -11,6 +11,28 @@ declare global {
|
|
|
11
11
|
MiniKit: typeof MiniKit;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Theme controls the appearance of new @zerohash-sdk/*-react components
|
|
16
|
+
* rendered by this SDK. Does not affect the legacy iframe path or the
|
|
17
|
+
* Connect Auth (Fund) component.
|
|
18
|
+
*/
|
|
19
|
+
export type Theme = 'light' | 'dark' | 'auto';
|
|
20
|
+
/**
|
|
21
|
+
* Environment selects which deployment of the new @zerohash-sdk/*-react
|
|
22
|
+
* components and their backing services should be used. When set, this
|
|
23
|
+
* takes precedence over hostname-based inference from `zeroHashAppsURL`
|
|
24
|
+
* and is the recommended way to target a specific environment going
|
|
25
|
+
* forward.
|
|
26
|
+
*/
|
|
27
|
+
export type Environment = 'cert' | 'prod';
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
* InternalEnvironment exposes Zero Hash dev/local CDN targets used by our
|
|
31
|
+
* own QA tooling (sdk-mobile against simulators, kyc-mock-platform-server).
|
|
32
|
+
* Not part of the public API; values may change without notice. Integrators
|
|
33
|
+
* must use {@link Environment} (`'cert' | 'prod'`).
|
|
34
|
+
*/
|
|
35
|
+
export type InternalEnvironment = 'local' | 'dev';
|
|
14
36
|
/**
|
|
15
37
|
* IInitializeParameters describes the parameters
|
|
16
38
|
* required for initializing the platform SDK
|
|
@@ -122,6 +144,22 @@ export interface IInitializeParameters {
|
|
|
122
144
|
* be a replacement for zeroHashOnboardingURL.
|
|
123
145
|
*/
|
|
124
146
|
zeroHashAppsURL: string;
|
|
147
|
+
/**
|
|
148
|
+
* env selects which deployment the SDK should target ('cert' | 'prod').
|
|
149
|
+
* When set, it is the source of truth for environment resolution and
|
|
150
|
+
* overrides hostname-based inference from `zeroHashAppsURL` /
|
|
151
|
+
* `zeroHashOnboardingURL`.
|
|
152
|
+
*/
|
|
153
|
+
env?: Environment | InternalEnvironment;
|
|
154
|
+
/**
|
|
155
|
+
* theme controls the appearance of new @zerohash-sdk/*-react components
|
|
156
|
+
* rendered by this SDK (e.g. CryptoBuy, CryptoSell, Onboarding).
|
|
157
|
+
*
|
|
158
|
+
* Defaults to 'light'. Does not affect the legacy iframe path or the
|
|
159
|
+
* Connect Auth (Fund) component — the Auth component is themed via
|
|
160
|
+
* authSettings.theme.
|
|
161
|
+
*/
|
|
162
|
+
theme?: Theme;
|
|
125
163
|
}
|
|
126
164
|
/**
|
|
127
165
|
* ISetUserOnboardingJWTParameters describes the
|
|
@@ -464,6 +502,7 @@ export interface IZeroHashSDK {
|
|
|
464
502
|
isOnboardingModalOpen(): boolean;
|
|
465
503
|
openOnboardingModal(params: IOpenOnboardingModalParameters): void;
|
|
466
504
|
closeOnboardingModal(): void;
|
|
505
|
+
setTheme(params: ISetThemeParameters): void;
|
|
467
506
|
}
|
|
468
507
|
/**
|
|
469
508
|
* App identifier used to identify to which App we want to perform
|
|
@@ -495,6 +534,9 @@ export interface ISetJWTParameters {
|
|
|
495
534
|
jwt: string;
|
|
496
535
|
appIdentifier: AppIdentifier;
|
|
497
536
|
}
|
|
537
|
+
export interface ISetThemeParameters {
|
|
538
|
+
theme: Theme;
|
|
539
|
+
}
|
|
498
540
|
export interface Filters {
|
|
499
541
|
getAssets?: {
|
|
500
542
|
deposit_address_creation?: string;
|
|
@@ -12,54 +12,54 @@ export declare function renderWithProviders(ui: React.ReactElement, extendedRend
|
|
|
12
12
|
rerender: (ui: React.ReactNode) => void;
|
|
13
13
|
unmount: () => void;
|
|
14
14
|
asFragment: () => DocumentFragment;
|
|
15
|
-
getByLabelText: (id: import("@testing-library/
|
|
16
|
-
getAllByLabelText: (id: import("@testing-library/
|
|
17
|
-
queryByLabelText: (id: import("@testing-library/
|
|
18
|
-
queryAllByLabelText: (id: import("@testing-library/
|
|
19
|
-
findByLabelText: (id: import("@testing-library/
|
|
20
|
-
findAllByLabelText: (id: import("@testing-library/
|
|
21
|
-
getByPlaceholderText: (id: import("@testing-library/
|
|
22
|
-
getAllByPlaceholderText: (id: import("@testing-library/
|
|
23
|
-
queryByPlaceholderText: (id: import("@testing-library/
|
|
24
|
-
queryAllByPlaceholderText: (id: import("@testing-library/
|
|
25
|
-
findByPlaceholderText: (id: import("@testing-library/
|
|
26
|
-
findAllByPlaceholderText: (id: import("@testing-library/
|
|
27
|
-
getByText: (id: import("@testing-library/
|
|
28
|
-
getAllByText: (id: import("@testing-library/
|
|
29
|
-
queryByText: (id: import("@testing-library/
|
|
30
|
-
queryAllByText: (id: import("@testing-library/
|
|
31
|
-
findByText: (id: import("@testing-library/
|
|
32
|
-
findAllByText: (id: import("@testing-library/
|
|
33
|
-
getByAltText: (id: import("@testing-library/
|
|
34
|
-
getAllByAltText: (id: import("@testing-library/
|
|
35
|
-
queryByAltText: (id: import("@testing-library/
|
|
36
|
-
queryAllByAltText: (id: import("@testing-library/
|
|
37
|
-
findByAltText: (id: import("@testing-library/
|
|
38
|
-
findAllByAltText: (id: import("@testing-library/
|
|
39
|
-
getByTitle: (id: import("@testing-library/
|
|
40
|
-
getAllByTitle: (id: import("@testing-library/
|
|
41
|
-
queryByTitle: (id: import("@testing-library/
|
|
42
|
-
queryAllByTitle: (id: import("@testing-library/
|
|
43
|
-
findByTitle: (id: import("@testing-library/
|
|
44
|
-
findAllByTitle: (id: import("@testing-library/
|
|
45
|
-
getByDisplayValue: (id: import("@testing-library/
|
|
46
|
-
getAllByDisplayValue: (id: import("@testing-library/
|
|
47
|
-
queryByDisplayValue: (id: import("@testing-library/
|
|
48
|
-
queryAllByDisplayValue: (id: import("@testing-library/
|
|
49
|
-
findByDisplayValue: (id: import("@testing-library/
|
|
50
|
-
findAllByDisplayValue: (id: import("@testing-library/
|
|
51
|
-
getByRole: (role: import("@testing-library/
|
|
52
|
-
getAllByRole: (role: import("@testing-library/
|
|
53
|
-
queryByRole: (role: import("@testing-library/
|
|
54
|
-
queryAllByRole: (role: import("@testing-library/
|
|
55
|
-
findByRole: (role: import("@testing-library/
|
|
56
|
-
findAllByRole: (role: import("@testing-library/
|
|
57
|
-
getByTestId: (id: import("@testing-library/
|
|
58
|
-
getAllByTestId: (id: import("@testing-library/
|
|
59
|
-
queryByTestId: (id: import("@testing-library/
|
|
60
|
-
queryAllByTestId: (id: import("@testing-library/
|
|
61
|
-
findByTestId: (id: import("@testing-library/
|
|
62
|
-
findAllByTestId: (id: import("@testing-library/
|
|
15
|
+
getByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement;
|
|
16
|
+
getAllByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
17
|
+
queryByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement | null;
|
|
18
|
+
queryAllByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
19
|
+
findByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
20
|
+
findAllByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
21
|
+
getByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
|
|
22
|
+
getAllByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
23
|
+
queryByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
|
|
24
|
+
queryAllByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
25
|
+
findByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
26
|
+
findAllByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
27
|
+
getByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement;
|
|
28
|
+
getAllByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
29
|
+
queryByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement | null;
|
|
30
|
+
queryAllByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
31
|
+
findByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
32
|
+
findAllByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
33
|
+
getByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
|
|
34
|
+
getAllByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
35
|
+
queryByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
|
|
36
|
+
queryAllByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
37
|
+
findByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
38
|
+
findAllByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
39
|
+
getByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
|
|
40
|
+
getAllByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
41
|
+
queryByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
|
|
42
|
+
queryAllByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
43
|
+
findByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
44
|
+
findAllByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
45
|
+
getByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
|
|
46
|
+
getAllByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
47
|
+
queryByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
|
|
48
|
+
queryAllByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
49
|
+
findByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
50
|
+
findAllByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
51
|
+
getByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined) => HTMLElement;
|
|
52
|
+
getAllByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined) => HTMLElement[];
|
|
53
|
+
queryByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined) => HTMLElement | null;
|
|
54
|
+
queryAllByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined) => HTMLElement[];
|
|
55
|
+
findByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
56
|
+
findAllByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
57
|
+
getByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
|
|
58
|
+
getAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
59
|
+
queryByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
|
|
60
|
+
queryAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
61
|
+
findByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
62
|
+
findAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
63
63
|
store: import("redux").Store<unknown, import("redux").Action<any>>;
|
|
64
64
|
};
|
|
65
65
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SDK_VERSION: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zh-web-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "ZeroHash Web SDK",
|
|
6
6
|
"homepage": "https://github.com/seedcx/zh-web-sdk",
|
|
@@ -26,13 +26,15 @@
|
|
|
26
26
|
"test": "jest --silent"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@testing-library/dom": "^10.4.
|
|
30
|
-
"@testing-library/react": "^16.
|
|
29
|
+
"@testing-library/dom": "^10.4.1",
|
|
30
|
+
"@testing-library/react": "^16.3.2",
|
|
31
31
|
"@types/jest": "^29.5.14",
|
|
32
|
-
"@types/react": "^18.3.
|
|
33
|
-
"@types/react-dom": "^18.3.
|
|
32
|
+
"@types/react": "^18.3.29",
|
|
33
|
+
"@types/react-dom": "^18.3.7",
|
|
34
34
|
"@typescript-eslint/eslint-plugin": "^6.4.0",
|
|
35
35
|
"archiver": "^5.3.1",
|
|
36
|
+
"braces": "3.0.3",
|
|
37
|
+
"cross-spawn": "^7.0.5",
|
|
36
38
|
"esbuild": "0.25.0",
|
|
37
39
|
"eslint": "^8.47.0",
|
|
38
40
|
"eslint-config-prettier": "6.15.0",
|
|
@@ -43,22 +45,34 @@
|
|
|
43
45
|
"eslint-plugin-promise": "^6.1.1",
|
|
44
46
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
45
47
|
"eslint-plugin-react-refresh": "^0.3.4",
|
|
48
|
+
"form-data": "4.0.4",
|
|
46
49
|
"jest": "^29.7.0",
|
|
47
50
|
"jest-environment-jsdom": "^29.7.0",
|
|
48
|
-
"cross-spawn": "^7.0.5",
|
|
49
|
-
"form-data": "4.0.4",
|
|
50
51
|
"rimraf": "^5.0.1",
|
|
51
52
|
"ts-jest": "^29.2.5",
|
|
52
53
|
"ts-node": "^10.9.2",
|
|
53
|
-
"typescript": "^5.7.2"
|
|
54
|
-
"braces": "3.0.3"
|
|
54
|
+
"typescript": "^5.7.2"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@connect-xyz/auth-react": "^0.
|
|
57
|
+
"@connect-xyz/auth-react": "^0.72.3",
|
|
58
58
|
"@worldcoin/minikit-js": "^1.9.6",
|
|
59
|
-
"react": "^
|
|
60
|
-
"react
|
|
61
|
-
"react
|
|
59
|
+
"@zerohash-sdk/crypto-account-link-react": "^1.2.3",
|
|
60
|
+
"@zerohash-sdk/crypto-buy-react": "^1.3.3",
|
|
61
|
+
"@zerohash-sdk/crypto-sell-react": "^1.3.3",
|
|
62
|
+
"@zerohash-sdk/crypto-withdrawals-react": "^1.3.3",
|
|
63
|
+
"@zerohash-sdk/csp-crypto-sell-react": "^1.3.3",
|
|
64
|
+
"@zerohash-sdk/csp-crypto-withdrawals-react": "^1.3.3",
|
|
65
|
+
"@zerohash-sdk/csp-fiat-withdrawals-react": "^0.1.2",
|
|
66
|
+
"@zerohash-sdk/fiat-account-link-react": "^1.3.2",
|
|
67
|
+
"@zerohash-sdk/fiat-deposits-react": "^1.3.3",
|
|
68
|
+
"@zerohash-sdk/fiat-withdrawals-react": "^1.3.3",
|
|
69
|
+
"@zerohash-sdk/fund-react": "^1.3.3",
|
|
70
|
+
"@zerohash-sdk/fund-withdrawals-react": "^0.2.2",
|
|
71
|
+
"@zerohash-sdk/onboarding-react": "^1.3.3",
|
|
72
|
+
"@zerohash-sdk/profile-react": "^0.2.2",
|
|
73
|
+
"react": "^18.3.1",
|
|
74
|
+
"react-dom": "^18.3.1",
|
|
75
|
+
"react-redux": "^8.1.3",
|
|
62
76
|
"redux": "^4.2.1"
|
|
63
77
|
},
|
|
64
78
|
"repository": {
|