@getpara/react-core 2.19.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/dist/index.d.ts +37 -0
- package/dist/index.js +73 -0
- package/dist/mutations.d.ts +29 -0
- package/dist/mutations.js +60 -0
- package/dist/package.json +4 -0
- package/dist/provider/ParaProviderCore.d.ts +85 -0
- package/dist/provider/ParaProviderCore.js +124 -0
- package/dist/provider/actions/getEmbeddedAccount.d.ts +28 -0
- package/dist/provider/actions/getEmbeddedAccount.js +82 -0
- package/dist/provider/actions/getWallet.js +34 -0
- package/dist/provider/actions/index.d.ts +38 -0
- package/dist/provider/actions/index.js +75 -0
- package/dist/provider/actions/utils.d.ts +4 -0
- package/dist/provider/actions/utils.js +32 -0
- package/dist/provider/hooks/aa/alchemy.d.ts +22 -0
- package/dist/provider/hooks/aa/alchemy.js +47 -0
- package/dist/provider/hooks/aa/biconomy.d.ts +22 -0
- package/dist/provider/hooks/aa/biconomy.js +47 -0
- package/dist/provider/hooks/aa/cdp.d.ts +21 -0
- package/dist/provider/hooks/aa/cdp.js +47 -0
- package/dist/provider/hooks/aa/createSmartAccountHook.d.ts +18 -0
- package/dist/provider/hooks/aa/createSmartAccountHook.js +96 -0
- package/dist/provider/hooks/aa/gelato.d.ts +21 -0
- package/dist/provider/hooks/aa/gelato.js +47 -0
- package/dist/provider/hooks/aa/index.d.ts +12 -0
- package/dist/provider/hooks/aa/index.js +48 -0
- package/dist/provider/hooks/aa/pimlico.d.ts +22 -0
- package/dist/provider/hooks/aa/pimlico.js +47 -0
- package/dist/provider/hooks/aa/porto.d.ts +22 -0
- package/dist/provider/hooks/aa/porto.js +47 -0
- package/dist/provider/hooks/aa/rhinestone.d.ts +22 -0
- package/dist/provider/hooks/aa/rhinestone.js +47 -0
- package/dist/provider/hooks/aa/safe.d.ts +22 -0
- package/dist/provider/hooks/aa/safe.js +47 -0
- package/dist/provider/hooks/aa/thirdweb.d.ts +18 -0
- package/dist/provider/hooks/aa/thirdweb.js +47 -0
- package/dist/provider/hooks/aa/types.d.ts +34 -0
- package/dist/provider/hooks/aa/types.js +0 -0
- package/dist/provider/hooks/aa/zerodev.d.ts +22 -0
- package/dist/provider/hooks/aa/zerodev.js +47 -0
- package/dist/provider/hooks/index.d.ts +4 -0
- package/dist/provider/hooks/index.js +4 -0
- package/dist/provider/hooks/mutations/index.d.ts +30 -0
- package/dist/provider/hooks/mutations/index.js +92 -0
- package/dist/provider/hooks/mutations/useAuthenticateWithEmailOrPhone.d.ts +34 -0
- package/dist/provider/hooks/mutations/useAuthenticateWithEmailOrPhone.js +39 -0
- package/dist/provider/hooks/mutations/useAuthenticateWithOAuth.d.ts +34 -0
- package/dist/provider/hooks/mutations/useAuthenticateWithOAuth.js +39 -0
- package/dist/provider/hooks/mutations/useClaimPregenWallets.d.ts +34 -0
- package/dist/provider/hooks/mutations/useClaimPregenWallets.js +42 -0
- package/dist/provider/hooks/mutations/useCreateGuestWallets.d.ts +34 -0
- package/dist/provider/hooks/mutations/useCreateGuestWallets.js +42 -0
- package/dist/provider/hooks/mutations/useCreatePregenWallet.d.ts +34 -0
- package/dist/provider/hooks/mutations/useCreatePregenWallet.js +42 -0
- package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.d.ts +34 -0
- package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.js +39 -0
- package/dist/provider/hooks/mutations/useCreateWallet.d.ts +34 -0
- package/dist/provider/hooks/mutations/useCreateWallet.js +42 -0
- package/dist/provider/hooks/mutations/useCreateWalletPerType.d.ts +34 -0
- package/dist/provider/hooks/mutations/useCreateWalletPerType.js +39 -0
- package/dist/provider/hooks/mutations/useEnable2fa.d.ts +34 -0
- package/dist/provider/hooks/mutations/useEnable2fa.js +39 -0
- package/dist/provider/hooks/mutations/useExportPrivateKey.d.ts +39 -0
- package/dist/provider/hooks/mutations/useExportPrivateKey.js +63 -0
- package/dist/provider/hooks/mutations/useHasPregenWallet.d.ts +34 -0
- package/dist/provider/hooks/mutations/useHasPregenWallet.js +39 -0
- package/dist/provider/hooks/mutations/useIssueJwt.d.ts +34 -0
- package/dist/provider/hooks/mutations/useIssueJwt.js +39 -0
- package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +33 -0
- package/dist/provider/hooks/mutations/useKeepSessionAlive.js +39 -0
- package/dist/provider/hooks/mutations/useLoginExternalWallet.d.ts +34 -0
- package/dist/provider/hooks/mutations/useLoginExternalWallet.js +42 -0
- package/dist/provider/hooks/mutations/useLogout.d.ts +34 -0
- package/dist/provider/hooks/mutations/useLogout.js +39 -0
- package/dist/provider/hooks/mutations/useResendVerificationCode.d.ts +34 -0
- package/dist/provider/hooks/mutations/useResendVerificationCode.js +42 -0
- package/dist/provider/hooks/mutations/useSetup2fa.d.ts +34 -0
- package/dist/provider/hooks/mutations/useSetup2fa.js +39 -0
- package/dist/provider/hooks/mutations/useSignMessage.d.ts +34 -0
- package/dist/provider/hooks/mutations/useSignMessage.js +39 -0
- package/dist/provider/hooks/mutations/useSignTransaction.d.ts +34 -0
- package/dist/provider/hooks/mutations/useSignTransaction.js +42 -0
- package/dist/provider/hooks/mutations/useSignUpOrLogIn.d.ts +34 -0
- package/dist/provider/hooks/mutations/useSignUpOrLogIn.js +42 -0
- package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.d.ts +34 -0
- package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.js +42 -0
- package/dist/provider/hooks/mutations/useVerify2fa.d.ts +34 -0
- package/dist/provider/hooks/mutations/useVerify2fa.js +39 -0
- package/dist/provider/hooks/mutations/useVerifyExternalWallet.d.ts +34 -0
- package/dist/provider/hooks/mutations/useVerifyExternalWallet.js +42 -0
- package/dist/provider/hooks/mutations/useVerifyFarcaster.js +43 -0
- package/dist/provider/hooks/mutations/useVerifyNewAccount.d.ts +34 -0
- package/dist/provider/hooks/mutations/useVerifyNewAccount.js +42 -0
- package/dist/provider/hooks/mutations/useVerifyOAuth.js +40 -0
- package/dist/provider/hooks/mutations/useVerifyTelegram.js +40 -0
- package/dist/provider/hooks/mutations/useWaitForLogin.d.ts +34 -0
- package/dist/provider/hooks/mutations/useWaitForLogin.js +42 -0
- package/dist/provider/hooks/mutations/useWaitForSignup.d.ts +34 -0
- package/dist/provider/hooks/mutations/useWaitForSignup.js +39 -0
- package/dist/provider/hooks/mutations/useWaitForWalletCreation.d.ts +34 -0
- package/dist/provider/hooks/mutations/useWaitForWalletCreation.js +39 -0
- package/dist/provider/hooks/queries/createAccountHook.d.ts +49 -0
- package/dist/provider/hooks/queries/createAccountHook.js +132 -0
- package/dist/provider/hooks/queries/index.d.ts +5 -0
- package/dist/provider/hooks/queries/index.js +20 -0
- package/dist/provider/hooks/queries/useAccount.d.ts +65 -0
- package/dist/provider/hooks/queries/useAccount.js +65 -0
- package/dist/provider/hooks/queries/useIsFullyLoggedIn.d.ts +7 -0
- package/dist/provider/hooks/queries/useIsFullyLoggedIn.js +49 -0
- package/dist/provider/hooks/queries/useParaStatus.d.ts +15 -0
- package/dist/provider/hooks/queries/useParaStatus.js +32 -0
- package/dist/provider/hooks/queries/useWallet.js +43 -0
- package/dist/provider/hooks/utils/index.d.ts +2 -0
- package/dist/provider/hooks/utils/index.js +6 -0
- package/dist/provider/hooks/utils/useClient.d.ts +7 -0
- package/dist/provider/hooks/utils/useClient.js +8 -0
- package/dist/provider/hooks/utils/useCoreWalletState.d.ts +17 -0
- package/dist/provider/hooks/utils/useCoreWalletState.js +47 -0
- package/dist/provider/index.d.ts +5 -0
- package/dist/provider/index.js +11 -0
- package/dist/provider/stores/CoreStoreContext.d.ts +13 -0
- package/dist/provider/stores/CoreStoreContext.js +14 -0
- package/dist/provider/stores/createCoreStore.d.ts +26 -0
- package/dist/provider/stores/createCoreStore.js +61 -0
- package/dist/provider/stores/index.d.ts +4 -0
- package/dist/provider/stores/index.js +9 -0
- package/dist/provider/stores/slices/client.d.ts +3 -0
- package/dist/provider/stores/slices/client.js +7 -0
- package/dist/provider/stores/slices/config.d.ts +3 -0
- package/dist/provider/stores/slices/config.js +9 -0
- package/dist/provider/stores/slices/index.d.ts +4 -0
- package/dist/provider/stores/slices/index.js +10 -0
- package/dist/provider/stores/slices/paraState.d.ts +3 -0
- package/dist/provider/stores/slices/paraState.js +7 -0
- package/dist/provider/stores/slices/wallet.d.ts +3 -0
- package/dist/provider/stores/slices/wallet.js +11 -0
- package/dist/provider/stores/types.d.ts +28 -0
- package/dist/provider/stores/types.js +0 -0
- package/dist/provider/utils/renameMutations.d.ts +11 -0
- package/dist/provider/utils/renameMutations.js +39 -0
- package/dist/queries.d.ts +2 -0
- package/dist/queries.js +6 -0
- package/package.json +73 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __async = (__this, __arguments, generator) => {
|
|
2
|
+
return new Promise((resolve, reject) => {
|
|
3
|
+
var fulfilled = (value) => {
|
|
4
|
+
try {
|
|
5
|
+
step(generator.next(value));
|
|
6
|
+
} catch (e) {
|
|
7
|
+
reject(e);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
var rejected = (value) => {
|
|
11
|
+
try {
|
|
12
|
+
step(generator.throw(value));
|
|
13
|
+
} catch (e) {
|
|
14
|
+
reject(e);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
18
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
import { useMutation } from "@tanstack/react-query";
|
|
22
|
+
import { useClient } from "../utils/index.js";
|
|
23
|
+
import { renameMutations } from "../../utils/renameMutations.js";
|
|
24
|
+
import { signTransaction } from "../../actions/index.js";
|
|
25
|
+
const SIGN_TRANSACTION_KEY = "SIGN_TRANSACTION";
|
|
26
|
+
const useSignTransaction = () => {
|
|
27
|
+
const para = useClient();
|
|
28
|
+
const mutation = useMutation({
|
|
29
|
+
mutationKey: [SIGN_TRANSACTION_KEY],
|
|
30
|
+
mutationFn: (args) => __async(void 0, null, function* () {
|
|
31
|
+
return signTransaction(para, args);
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
return renameMutations(
|
|
35
|
+
mutation,
|
|
36
|
+
"signTransaction"
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
SIGN_TRANSACTION_KEY,
|
|
41
|
+
useSignTransaction
|
|
42
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { SignUpOrLogInParams, SignUpOrLogInResponse } from '@getpara/core-sdk';
|
|
2
|
+
export declare const SIGN_UP_LOG_IN_KEY = "SIGN_UP_LOG_IN";
|
|
3
|
+
/**
|
|
4
|
+
* React hook for the `signUpOrLogIn` mutation.
|
|
5
|
+
*
|
|
6
|
+
* Returns a mutation result object with all standard fields from `useMutation`, except:
|
|
7
|
+
* - `mutate` and `mutateAsync` are replaced by:
|
|
8
|
+
* - `signUpOrLogIn`: function to trigger the mutation (same as `mutate`)
|
|
9
|
+
* - `signUpOrLogInAsync`: async function to trigger the mutation (same as `mutateAsync`)
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const { signUpOrLogIn, signUpOrLogInAsync } = useSignUpOrLogIn();
|
|
13
|
+
* signUpOrLogIn({ ...params });
|
|
14
|
+
* // or
|
|
15
|
+
* await signUpOrLogInAsync({ ...params });
|
|
16
|
+
*/
|
|
17
|
+
export declare const useSignUpOrLogIn: () => {
|
|
18
|
+
error: Error;
|
|
19
|
+
isSuccess: boolean;
|
|
20
|
+
data: SignUpOrLogInResponse;
|
|
21
|
+
variables: SignUpOrLogInParams;
|
|
22
|
+
isError: boolean;
|
|
23
|
+
isIdle: boolean;
|
|
24
|
+
isPending: boolean;
|
|
25
|
+
status: "error" | "idle" | "pending" | "success";
|
|
26
|
+
reset: () => void;
|
|
27
|
+
context: unknown;
|
|
28
|
+
failureCount: number;
|
|
29
|
+
failureReason: Error;
|
|
30
|
+
isPaused: boolean;
|
|
31
|
+
submittedAt: number;
|
|
32
|
+
signUpOrLogIn: import("@tanstack/react-query").UseMutateFunction<SignUpOrLogInResponse, Error, SignUpOrLogInParams, unknown>;
|
|
33
|
+
signUpOrLogInAsync: import("@tanstack/react-query").UseMutateAsyncFunction<SignUpOrLogInResponse, Error, SignUpOrLogInParams, unknown>;
|
|
34
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __async = (__this, __arguments, generator) => {
|
|
2
|
+
return new Promise((resolve, reject) => {
|
|
3
|
+
var fulfilled = (value) => {
|
|
4
|
+
try {
|
|
5
|
+
step(generator.next(value));
|
|
6
|
+
} catch (e) {
|
|
7
|
+
reject(e);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
var rejected = (value) => {
|
|
11
|
+
try {
|
|
12
|
+
step(generator.throw(value));
|
|
13
|
+
} catch (e) {
|
|
14
|
+
reject(e);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
18
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
import { useMutation } from "@tanstack/react-query";
|
|
22
|
+
import { useClient } from "../utils/index.js";
|
|
23
|
+
import { renameMutations } from "../../utils/renameMutations.js";
|
|
24
|
+
import { signUpOrLogIn } from "../../actions/index.js";
|
|
25
|
+
const SIGN_UP_LOG_IN_KEY = "SIGN_UP_LOG_IN";
|
|
26
|
+
const useSignUpOrLogIn = () => {
|
|
27
|
+
const para = useClient();
|
|
28
|
+
const mutation = useMutation({
|
|
29
|
+
mutationKey: [SIGN_UP_LOG_IN_KEY],
|
|
30
|
+
mutationFn: (args) => __async(void 0, null, function* () {
|
|
31
|
+
return signUpOrLogIn(para, args);
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
return renameMutations(
|
|
35
|
+
mutation,
|
|
36
|
+
"signUpOrLogIn"
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
SIGN_UP_LOG_IN_KEY,
|
|
41
|
+
useSignUpOrLogIn
|
|
42
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { UpdatePregenWalletIdentifierParams } from '@getpara/core-sdk';
|
|
2
|
+
export declare const UPDATE_PREGEN_WALLET_IDENTIFIER_KEY = "UPDATE_PREGEN_WALLET_IDENTIFIER";
|
|
3
|
+
/**
|
|
4
|
+
* React hook for the `updatePregenWalletIdentifier` mutation.
|
|
5
|
+
*
|
|
6
|
+
* Returns a mutation result object with all standard fields from `useMutation`, except:
|
|
7
|
+
* - `mutate` and `mutateAsync` are replaced by:
|
|
8
|
+
* - `updatePregenWalletIdentifier`: function to trigger the mutation (same as `mutate`)
|
|
9
|
+
* - `updatePregenWalletIdentifierAsync`: async function to trigger the mutation (same as `mutateAsync`)
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const { updatePregenWalletIdentifier, updatePregenWalletIdentifierAsync } = useUpdatePregenWalletIdentifier();
|
|
13
|
+
* updatePregenWalletIdentifier({ ...params });
|
|
14
|
+
* // or
|
|
15
|
+
* await updatePregenWalletIdentifierAsync({ ...params });
|
|
16
|
+
*/
|
|
17
|
+
export declare const useUpdatePregenWalletIdentifier: () => {
|
|
18
|
+
error: Error;
|
|
19
|
+
isSuccess: boolean;
|
|
20
|
+
data: void;
|
|
21
|
+
variables: UpdatePregenWalletIdentifierParams;
|
|
22
|
+
isError: boolean;
|
|
23
|
+
isIdle: boolean;
|
|
24
|
+
isPending: boolean;
|
|
25
|
+
status: "error" | "idle" | "pending" | "success";
|
|
26
|
+
reset: () => void;
|
|
27
|
+
context: unknown;
|
|
28
|
+
failureCount: number;
|
|
29
|
+
failureReason: Error;
|
|
30
|
+
isPaused: boolean;
|
|
31
|
+
submittedAt: number;
|
|
32
|
+
updatePregenWalletIdentifier: import("@tanstack/react-query").UseMutateFunction<void, Error, UpdatePregenWalletIdentifierParams, unknown>;
|
|
33
|
+
updatePregenWalletIdentifierAsync: import("@tanstack/react-query").UseMutateAsyncFunction<void, Error, UpdatePregenWalletIdentifierParams, unknown>;
|
|
34
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __async = (__this, __arguments, generator) => {
|
|
2
|
+
return new Promise((resolve, reject) => {
|
|
3
|
+
var fulfilled = (value) => {
|
|
4
|
+
try {
|
|
5
|
+
step(generator.next(value));
|
|
6
|
+
} catch (e) {
|
|
7
|
+
reject(e);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
var rejected = (value) => {
|
|
11
|
+
try {
|
|
12
|
+
step(generator.throw(value));
|
|
13
|
+
} catch (e) {
|
|
14
|
+
reject(e);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
18
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
import { useMutation } from "@tanstack/react-query";
|
|
22
|
+
import { useClient } from "../utils/index.js";
|
|
23
|
+
import { renameMutations } from "../../utils/renameMutations.js";
|
|
24
|
+
import { updatePregenWalletIdentifier } from "../../actions/index.js";
|
|
25
|
+
const UPDATE_PREGEN_WALLET_IDENTIFIER_KEY = "UPDATE_PREGEN_WALLET_IDENTIFIER";
|
|
26
|
+
const useUpdatePregenWalletIdentifier = () => {
|
|
27
|
+
const para = useClient();
|
|
28
|
+
const mutation = useMutation({
|
|
29
|
+
mutationKey: [UPDATE_PREGEN_WALLET_IDENTIFIER_KEY],
|
|
30
|
+
mutationFn: (args) => __async(void 0, null, function* () {
|
|
31
|
+
return updatePregenWalletIdentifier(para, args);
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
return renameMutations(
|
|
35
|
+
mutation,
|
|
36
|
+
"updatePregenWalletIdentifier"
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
UPDATE_PREGEN_WALLET_IDENTIFIER_KEY,
|
|
41
|
+
useUpdatePregenWalletIdentifier
|
|
42
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Verify2faParams, Verify2faResponse } from '@getpara/core-sdk';
|
|
2
|
+
export declare const VERIFY_2FA_KEY = "VERIFY_2FA";
|
|
3
|
+
/**
|
|
4
|
+
* React hook for the `verify2fa` mutation.
|
|
5
|
+
*
|
|
6
|
+
* Returns a mutation result object with all standard fields from `useMutation`, except:
|
|
7
|
+
* - `mutate` and `mutateAsync` are replaced by:
|
|
8
|
+
* - `verify2fa`: function to trigger the mutation (same as `mutate`)
|
|
9
|
+
* - `verify2faAsync`: async function to trigger the mutation (same as `mutateAsync`)
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const { verify2fa, verify2faAsync } = useVerify2fa();
|
|
13
|
+
* verify2fa({ ...params });
|
|
14
|
+
* // or
|
|
15
|
+
* await verify2faAsync({ ...params });
|
|
16
|
+
*/
|
|
17
|
+
export declare const useVerify2fa: () => {
|
|
18
|
+
error: Error;
|
|
19
|
+
isSuccess: boolean;
|
|
20
|
+
data: Verify2faResponse;
|
|
21
|
+
variables: Verify2faParams;
|
|
22
|
+
isError: boolean;
|
|
23
|
+
isIdle: boolean;
|
|
24
|
+
isPending: boolean;
|
|
25
|
+
status: "error" | "idle" | "pending" | "success";
|
|
26
|
+
reset: () => void;
|
|
27
|
+
context: unknown;
|
|
28
|
+
failureCount: number;
|
|
29
|
+
failureReason: Error;
|
|
30
|
+
isPaused: boolean;
|
|
31
|
+
submittedAt: number;
|
|
32
|
+
verify2fa: import("@tanstack/react-query").UseMutateFunction<Verify2faResponse, Error, Verify2faParams, unknown>;
|
|
33
|
+
verify2faAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Verify2faResponse, Error, Verify2faParams, unknown>;
|
|
34
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __async = (__this, __arguments, generator) => {
|
|
2
|
+
return new Promise((resolve, reject) => {
|
|
3
|
+
var fulfilled = (value) => {
|
|
4
|
+
try {
|
|
5
|
+
step(generator.next(value));
|
|
6
|
+
} catch (e) {
|
|
7
|
+
reject(e);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
var rejected = (value) => {
|
|
11
|
+
try {
|
|
12
|
+
step(generator.throw(value));
|
|
13
|
+
} catch (e) {
|
|
14
|
+
reject(e);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
18
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
import { useMutation } from "@tanstack/react-query";
|
|
22
|
+
import { useClient } from "../utils/index.js";
|
|
23
|
+
import { renameMutations } from "../../utils/renameMutations.js";
|
|
24
|
+
import { verify2fa } from "../../actions/index.js";
|
|
25
|
+
const VERIFY_2FA_KEY = "VERIFY_2FA";
|
|
26
|
+
const useVerify2fa = () => {
|
|
27
|
+
const para = useClient();
|
|
28
|
+
const mutation = useMutation({
|
|
29
|
+
mutationKey: [VERIFY_2FA_KEY],
|
|
30
|
+
mutationFn: (args) => __async(void 0, null, function* () {
|
|
31
|
+
return verify2fa(para, args);
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
return renameMutations(mutation, "verify2fa");
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
VERIFY_2FA_KEY,
|
|
38
|
+
useVerify2fa
|
|
39
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { VerifyExternalWalletParams, VerifyExternalWalletResponse } from '@getpara/core-sdk';
|
|
2
|
+
export declare const VERIFY_EXTERNAL_WALLET_KEY = "VERIFY_EXTERNAL_WALLET";
|
|
3
|
+
/**
|
|
4
|
+
* React hook for the `verifyExternalWallet` mutation.
|
|
5
|
+
*
|
|
6
|
+
* Returns a mutation result object with all standard fields from `useMutation`, except:
|
|
7
|
+
* - `mutate` and `mutateAsync` are replaced by:
|
|
8
|
+
* - `verifyExternalWallet`: function to trigger the mutation (same as `mutate`)
|
|
9
|
+
* - `verifyExternalWalletAsync`: async function to trigger the mutation (same as `mutateAsync`)
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const { verifyExternalWallet, verifyExternalWalletAsync } = useVerifyExternalWallet();
|
|
13
|
+
* verifyExternalWallet({ ...params });
|
|
14
|
+
* // or
|
|
15
|
+
* await verifyExternalWalletAsync({ ...params });
|
|
16
|
+
*/
|
|
17
|
+
export declare const useVerifyExternalWallet: () => {
|
|
18
|
+
error: Error;
|
|
19
|
+
isSuccess: boolean;
|
|
20
|
+
data: VerifyExternalWalletResponse;
|
|
21
|
+
variables: VerifyExternalWalletParams;
|
|
22
|
+
isError: boolean;
|
|
23
|
+
isIdle: boolean;
|
|
24
|
+
isPending: boolean;
|
|
25
|
+
status: "error" | "idle" | "pending" | "success";
|
|
26
|
+
reset: () => void;
|
|
27
|
+
context: unknown;
|
|
28
|
+
failureCount: number;
|
|
29
|
+
failureReason: Error;
|
|
30
|
+
isPaused: boolean;
|
|
31
|
+
submittedAt: number;
|
|
32
|
+
verifyExternalWallet: import("@tanstack/react-query").UseMutateFunction<VerifyExternalWalletResponse, Error, VerifyExternalWalletParams, unknown>;
|
|
33
|
+
verifyExternalWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<VerifyExternalWalletResponse, Error, VerifyExternalWalletParams, unknown>;
|
|
34
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __async = (__this, __arguments, generator) => {
|
|
2
|
+
return new Promise((resolve, reject) => {
|
|
3
|
+
var fulfilled = (value) => {
|
|
4
|
+
try {
|
|
5
|
+
step(generator.next(value));
|
|
6
|
+
} catch (e) {
|
|
7
|
+
reject(e);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
var rejected = (value) => {
|
|
11
|
+
try {
|
|
12
|
+
step(generator.throw(value));
|
|
13
|
+
} catch (e) {
|
|
14
|
+
reject(e);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
18
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
import { useMutation } from "@tanstack/react-query";
|
|
22
|
+
import { useClient } from "../utils/index.js";
|
|
23
|
+
import { renameMutations } from "../../utils/renameMutations.js";
|
|
24
|
+
import { verifyExternalWallet } from "../../actions/index.js";
|
|
25
|
+
const VERIFY_EXTERNAL_WALLET_KEY = "VERIFY_EXTERNAL_WALLET";
|
|
26
|
+
const useVerifyExternalWallet = () => {
|
|
27
|
+
const para = useClient();
|
|
28
|
+
const mutation = useMutation({
|
|
29
|
+
mutationKey: [VERIFY_EXTERNAL_WALLET_KEY],
|
|
30
|
+
mutationFn: (args) => __async(void 0, null, function* () {
|
|
31
|
+
return verifyExternalWallet(para, args);
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
return renameMutations(
|
|
35
|
+
mutation,
|
|
36
|
+
"verifyExternalWallet"
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
VERIFY_EXTERNAL_WALLET_KEY,
|
|
41
|
+
useVerifyExternalWallet
|
|
42
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var __async = (__this, __arguments, generator) => {
|
|
2
|
+
return new Promise((resolve, reject) => {
|
|
3
|
+
var fulfilled = (value) => {
|
|
4
|
+
try {
|
|
5
|
+
step(generator.next(value));
|
|
6
|
+
} catch (e) {
|
|
7
|
+
reject(e);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
var rejected = (value) => {
|
|
11
|
+
try {
|
|
12
|
+
step(generator.throw(value));
|
|
13
|
+
} catch (e) {
|
|
14
|
+
reject(e);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
18
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
import { useMutation } from "@tanstack/react-query";
|
|
22
|
+
import { useClient } from "../utils/index.js";
|
|
23
|
+
import { renameMutations } from "../../utils/renameMutations.js";
|
|
24
|
+
import { verifyFarcaster } from "../../actions/index.js";
|
|
25
|
+
const VERIFY_FARCASTER_KEY = "VERIFY_FARCASTER";
|
|
26
|
+
const useVerifyFarcaster = () => {
|
|
27
|
+
const para = useClient();
|
|
28
|
+
const mutation = useMutation({
|
|
29
|
+
mutationKey: [VERIFY_FARCASTER_KEY],
|
|
30
|
+
mutationFn: (..._0) => __async(void 0, [..._0], function* (args = {}) {
|
|
31
|
+
const result = yield verifyFarcaster(para, args);
|
|
32
|
+
return result;
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
return renameMutations(
|
|
36
|
+
mutation,
|
|
37
|
+
"verifyFarcaster"
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
VERIFY_FARCASTER_KEY,
|
|
42
|
+
useVerifyFarcaster
|
|
43
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { VerifyNewAccountParams } from '@getpara/core-sdk';
|
|
2
|
+
export declare const VERIFY_NEW_ACCOUNT_KEY = "VERIFY_NEW_ACCOUNT";
|
|
3
|
+
/**
|
|
4
|
+
* React hook for the `verifyNewAccount` mutation.
|
|
5
|
+
*
|
|
6
|
+
* Returns a mutation result object with all standard fields from `useMutation`, except:
|
|
7
|
+
* - `mutate` and `mutateAsync` are replaced by:
|
|
8
|
+
* - `verifyNewAccount`: function to trigger the mutation (same as `mutate`)
|
|
9
|
+
* - `verifyNewAccountAsync`: async function to trigger the mutation (same as `mutateAsync`)
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const { verifyNewAccount, verifyNewAccountAsync } = useVerifyNewAccount();
|
|
13
|
+
* verifyNewAccount({ ...params });
|
|
14
|
+
* // or
|
|
15
|
+
* await verifyNewAccountAsync({ ...params });
|
|
16
|
+
*/
|
|
17
|
+
export declare const useVerifyNewAccount: () => {
|
|
18
|
+
error: Error;
|
|
19
|
+
isSuccess: boolean;
|
|
20
|
+
data: import("@getpara/core-sdk").AuthStateSignup;
|
|
21
|
+
variables: VerifyNewAccountParams;
|
|
22
|
+
isError: boolean;
|
|
23
|
+
isIdle: boolean;
|
|
24
|
+
isPending: boolean;
|
|
25
|
+
status: "error" | "idle" | "pending" | "success";
|
|
26
|
+
reset: () => void;
|
|
27
|
+
context: unknown;
|
|
28
|
+
failureCount: number;
|
|
29
|
+
failureReason: Error;
|
|
30
|
+
isPaused: boolean;
|
|
31
|
+
submittedAt: number;
|
|
32
|
+
verifyNewAccount: import("@tanstack/react-query").UseMutateFunction<import("@getpara/core-sdk").AuthStateSignup, Error, VerifyNewAccountParams, unknown>;
|
|
33
|
+
verifyNewAccountAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("@getpara/core-sdk").AuthStateSignup, Error, VerifyNewAccountParams, unknown>;
|
|
34
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __async = (__this, __arguments, generator) => {
|
|
2
|
+
return new Promise((resolve, reject) => {
|
|
3
|
+
var fulfilled = (value) => {
|
|
4
|
+
try {
|
|
5
|
+
step(generator.next(value));
|
|
6
|
+
} catch (e) {
|
|
7
|
+
reject(e);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
var rejected = (value) => {
|
|
11
|
+
try {
|
|
12
|
+
step(generator.throw(value));
|
|
13
|
+
} catch (e) {
|
|
14
|
+
reject(e);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
18
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
import { useMutation } from "@tanstack/react-query";
|
|
22
|
+
import { useClient } from "../utils/index.js";
|
|
23
|
+
import { renameMutations } from "../../utils/renameMutations.js";
|
|
24
|
+
import { verifyNewAccount } from "../../actions/index.js";
|
|
25
|
+
const VERIFY_NEW_ACCOUNT_KEY = "VERIFY_NEW_ACCOUNT";
|
|
26
|
+
const useVerifyNewAccount = () => {
|
|
27
|
+
const para = useClient();
|
|
28
|
+
const mutation = useMutation({
|
|
29
|
+
mutationKey: [VERIFY_NEW_ACCOUNT_KEY],
|
|
30
|
+
mutationFn: (args) => __async(void 0, null, function* () {
|
|
31
|
+
return verifyNewAccount(para, args);
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
return renameMutations(
|
|
35
|
+
mutation,
|
|
36
|
+
"verifyNewAccount"
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
VERIFY_NEW_ACCOUNT_KEY,
|
|
41
|
+
useVerifyNewAccount
|
|
42
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var __async = (__this, __arguments, generator) => {
|
|
2
|
+
return new Promise((resolve, reject) => {
|
|
3
|
+
var fulfilled = (value) => {
|
|
4
|
+
try {
|
|
5
|
+
step(generator.next(value));
|
|
6
|
+
} catch (e) {
|
|
7
|
+
reject(e);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
var rejected = (value) => {
|
|
11
|
+
try {
|
|
12
|
+
step(generator.throw(value));
|
|
13
|
+
} catch (e) {
|
|
14
|
+
reject(e);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
18
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
import { useMutation } from "@tanstack/react-query";
|
|
22
|
+
import { useClient } from "../utils/index.js";
|
|
23
|
+
import { renameMutations } from "../../utils/renameMutations.js";
|
|
24
|
+
import { verifyOAuth } from "../../actions/index.js";
|
|
25
|
+
const VERIFY_OAUTH_KEY = "VERIFY_OAUTH";
|
|
26
|
+
const useVerifyOAuth = () => {
|
|
27
|
+
const para = useClient();
|
|
28
|
+
const mutation = useMutation({
|
|
29
|
+
mutationKey: [VERIFY_OAUTH_KEY],
|
|
30
|
+
mutationFn: (args) => __async(void 0, null, function* () {
|
|
31
|
+
const result = yield verifyOAuth(para, args);
|
|
32
|
+
return result;
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
return renameMutations(mutation, "verifyOAuth");
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
VERIFY_OAUTH_KEY,
|
|
39
|
+
useVerifyOAuth
|
|
40
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var __async = (__this, __arguments, generator) => {
|
|
2
|
+
return new Promise((resolve, reject) => {
|
|
3
|
+
var fulfilled = (value) => {
|
|
4
|
+
try {
|
|
5
|
+
step(generator.next(value));
|
|
6
|
+
} catch (e) {
|
|
7
|
+
reject(e);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
var rejected = (value) => {
|
|
11
|
+
try {
|
|
12
|
+
step(generator.throw(value));
|
|
13
|
+
} catch (e) {
|
|
14
|
+
reject(e);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
18
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
import { useMutation } from "@tanstack/react-query";
|
|
22
|
+
import { useClient } from "../utils/index.js";
|
|
23
|
+
import { renameMutations } from "../../utils/renameMutations.js";
|
|
24
|
+
import { verifyTelegram } from "../../actions/index.js";
|
|
25
|
+
const VERIFY_TELEGRAM_KEY = "VERIFY_TELEGRAM";
|
|
26
|
+
const useVerifyTelegram = () => {
|
|
27
|
+
const para = useClient();
|
|
28
|
+
const mutation = useMutation({
|
|
29
|
+
mutationKey: [VERIFY_TELEGRAM_KEY],
|
|
30
|
+
mutationFn: (args) => __async(void 0, null, function* () {
|
|
31
|
+
const result = yield verifyTelegram(para, args);
|
|
32
|
+
return result;
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
return renameMutations(mutation, "verifyTelegram");
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
VERIFY_TELEGRAM_KEY,
|
|
39
|
+
useVerifyTelegram
|
|
40
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { WaitForLoginParams, WaitForLoginResponse } from '@getpara/core-sdk';
|
|
2
|
+
export declare const WAIT_FOR_LOG_IN_KEY = "WAIT_FOR_LOG_IN";
|
|
3
|
+
/**
|
|
4
|
+
* React hook for the `waitForLogin` mutation.
|
|
5
|
+
*
|
|
6
|
+
* Returns a mutation result object with all standard fields from `useMutation`, except:
|
|
7
|
+
* - `mutate` and `mutateAsync` are replaced by:
|
|
8
|
+
* - `waitForLogin`: function to trigger the mutation (same as `mutate`)
|
|
9
|
+
* - `waitForLoginAsync`: async function to trigger the mutation (same as `mutateAsync`)
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const { waitForLogin, waitForLoginAsync } = useWaitForLogin();
|
|
13
|
+
* waitForLogin({ ...params });
|
|
14
|
+
* // or
|
|
15
|
+
* await waitForLoginAsync({ ...params });
|
|
16
|
+
*/
|
|
17
|
+
export declare const useWaitForLogin: () => {
|
|
18
|
+
error: Error;
|
|
19
|
+
isSuccess: boolean;
|
|
20
|
+
data: WaitForLoginResponse;
|
|
21
|
+
variables: void | WaitForLoginParams;
|
|
22
|
+
isError: boolean;
|
|
23
|
+
isIdle: boolean;
|
|
24
|
+
isPending: boolean;
|
|
25
|
+
status: "error" | "idle" | "pending" | "success";
|
|
26
|
+
reset: () => void;
|
|
27
|
+
context: unknown;
|
|
28
|
+
failureCount: number;
|
|
29
|
+
failureReason: Error;
|
|
30
|
+
isPaused: boolean;
|
|
31
|
+
submittedAt: number;
|
|
32
|
+
waitForLogin: import("@tanstack/react-query").UseMutateFunction<WaitForLoginResponse, Error, void | WaitForLoginParams, unknown>;
|
|
33
|
+
waitForLoginAsync: import("@tanstack/react-query").UseMutateAsyncFunction<WaitForLoginResponse, Error, void | WaitForLoginParams, unknown>;
|
|
34
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __async = (__this, __arguments, generator) => {
|
|
2
|
+
return new Promise((resolve, reject) => {
|
|
3
|
+
var fulfilled = (value) => {
|
|
4
|
+
try {
|
|
5
|
+
step(generator.next(value));
|
|
6
|
+
} catch (e) {
|
|
7
|
+
reject(e);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
var rejected = (value) => {
|
|
11
|
+
try {
|
|
12
|
+
step(generator.throw(value));
|
|
13
|
+
} catch (e) {
|
|
14
|
+
reject(e);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
18
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
import { useMutation } from "@tanstack/react-query";
|
|
22
|
+
import { useClient } from "../utils/index.js";
|
|
23
|
+
import { renameMutations } from "../../utils/renameMutations.js";
|
|
24
|
+
import { waitForLogin } from "../../actions/index.js";
|
|
25
|
+
const WAIT_FOR_LOG_IN_KEY = "WAIT_FOR_LOG_IN";
|
|
26
|
+
const useWaitForLogin = () => {
|
|
27
|
+
const para = useClient();
|
|
28
|
+
const mutation = useMutation({
|
|
29
|
+
mutationKey: [WAIT_FOR_LOG_IN_KEY],
|
|
30
|
+
mutationFn: (..._0) => __async(void 0, [..._0], function* (args = {}) {
|
|
31
|
+
return waitForLogin(para, args);
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
return renameMutations(
|
|
35
|
+
mutation,
|
|
36
|
+
"waitForLogin"
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
WAIT_FOR_LOG_IN_KEY,
|
|
41
|
+
useWaitForLogin
|
|
42
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { WaitForSignupParams } from '@getpara/core-sdk';
|
|
2
|
+
export declare const WAIT_FOR_SIGN_UP_KEY = "WAIT_FOR_SIGN_UP";
|
|
3
|
+
/**
|
|
4
|
+
* React hook for the `waitForSignup` mutation.
|
|
5
|
+
*
|
|
6
|
+
* Returns a mutation result object with all standard fields from `useMutation`, except:
|
|
7
|
+
* - `mutate` and `mutateAsync` are replaced by:
|
|
8
|
+
* - `waitForSignup`: function to trigger the mutation (same as `mutate`)
|
|
9
|
+
* - `waitForSignupAsync`: async function to trigger the mutation (same as `mutateAsync`)
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const { waitForSignup, waitForSignupAsync } = useWaitForSignup();
|
|
13
|
+
* waitForSignup({ ...params });
|
|
14
|
+
* // or
|
|
15
|
+
* await waitForSignupAsync({ ...params });
|
|
16
|
+
*/
|
|
17
|
+
export declare const useWaitForSignup: () => {
|
|
18
|
+
error: Error;
|
|
19
|
+
isSuccess: boolean;
|
|
20
|
+
data: true;
|
|
21
|
+
variables: void | WaitForSignupParams;
|
|
22
|
+
isError: boolean;
|
|
23
|
+
isIdle: boolean;
|
|
24
|
+
isPending: boolean;
|
|
25
|
+
status: "error" | "idle" | "pending" | "success";
|
|
26
|
+
reset: () => void;
|
|
27
|
+
context: unknown;
|
|
28
|
+
failureCount: number;
|
|
29
|
+
failureReason: Error;
|
|
30
|
+
isPaused: boolean;
|
|
31
|
+
submittedAt: number;
|
|
32
|
+
waitForSignup: import("@tanstack/react-query").UseMutateFunction<true, Error, void | WaitForSignupParams, unknown>;
|
|
33
|
+
waitForSignupAsync: import("@tanstack/react-query").UseMutateAsyncFunction<true, Error, void | WaitForSignupParams, unknown>;
|
|
34
|
+
};
|