@getpara/react-core 3.19.0 → 3.21.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/chains/evm/ethers/mutations.js +10 -1
- package/dist/chains/evm/ethers/useParaEthersSigner.d.ts +2 -2
- package/dist/chains/evm/ethers/useParaEthersSigner.js +11 -3
- package/dist/chains/evm/viem/isSameEvmAddress.d.ts +1 -0
- package/dist/chains/evm/viem/isSameEvmAddress.js +6 -0
- package/dist/chains/evm/viem/mutations.js +6 -12
- package/dist/chains/evm/viem/useParaViemAccount.js +13 -9
- package/dist/chains/evm/viem/useParaViemClient.d.ts +2 -1
- package/dist/chains/evm/viem/useParaViemClient.js +22 -8
- package/dist/chains/solana/types.d.ts +3 -3
- package/dist/chains/solana/useParaSolanaSigner.js +4 -1
- package/dist/chains/stellar/mutations.js +2 -4
- package/dist/chains/sui/mutations.js +2 -4
- package/dist/chains/sui/suiClientKey.d.ts +2 -0
- package/dist/chains/sui/suiClientKey.js +5 -0
- package/dist/chains/sui/useParaSuiMultiSigSigner.d.ts +5 -3
- package/dist/chains/sui/useParaSuiMultiSigSigner.js +14 -3
- package/dist/chains/sui/useParaSuiSigner.d.ts +10 -3
- package/dist/chains/sui/useParaSuiSigner.js +13 -3
- package/dist/index.d.ts +4 -0
- package/dist/index.js +5 -0
- package/dist/mutations.d.ts +2 -0
- package/dist/mutations.js +3 -0
- package/dist/provider/ParaProviderCore.js +21 -6
- package/dist/provider/actions/getEmbeddedAccount.d.ts +11 -3
- package/dist/provider/actions/getEmbeddedAccount.js +13 -5
- package/dist/provider/actions/getWallet.d.ts +6 -0
- package/dist/provider/actions/index.d.ts +10 -2
- package/dist/provider/actions/index.js +15 -0
- package/dist/provider/actions/permissions.d.ts +35 -0
- package/dist/provider/actions/permissions.js +192 -0
- package/dist/provider/hooks/index.d.ts +0 -1
- package/dist/provider/hooks/index.js +0 -1
- package/dist/provider/hooks/mutations/index.d.ts +2 -0
- package/dist/provider/hooks/mutations/index.js +4 -0
- package/dist/provider/hooks/mutations/useAuthenticateWithCustomOAuth.d.ts +94 -0
- package/dist/provider/hooks/mutations/useAuthenticateWithCustomOAuth.js +39 -0
- package/dist/provider/hooks/permissions/mutations.d.ts +33 -0
- package/dist/provider/hooks/permissions/mutations.js +61 -0
- package/dist/provider/hooks/permissions/queries.d.ts +25 -0
- package/dist/provider/hooks/permissions/queries.js +70 -0
- package/dist/provider/hooks/permissions/utils.d.ts +6 -0
- package/dist/provider/hooks/permissions/utils.js +62 -0
- package/dist/provider/hooks/queries/createAccountHook.d.ts +2 -2
- package/dist/provider/hooks/queries/createAccountHook.js +19 -7
- package/dist/provider/hooks/queries/index.d.ts +1 -0
- package/dist/provider/hooks/queries/index.js +1 -0
- package/dist/provider/hooks/queries/useWallet.d.ts +7 -0
- package/dist/provider/index.d.ts +1 -0
- package/dist/provider/utils/objectIdentity.d.ts +1 -0
- package/dist/provider/utils/objectIdentity.js +15 -0
- package/dist/queries.d.ts +1 -0
- package/dist/queries.js +1 -0
- package/package.json +177 -15
- package/dist/provider/hooks/aa/index.d.ts +0 -12
- package/dist/provider/hooks/aa/index.js +0 -48
|
@@ -43,6 +43,15 @@ const ETHERS_SEND_TRANSACTION_KEY = "PARA_ETHERS_SEND_TRANSACTION";
|
|
|
43
43
|
const ETHERS_SIGN_MESSAGE_KEY = "PARA_ETHERS_SIGN_MESSAGE";
|
|
44
44
|
const ETHERS_SIGN_TYPED_DATA_KEY = "PARA_ETHERS_SIGN_TYPED_DATA";
|
|
45
45
|
const ETHERS_WRITE_CONTRACT_KEY = "PARA_ETHERS_WRITE_CONTRACT";
|
|
46
|
+
function loadEthers() {
|
|
47
|
+
return __async(this, null, function* () {
|
|
48
|
+
try {
|
|
49
|
+
return yield import("ethers");
|
|
50
|
+
} catch (e) {
|
|
51
|
+
throw new Error("[@getpara/react-core] Install ethers to use useParaEthersWriteContract.");
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
46
55
|
const useParaEthersSendTransaction = (signer) => {
|
|
47
56
|
const mutation = renameMutations(
|
|
48
57
|
useMutation({
|
|
@@ -90,7 +99,7 @@ const useParaEthersWriteContract = (signer) => {
|
|
|
90
99
|
mutationFn: (params) => __async(null, null, function* () {
|
|
91
100
|
var _a;
|
|
92
101
|
if (!signer) throw new Error("Ethers signer not ready. Ensure useParaEthersSigner has resolved.");
|
|
93
|
-
const { Contract } = yield
|
|
102
|
+
const { Contract } = yield loadEthers();
|
|
94
103
|
const contract = new Contract(params.address, params.abi, signer);
|
|
95
104
|
const tx = yield contract[params.functionName](...(_a = params.args) != null ? _a : []);
|
|
96
105
|
return tx.wait();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type UseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import type { WalletSelector } from '../../types.js';
|
|
3
3
|
import type { EthersEnhancement } from './types.js';
|
|
4
|
-
import type { AbstractSigner } from '@getpara/ethers-v6-integration';
|
|
4
|
+
import type { AbstractSigner, CreateParaEthersSignerOptions } from '@getpara/ethers-v6-integration';
|
|
5
5
|
export declare const ETHERS_SIGNER_BASE_KEY = "PARA_ETHERS_SIGNER";
|
|
6
6
|
type UseParaEthersSignerParameters = WalletSelector & {
|
|
7
7
|
/** ethers.Provider instance for the target chain. */
|
|
8
|
-
provider?:
|
|
8
|
+
provider?: CreateParaEthersSignerOptions['provider'];
|
|
9
9
|
messageSigningTimeoutMs?: number;
|
|
10
10
|
};
|
|
11
11
|
type EthersSignerData = AbstractSigner | null | undefined;
|
|
@@ -51,7 +51,9 @@ import { useClient } from "../../../provider/hooks/utils/useClient.js";
|
|
|
51
51
|
import { useIsFullyLoggedIn } from "../../../provider/hooks/queries/useIsFullyLoggedIn.js";
|
|
52
52
|
import { useWallet } from "../../../provider/hooks/queries/useWallet.js";
|
|
53
53
|
import { resolveWalletForChain } from "../../resolveWallet.js";
|
|
54
|
+
import { createObjectIdentity } from "../../../provider/utils/objectIdentity.js";
|
|
54
55
|
const ETHERS_SIGNER_BASE_KEY = "PARA_ETHERS_SIGNER";
|
|
56
|
+
const ethersProviderKey = createObjectIdentity();
|
|
55
57
|
function createParaEthersSignerHook(useEnhancer) {
|
|
56
58
|
return function useParaEthersSigner2({
|
|
57
59
|
address,
|
|
@@ -71,7 +73,8 @@ function createParaEthersSignerHook(useEnhancer) {
|
|
|
71
73
|
ETHERS_SIGNER_BASE_KEY,
|
|
72
74
|
isEmbeddedActive,
|
|
73
75
|
(_b = walletId != null ? walletId : address) != null ? _b : (wallet == null ? void 0 : wallet.type) === "EVM" ? wallet == null ? void 0 : wallet.id : null,
|
|
74
|
-
hasExternalSigner ? "external-available" : "embedded-only"
|
|
76
|
+
hasExternalSigner ? "external-available" : "embedded-only",
|
|
77
|
+
ethersProviderKey(provider)
|
|
75
78
|
],
|
|
76
79
|
enabled: !enhancement.isLoading && !!para && (isEmbeddedActive || hasExternalSigner),
|
|
77
80
|
queryFn: () => __async(null, null, function* () {
|
|
@@ -86,7 +89,12 @@ function createParaEthersSignerHook(useEnhancer) {
|
|
|
86
89
|
}
|
|
87
90
|
if ((resolved == null ? void 0 : resolved.id) && !resolved.isExternal) {
|
|
88
91
|
const mod = yield importEthers();
|
|
89
|
-
return mod.createParaEthersSigner({
|
|
92
|
+
return mod.createParaEthersSigner({
|
|
93
|
+
para,
|
|
94
|
+
provider,
|
|
95
|
+
walletId: resolved.id,
|
|
96
|
+
messageSigningTimeoutMs
|
|
97
|
+
});
|
|
90
98
|
}
|
|
91
99
|
}
|
|
92
100
|
if (hasExternalSigner) {
|
|
@@ -103,7 +111,7 @@ function importEthers() {
|
|
|
103
111
|
try {
|
|
104
112
|
return yield import("@getpara/ethers-v6-integration");
|
|
105
113
|
} catch (e) {
|
|
106
|
-
throw new Error("[@getpara/react-core]
|
|
114
|
+
throw new Error("[@getpara/react-core] Install ethers and @getpara/ethers-v6-integration to use useParaEthersSigner.");
|
|
107
115
|
}
|
|
108
116
|
});
|
|
109
117
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isSameEvmAddress(left: string | null | undefined, right: string | null | undefined): boolean;
|
|
@@ -47,10 +47,9 @@ const VIEM_SIGN_TYPED_DATA_KEY = "PARA_VIEM_SIGN_TYPED_DATA";
|
|
|
47
47
|
const VIEM_WRITE_CONTRACT_KEY = "PARA_VIEM_WRITE_CONTRACT";
|
|
48
48
|
const VIEM_DEPLOY_CONTRACT_KEY = "PARA_VIEM_DEPLOY_CONTRACT";
|
|
49
49
|
const useParaViemSendTransaction = (viemClient) => {
|
|
50
|
-
var _a, _b;
|
|
51
50
|
const mutation = renameMutations(
|
|
52
51
|
useMutation({
|
|
53
|
-
mutationKey: [VIEM_SEND_TRANSACTION_KEY
|
|
52
|
+
mutationKey: [VIEM_SEND_TRANSACTION_KEY],
|
|
54
53
|
mutationFn: (params) => __async(null, null, function* () {
|
|
55
54
|
if (!viemClient) throw new Error("Viem client not ready. Ensure useParaViemClient has resolved.");
|
|
56
55
|
return viemClient.sendTransaction(fwd(params));
|
|
@@ -61,10 +60,9 @@ const useParaViemSendTransaction = (viemClient) => {
|
|
|
61
60
|
return __spreadProps(__spreadValues({}, mutation), { isPending: !viemClient || mutation.isPending });
|
|
62
61
|
};
|
|
63
62
|
const useParaViemSignTransaction = (viemClient) => {
|
|
64
|
-
var _a, _b;
|
|
65
63
|
const mutation = renameMutations(
|
|
66
64
|
useMutation({
|
|
67
|
-
mutationKey: [VIEM_SIGN_TRANSACTION_KEY
|
|
65
|
+
mutationKey: [VIEM_SIGN_TRANSACTION_KEY],
|
|
68
66
|
mutationFn: (params) => __async(null, null, function* () {
|
|
69
67
|
if (!viemClient) throw new Error("Viem client not ready. Ensure useParaViemClient has resolved.");
|
|
70
68
|
return viemClient.signTransaction(fwd(params));
|
|
@@ -75,10 +73,9 @@ const useParaViemSignTransaction = (viemClient) => {
|
|
|
75
73
|
return __spreadProps(__spreadValues({}, mutation), { isPending: !viemClient || mutation.isPending });
|
|
76
74
|
};
|
|
77
75
|
const useParaViemSignMessage = (viemClient) => {
|
|
78
|
-
var _a, _b;
|
|
79
76
|
const mutation = renameMutations(
|
|
80
77
|
useMutation({
|
|
81
|
-
mutationKey: [VIEM_SIGN_MESSAGE_KEY
|
|
78
|
+
mutationKey: [VIEM_SIGN_MESSAGE_KEY],
|
|
82
79
|
mutationFn: (params) => __async(null, null, function* () {
|
|
83
80
|
if (!viemClient) throw new Error("Viem client not ready. Ensure useParaViemClient has resolved.");
|
|
84
81
|
return viemClient.signMessage(fwd(params));
|
|
@@ -89,10 +86,9 @@ const useParaViemSignMessage = (viemClient) => {
|
|
|
89
86
|
return __spreadProps(__spreadValues({}, mutation), { isPending: !viemClient || mutation.isPending });
|
|
90
87
|
};
|
|
91
88
|
const useParaViemSignTypedData = (viemClient) => {
|
|
92
|
-
var _a, _b;
|
|
93
89
|
const mutation = renameMutations(
|
|
94
90
|
useMutation({
|
|
95
|
-
mutationKey: [VIEM_SIGN_TYPED_DATA_KEY
|
|
91
|
+
mutationKey: [VIEM_SIGN_TYPED_DATA_KEY],
|
|
96
92
|
mutationFn: (params) => __async(null, null, function* () {
|
|
97
93
|
if (!viemClient) throw new Error("Viem client not ready. Ensure useParaViemClient has resolved.");
|
|
98
94
|
return viemClient.signTypedData(fwd(params));
|
|
@@ -103,10 +99,9 @@ const useParaViemSignTypedData = (viemClient) => {
|
|
|
103
99
|
return __spreadProps(__spreadValues({}, mutation), { isPending: !viemClient || mutation.isPending });
|
|
104
100
|
};
|
|
105
101
|
const useParaViemWriteContract = (viemClient) => {
|
|
106
|
-
var _a, _b;
|
|
107
102
|
const mutation = renameMutations(
|
|
108
103
|
useMutation({
|
|
109
|
-
mutationKey: [VIEM_WRITE_CONTRACT_KEY
|
|
104
|
+
mutationKey: [VIEM_WRITE_CONTRACT_KEY],
|
|
110
105
|
mutationFn: (params) => __async(null, null, function* () {
|
|
111
106
|
if (!viemClient) throw new Error("Viem client not ready. Ensure useParaViemClient has resolved.");
|
|
112
107
|
return viemClient.writeContract(fwd(params));
|
|
@@ -117,10 +112,9 @@ const useParaViemWriteContract = (viemClient) => {
|
|
|
117
112
|
return __spreadProps(__spreadValues({}, mutation), { isPending: !viemClient || mutation.isPending });
|
|
118
113
|
};
|
|
119
114
|
const useParaViemDeployContract = (viemClient) => {
|
|
120
|
-
var _a, _b;
|
|
121
115
|
const mutation = renameMutations(
|
|
122
116
|
useMutation({
|
|
123
|
-
mutationKey: [VIEM_DEPLOY_CONTRACT_KEY
|
|
117
|
+
mutationKey: [VIEM_DEPLOY_CONTRACT_KEY],
|
|
124
118
|
mutationFn: (params) => __async(null, null, function* () {
|
|
125
119
|
if (!viemClient) throw new Error("Viem client not ready. Ensure useParaViemClient has resolved.");
|
|
126
120
|
return viemClient.deployContract(fwd(params));
|
|
@@ -51,24 +51,28 @@ import { useClient } from "../../../provider/hooks/utils/useClient.js";
|
|
|
51
51
|
import { useIsFullyLoggedIn } from "../../../provider/hooks/queries/useIsFullyLoggedIn.js";
|
|
52
52
|
import { useWallet } from "../../../provider/hooks/queries/useWallet.js";
|
|
53
53
|
import { resolveWalletForChain } from "../../resolveWallet.js";
|
|
54
|
+
import { isSameEvmAddress } from "./isSameEvmAddress.js";
|
|
54
55
|
const VIEM_ACCOUNT_BASE_KEY = "PARA_VIEM_ACCOUNT";
|
|
55
56
|
function createParaViemAccountHook(useEnhancer) {
|
|
56
57
|
return function useParaViemAccount2({ address, walletId } = {}) {
|
|
57
|
-
var _a, _b, _c;
|
|
58
|
+
var _a, _b, _c, _d, _e;
|
|
58
59
|
const para = useClient();
|
|
59
60
|
const { data: isFullyLoggedIn } = useIsFullyLoggedIn();
|
|
60
61
|
const { data: wallet } = useWallet();
|
|
61
62
|
const enhancement = (_a = useEnhancer == null ? void 0 : useEnhancer()) != null ? _a : {};
|
|
62
63
|
const hasExternalWalletClient = !!enhancement.walletClient;
|
|
63
64
|
const isEmbeddedActive = !!isFullyLoggedIn;
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
const querySelector = address ? ["address", address] : walletId ? ["walletId", walletId] : [
|
|
66
|
+
"default",
|
|
67
|
+
(wallet == null ? void 0 : wallet.type) === "EVM" ? (_b = wallet.id) != null ? _b : null : null,
|
|
68
|
+
(wallet == null ? void 0 : wallet.type) === "EVM" ? (_c = wallet.address) != null ? _c : null : null,
|
|
69
|
+
(_d = enhancement.address) != null ? _d : null
|
|
70
|
+
];
|
|
71
|
+
const expectedAddress = address != null ? address : walletId ? void 0 : (_e = (wallet == null ? void 0 : wallet.type) === "EVM" ? wallet.address : void 0) != null ? _e : enhancement.address;
|
|
72
|
+
const _f = useQuery({
|
|
73
|
+
queryKey: [VIEM_ACCOUNT_BASE_KEY, isEmbeddedActive, querySelector, hasExternalWalletClient ? "external" : "embedded"],
|
|
71
74
|
enabled: !enhancement.isLoading && !!para && (isEmbeddedActive || hasExternalWalletClient),
|
|
75
|
+
placeholderData: (previousAccount) => isSameEvmAddress(previousAccount == null ? void 0 : previousAccount.address, expectedAddress) ? previousAccount : void 0,
|
|
72
76
|
queryFn: () => __async(null, null, function* () {
|
|
73
77
|
var _a2, _b2;
|
|
74
78
|
if (isEmbeddedActive) {
|
|
@@ -87,7 +91,7 @@ function createParaViemAccountHook(useEnhancer) {
|
|
|
87
91
|
}
|
|
88
92
|
return null;
|
|
89
93
|
})
|
|
90
|
-
}), { data, isLoading } =
|
|
94
|
+
}), { data, isLoading } = _f, rest = __objRest(_f, ["data", "isLoading"]);
|
|
91
95
|
return __spreadValues({ viemAccount: data, data, isLoading: enhancement.isLoading || isLoading }, rest);
|
|
92
96
|
};
|
|
93
97
|
}
|
|
@@ -3,8 +3,9 @@ import type { WalletSelector } from '../../types.js';
|
|
|
3
3
|
import type { ViemEnhancement } from './types.js';
|
|
4
4
|
import type { WalletClient } from 'viem';
|
|
5
5
|
export declare const VIEM_CLIENT_BASE_KEY = "PARA_VIEM_CLIENT";
|
|
6
|
+
type WalletClientConfigParameter = Omit<import('viem').WalletClientConfig, 'account'>;
|
|
6
7
|
type UseParaViemClientParameters = WalletSelector & {
|
|
7
|
-
walletClientConfig:
|
|
8
|
+
walletClientConfig: WalletClientConfigParameter;
|
|
8
9
|
};
|
|
9
10
|
type ViemClientData = WalletClient | null | undefined;
|
|
10
11
|
/** Return type for `useParaViemClient`. Extends the react-query result with a named `viemClient` alias for `data`. */
|
|
@@ -49,17 +49,22 @@ var __async = (__this, __arguments, generator) => {
|
|
|
49
49
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
|
-
import { useQuery } from "@tanstack/react-query";
|
|
52
|
+
import { hashKey, useQuery } from "@tanstack/react-query";
|
|
53
53
|
import { useClient } from "../../../provider/hooks/utils/useClient.js";
|
|
54
54
|
import { useIsFullyLoggedIn } from "../../../provider/hooks/queries/useIsFullyLoggedIn.js";
|
|
55
55
|
import { useWallet } from "../../../provider/hooks/queries/useWallet.js";
|
|
56
56
|
import { resolveWalletForChain } from "../../resolveWallet.js";
|
|
57
57
|
import { createParaViemAccountHook } from "./useParaViemAccount.js";
|
|
58
|
+
import { isSameEvmAddress } from "./isSameEvmAddress.js";
|
|
58
59
|
const VIEM_CLIENT_BASE_KEY = "PARA_VIEM_CLIENT";
|
|
60
|
+
const WALLET_CLIENT_CONFIG_KEY_INDEX = 3;
|
|
61
|
+
function isSameWalletClientConfig(previousKey, walletClientConfig) {
|
|
62
|
+
return !!previousKey && hashKey([previousKey[WALLET_CLIENT_CONFIG_KEY_INDEX]]) === hashKey([walletClientConfig]);
|
|
63
|
+
}
|
|
59
64
|
function createParaViemClientHook(useEnhancer) {
|
|
60
65
|
const useAccount = createParaViemAccountHook(useEnhancer);
|
|
61
66
|
return function useParaViemClient2({ address, walletId, walletClientConfig }) {
|
|
62
|
-
var _a, _b;
|
|
67
|
+
var _a, _b, _c, _d, _e;
|
|
63
68
|
const para = useClient();
|
|
64
69
|
const { data: isFullyLoggedIn } = useIsFullyLoggedIn();
|
|
65
70
|
const { data: wallet } = useWallet();
|
|
@@ -68,19 +73,28 @@ function createParaViemClientHook(useEnhancer) {
|
|
|
68
73
|
const hasExternalWalletClient = !!enhancement.walletClient;
|
|
69
74
|
const isEmbeddedActive = !!isFullyLoggedIn;
|
|
70
75
|
const account = viemAccount;
|
|
71
|
-
const _c =
|
|
76
|
+
const expectedAddress = (_d = (_b = account == null ? void 0 : account.address) != null ? _b : address) != null ? _d : walletId ? void 0 : (_c = (wallet == null ? void 0 : wallet.type) === "EVM" ? wallet.address : void 0) != null ? _c : enhancement.address;
|
|
77
|
+
const _f = useQuery({
|
|
72
78
|
queryKey: [
|
|
73
79
|
VIEM_CLIENT_BASE_KEY,
|
|
74
|
-
|
|
80
|
+
isEmbeddedActive,
|
|
81
|
+
(_e = account == null ? void 0 : account.address) != null ? _e : null,
|
|
75
82
|
walletClientConfig,
|
|
76
83
|
hasExternalWalletClient ? "external" : "embedded"
|
|
77
84
|
],
|
|
78
85
|
enabled: !enhancement.isLoading && !!para && (!!account || hasExternalWalletClient),
|
|
79
|
-
|
|
86
|
+
placeholderData: (previousClient, previousQuery) => {
|
|
80
87
|
var _a2;
|
|
81
|
-
|
|
88
|
+
return isSameEvmAddress((_a2 = previousClient == null ? void 0 : previousClient.account) == null ? void 0 : _a2.address, expectedAddress) && isSameWalletClientConfig(previousQuery == null ? void 0 : previousQuery.queryKey, walletClientConfig) ? previousClient : void 0;
|
|
89
|
+
},
|
|
90
|
+
queryFn: () => __async(null, null, function* () {
|
|
91
|
+
var _a2, _b2;
|
|
92
|
+
if (!isEmbeddedActive) {
|
|
93
|
+
return (_a2 = enhancement.walletClient) != null ? _a2 : null;
|
|
94
|
+
}
|
|
95
|
+
const resolved = resolveWalletForChain(para, { address, walletId }, "EVM", wallet != null ? wallet : void 0);
|
|
82
96
|
if ((resolved == null ? void 0 : resolved.isExternal) && resolved.address) {
|
|
83
|
-
const externalClient = yield (
|
|
97
|
+
const externalClient = yield (_b2 = enhancement.getWalletClientForAddress) == null ? void 0 : _b2.call(enhancement, resolved.address);
|
|
84
98
|
if (externalClient) return externalClient;
|
|
85
99
|
if (hasExternalWalletClient) return enhancement.walletClient;
|
|
86
100
|
return null;
|
|
@@ -94,7 +108,7 @@ function createParaViemClientHook(useEnhancer) {
|
|
|
94
108
|
}
|
|
95
109
|
return null;
|
|
96
110
|
})
|
|
97
|
-
}), { data, isLoading } =
|
|
111
|
+
}), { data, isLoading } = _f, rest = __objRest(_f, ["data", "isLoading"]);
|
|
98
112
|
return __spreadValues({ viemClient: data, data, isLoading: enhancement.isLoading || isLoading }, rest);
|
|
99
113
|
};
|
|
100
114
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ChainEnhancement } from '../types.js';
|
|
2
|
-
import type { MessagePartialSigner, TransactionPartialSigner } from '@solana/signers';
|
|
3
|
-
export type SolanaSigner = MessagePartialSigner & TransactionPartialSigner;
|
|
2
|
+
import type { MessagePartialSigner, TransactionModifyingSigner, TransactionPartialSigner } from '@solana/signers';
|
|
3
|
+
export type SolanaSigner = MessagePartialSigner & TransactionPartialSigner & TransactionModifyingSigner;
|
|
4
4
|
export interface SolanaEnhancement extends ChainEnhancement {
|
|
5
|
-
/** External signer implementing MessagePartialSigner
|
|
5
|
+
/** External signer implementing MessagePartialSigner, TransactionPartialSigner and TransactionModifyingSigner. */
|
|
6
6
|
signer?: SolanaSigner | null;
|
|
7
7
|
}
|
|
@@ -51,7 +51,9 @@ import { useClient } from "../../provider/hooks/utils/useClient.js";
|
|
|
51
51
|
import { useIsFullyLoggedIn } from "../../provider/hooks/queries/useIsFullyLoggedIn.js";
|
|
52
52
|
import { useWallet } from "../../provider/hooks/queries/useWallet.js";
|
|
53
53
|
import { resolveWalletForChain } from "../resolveWallet.js";
|
|
54
|
+
import { createObjectIdentity } from "../../provider/utils/objectIdentity.js";
|
|
54
55
|
const SOLANA_SIGNER_BASE_KEY = "PARA_SOLANA_SIGNER";
|
|
56
|
+
const solanaRpcKey = createObjectIdentity();
|
|
55
57
|
function createParaSolanaSignerHook(useEnhancer) {
|
|
56
58
|
return function useParaSolanaSigner2({ address, walletId, rpc }) {
|
|
57
59
|
var _a, _b;
|
|
@@ -66,7 +68,8 @@ function createParaSolanaSignerHook(useEnhancer) {
|
|
|
66
68
|
SOLANA_SIGNER_BASE_KEY,
|
|
67
69
|
isEmbeddedActive,
|
|
68
70
|
(_b = walletId != null ? walletId : address) != null ? _b : (wallet == null ? void 0 : wallet.type) === "SOLANA" ? wallet == null ? void 0 : wallet.id : null,
|
|
69
|
-
hasExternalSigner ? "external-available" : "embedded-only"
|
|
71
|
+
hasExternalSigner ? "external-available" : "embedded-only",
|
|
72
|
+
solanaRpcKey(rpc)
|
|
70
73
|
],
|
|
71
74
|
enabled: !enhancement.isLoading && !!para && (isEmbeddedActive || hasExternalSigner),
|
|
72
75
|
queryFn: () => __async(null, null, function* () {
|
|
@@ -42,10 +42,9 @@ import { renameMutations } from "../../provider/utils/renameMutations.js";
|
|
|
42
42
|
const STELLAR_SIGN_TRANSACTION_KEY = "PARA_STELLAR_SIGN_TRANSACTION";
|
|
43
43
|
const STELLAR_SIGN_AUTH_ENTRY_KEY = "PARA_STELLAR_SIGN_AUTH_ENTRY";
|
|
44
44
|
const useParaStellarSignTransaction = (signer) => {
|
|
45
|
-
var _a;
|
|
46
45
|
const mutation = renameMutations(
|
|
47
46
|
useMutation({
|
|
48
|
-
mutationKey: [STELLAR_SIGN_TRANSACTION_KEY
|
|
47
|
+
mutationKey: [STELLAR_SIGN_TRANSACTION_KEY],
|
|
49
48
|
mutationFn: (transaction) => __async(null, null, function* () {
|
|
50
49
|
if (!signer) throw new Error("Stellar signer not ready. Ensure useParaStellarSigner has resolved.");
|
|
51
50
|
return signer.signTransaction(transaction);
|
|
@@ -56,10 +55,9 @@ const useParaStellarSignTransaction = (signer) => {
|
|
|
56
55
|
return __spreadProps(__spreadValues({}, mutation), { isPending: !signer || mutation.isPending });
|
|
57
56
|
};
|
|
58
57
|
const useParaStellarSignAuthEntry = (signer) => {
|
|
59
|
-
var _a;
|
|
60
58
|
const mutation = renameMutations(
|
|
61
59
|
useMutation({
|
|
62
|
-
mutationKey: [STELLAR_SIGN_AUTH_ENTRY_KEY
|
|
60
|
+
mutationKey: [STELLAR_SIGN_AUTH_ENTRY_KEY],
|
|
63
61
|
mutationFn: (authEntry) => __async(null, null, function* () {
|
|
64
62
|
if (!signer) throw new Error("Stellar signer not ready. Ensure useParaStellarSigner has resolved.");
|
|
65
63
|
return signer.signAuthEntry(authEntry);
|
|
@@ -42,10 +42,9 @@ import { renameMutations } from "../../provider/utils/renameMutations.js";
|
|
|
42
42
|
const SUI_SIGN_TRANSACTION_KEY = "PARA_SUI_SIGN_TRANSACTION";
|
|
43
43
|
const SUI_SIGN_PERSONAL_MESSAGE_KEY = "PARA_SUI_SIGN_PERSONAL_MESSAGE";
|
|
44
44
|
const useParaSuiSignTransaction = (signer) => {
|
|
45
|
-
var _a;
|
|
46
45
|
const mutation = renameMutations(
|
|
47
46
|
useMutation({
|
|
48
|
-
mutationKey: [SUI_SIGN_TRANSACTION_KEY
|
|
47
|
+
mutationKey: [SUI_SIGN_TRANSACTION_KEY],
|
|
49
48
|
mutationFn: (transaction) => __async(null, null, function* () {
|
|
50
49
|
if (!signer) throw new Error("Sui signer not ready. Ensure useParaSuiSigner has resolved.");
|
|
51
50
|
return signer.signTransaction(transaction);
|
|
@@ -56,10 +55,9 @@ const useParaSuiSignTransaction = (signer) => {
|
|
|
56
55
|
return __spreadProps(__spreadValues({}, mutation), { isPending: !signer || mutation.isPending });
|
|
57
56
|
};
|
|
58
57
|
const useParaSuiSignPersonalMessage = (signer) => {
|
|
59
|
-
var _a;
|
|
60
58
|
const mutation = renameMutations(
|
|
61
59
|
useMutation({
|
|
62
|
-
mutationKey: [SUI_SIGN_PERSONAL_MESSAGE_KEY
|
|
60
|
+
mutationKey: [SUI_SIGN_PERSONAL_MESSAGE_KEY],
|
|
63
61
|
mutationFn: (message) => __async(null, null, function* () {
|
|
64
62
|
if (!signer) throw new Error("Sui signer not ready. Ensure useParaSuiSigner has resolved.");
|
|
65
63
|
return signer.signPersonalMessage(message);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import type { SuiMultiSigMember } from '@getpara/sui-sdk-integration';
|
|
2
|
+
import type { ParaSuiNetworkOptions, SuiMultiSigMember } from '@getpara/sui-sdk-integration';
|
|
3
3
|
import type { WalletSelector } from '../types.js';
|
|
4
4
|
export declare const SUI_MULTISIG_SIGNER_BASE_KEY = "PARA_SUI_MULTISIG_SIGNER";
|
|
5
|
-
type UseParaSuiMultiSigSignerParameters = WalletSelector & {
|
|
5
|
+
type UseParaSuiMultiSigSignerParameters = WalletSelector & ParaSuiNetworkOptions & {
|
|
6
6
|
/** The other co-signers (public keys + weights) — everyone except the Para member. */
|
|
7
7
|
otherMembers: SuiMultiSigMember[];
|
|
8
8
|
/** k-of-n threshold: the summed weight required for a valid multisig signature. */
|
|
@@ -24,6 +24,8 @@ export type UseParaSuiMultiSigSignerReturn = UseQueryResult<NonNullable<SuiMulti
|
|
|
24
24
|
* Embedded-only: unlike `useParaSuiSigner`, this hook has no external-wallet enhancer path — the Para
|
|
25
25
|
* member is always the embedded MPC wallet.
|
|
26
26
|
*
|
|
27
|
+
* Pass a Sui `client` or an explicit `network` to report the signed network, as with `useParaSuiSigner`.
|
|
28
|
+
*
|
|
27
29
|
* @example
|
|
28
30
|
* ```tsx
|
|
29
31
|
* const { multiSigSigner } = useParaSuiMultiSigSigner({
|
|
@@ -37,6 +39,6 @@ export type UseParaSuiMultiSigSignerReturn = UseQueryResult<NonNullable<SuiMulti
|
|
|
37
39
|
* const ok = await multiSigSigner.verifyPersonalMessage(bytes, combined);
|
|
38
40
|
* ```
|
|
39
41
|
*/
|
|
40
|
-
export declare function createParaSuiMultiSigSignerHook(): ({ address, walletId, otherMembers, threshold, paraWeight, }: UseParaSuiMultiSigSignerParameters) => UseParaSuiMultiSigSignerReturn;
|
|
42
|
+
export declare function createParaSuiMultiSigSignerHook(): ({ address, walletId, otherMembers, threshold, paraWeight, client, network, }: UseParaSuiMultiSigSignerParameters) => UseParaSuiMultiSigSignerReturn;
|
|
41
43
|
export declare const useParaSuiMultiSigSigner: (params: UseParaSuiMultiSigSignerParameters) => UseParaSuiMultiSigSignerReturn;
|
|
42
44
|
export {};
|
|
@@ -51,6 +51,7 @@ import { useClient } from "../../provider/hooks/utils/useClient.js";
|
|
|
51
51
|
import { useIsFullyLoggedIn } from "../../provider/hooks/queries/useIsFullyLoggedIn.js";
|
|
52
52
|
import { useWallet } from "../../provider/hooks/queries/useWallet.js";
|
|
53
53
|
import { resolveWalletForChain } from "../resolveWallet.js";
|
|
54
|
+
import { suiClientKey } from "./suiClientKey.js";
|
|
54
55
|
const SUI_MULTISIG_SIGNER_BASE_KEY = "PARA_SUI_MULTISIG_SIGNER";
|
|
55
56
|
function membersKey(members) {
|
|
56
57
|
if (!members) return "";
|
|
@@ -66,7 +67,9 @@ function createParaSuiMultiSigSignerHook() {
|
|
|
66
67
|
walletId,
|
|
67
68
|
otherMembers,
|
|
68
69
|
threshold,
|
|
69
|
-
paraWeight
|
|
70
|
+
paraWeight,
|
|
71
|
+
client,
|
|
72
|
+
network
|
|
70
73
|
}) {
|
|
71
74
|
const para = useClient();
|
|
72
75
|
const { data: isFullyLoggedIn } = useIsFullyLoggedIn();
|
|
@@ -79,14 +82,22 @@ function createParaSuiMultiSigSignerHook() {
|
|
|
79
82
|
walletId != null ? walletId : (wallet == null ? void 0 : wallet.type) === "SUI" ? wallet == null ? void 0 : wallet.id : null,
|
|
80
83
|
threshold,
|
|
81
84
|
paraWeight != null ? paraWeight : 1,
|
|
82
|
-
membersKey(otherMembers)
|
|
85
|
+
membersKey(otherMembers),
|
|
86
|
+
network != null ? network : null,
|
|
87
|
+
suiClientKey(client)
|
|
83
88
|
],
|
|
84
89
|
enabled: isEmbeddedActive && !!para && Array.isArray(otherMembers) && otherMembers.length > 0 && (threshold != null ? threshold : 0) > 0,
|
|
85
90
|
queryFn: () => __async(null, null, function* () {
|
|
86
91
|
if (!isEmbeddedActive || !para) return null;
|
|
87
92
|
const resolved = resolveWalletForChain(para, { address, walletId }, "SUI", wallet != null ? wallet : void 0);
|
|
88
93
|
const mod = yield importSui();
|
|
89
|
-
return mod.createParaSuiMultiSigSigner({
|
|
94
|
+
return mod.createParaSuiMultiSigSigner(__spreadValues(__spreadValues({
|
|
95
|
+
para,
|
|
96
|
+
walletId: resolved == null ? void 0 : resolved.id,
|
|
97
|
+
otherMembers,
|
|
98
|
+
threshold,
|
|
99
|
+
paraWeight
|
|
100
|
+
}, client ? { client } : {}), network ? { network } : {}));
|
|
90
101
|
})
|
|
91
102
|
}), { data, isLoading } = _a, rest = __objRest(_a, ["data", "isLoading"]);
|
|
92
103
|
return __spreadValues({ multiSigSigner: data, data, isLoading }, rest);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type UseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import type { WalletSelector } from '../types.js';
|
|
3
3
|
import type { SuiEnhancement } from './types.js';
|
|
4
|
+
import type { ParaSuiNetworkOptions } from '@getpara/sui-sdk-integration';
|
|
4
5
|
export declare const SUI_SIGNER_BASE_KEY = "PARA_SUI_SIGNER";
|
|
5
|
-
type UseParaSuiSignerParameters = WalletSelector;
|
|
6
|
+
type UseParaSuiSignerParameters = WalletSelector & ParaSuiNetworkOptions;
|
|
6
7
|
/** The signer object returned by `@getpara/sui-sdk-integration`'s `createParaSuiSigner` (synchronous). */
|
|
7
8
|
type SuiSignerData = ReturnType<Awaited<typeof import('@getpara/sui-sdk-integration')>['createParaSuiSigner']> | null | undefined;
|
|
8
9
|
/** Return type for `useParaSuiSigner`. Extends the react-query result with a named `suiSigner` alias for `data`. */
|
|
@@ -17,7 +18,7 @@ export type UseParaSuiSignerReturn = UseQueryResult<NonNullable<SuiSignerData> |
|
|
|
17
18
|
* @param useEnhancer - Optional hook that provides an external Sui signer.
|
|
18
19
|
* @returns A `useParaSuiSigner` hook.
|
|
19
20
|
*/
|
|
20
|
-
export declare function createParaSuiSignerHook(useEnhancer?: () => SuiEnhancement): ({ address, walletId }?: UseParaSuiSignerParameters) => UseParaSuiSignerReturn;
|
|
21
|
+
export declare function createParaSuiSignerHook(useEnhancer?: () => SuiEnhancement): ({ address, walletId, client, network }?: UseParaSuiSignerParameters) => UseParaSuiSignerReturn;
|
|
21
22
|
/**
|
|
22
23
|
* Hook that returns a Sui signer backed by the user's embedded Para wallet (Sui reuses the Solana
|
|
23
24
|
* Ed25519 key material). Requires `@getpara/sui-sdk-integration` and `@mysten/sui` as peer dependencies.
|
|
@@ -25,12 +26,18 @@ export declare function createParaSuiSignerHook(useEnhancer?: () => SuiEnhanceme
|
|
|
25
26
|
* If the user has multiple Ed25519 wallets, pass `address` or `walletId` to select one. When omitted,
|
|
26
27
|
* the active wallet from `useWalletState` is used automatically.
|
|
27
28
|
*
|
|
29
|
+
* Pass a Sui `client` so signed transactions report their mainnet or testnet network, or an explicit
|
|
30
|
+
* `network`, which is required to report devnet. A signed `ValidDuring` chain always takes precedence.
|
|
31
|
+
*
|
|
28
32
|
* @example
|
|
29
33
|
* ```tsx
|
|
30
34
|
* import { useParaSuiSigner } from "@getpara/react-sdk";
|
|
35
|
+
* import { SuiGrpcClient } from "@mysten/sui/grpc";
|
|
36
|
+
*
|
|
37
|
+
* const client = new SuiGrpcClient({ network: "mainnet", baseUrl: "https://fullnode.mainnet.sui.io:443" });
|
|
31
38
|
*
|
|
32
39
|
* function SignMessage() {
|
|
33
|
-
* const { suiSigner, isLoading } = useParaSuiSigner();
|
|
40
|
+
* const { suiSigner, isLoading } = useParaSuiSigner({ client });
|
|
34
41
|
*
|
|
35
42
|
* const handleSign = async () => {
|
|
36
43
|
* if (!suiSigner) return;
|
|
@@ -51,9 +51,10 @@ import { useClient } from "../../provider/hooks/utils/useClient.js";
|
|
|
51
51
|
import { useIsFullyLoggedIn } from "../../provider/hooks/queries/useIsFullyLoggedIn.js";
|
|
52
52
|
import { useWallet } from "../../provider/hooks/queries/useWallet.js";
|
|
53
53
|
import { resolveWalletForChain } from "../resolveWallet.js";
|
|
54
|
+
import { suiClientKey } from "./suiClientKey.js";
|
|
54
55
|
const SUI_SIGNER_BASE_KEY = "PARA_SUI_SIGNER";
|
|
55
56
|
function createParaSuiSignerHook(useEnhancer) {
|
|
56
|
-
return function useParaSuiSigner2({ address, walletId } = {}) {
|
|
57
|
+
return function useParaSuiSigner2({ address, walletId, client, network } = {}) {
|
|
57
58
|
var _a;
|
|
58
59
|
const para = useClient();
|
|
59
60
|
const { data: isFullyLoggedIn } = useIsFullyLoggedIn();
|
|
@@ -61,13 +62,22 @@ function createParaSuiSignerHook(useEnhancer) {
|
|
|
61
62
|
const enhancement = (_a = useEnhancer == null ? void 0 : useEnhancer()) != null ? _a : {};
|
|
62
63
|
const isEmbeddedActive = !!isFullyLoggedIn;
|
|
63
64
|
const _b = useQuery({
|
|
64
|
-
queryKey: [
|
|
65
|
+
queryKey: [
|
|
66
|
+
SUI_SIGNER_BASE_KEY,
|
|
67
|
+
isEmbeddedActive,
|
|
68
|
+
walletId != null ? walletId : (wallet == null ? void 0 : wallet.type) === "SUI" ? wallet == null ? void 0 : wallet.id : null,
|
|
69
|
+
network != null ? network : null,
|
|
70
|
+
suiClientKey(client)
|
|
71
|
+
],
|
|
65
72
|
enabled: !enhancement.isLoading && isEmbeddedActive && !!para,
|
|
66
73
|
queryFn: () => __async(null, null, function* () {
|
|
67
74
|
if (!isEmbeddedActive || !para) return null;
|
|
68
75
|
const resolved = resolveWalletForChain(para, { address, walletId }, "SUI", wallet != null ? wallet : void 0);
|
|
69
76
|
const mod = yield importSui();
|
|
70
|
-
return mod.createParaSuiSigner({
|
|
77
|
+
return mod.createParaSuiSigner(__spreadValues(__spreadValues({
|
|
78
|
+
para,
|
|
79
|
+
walletId: resolved == null ? void 0 : resolved.id
|
|
80
|
+
}, client ? { client } : {}), network ? { network } : {}));
|
|
71
81
|
})
|
|
72
82
|
}), { data, isLoading } = _b, rest = __objRest(_b, ["data", "isLoading"]);
|
|
73
83
|
return __spreadValues({ suiSigner: data, data, isLoading }, rest);
|
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export { useExportPrivateKey, EXPORT_PRIVATE_KEY_KEY } from './provider/hooks/mu
|
|
|
32
32
|
export { useRequestFaucet, REQUEST_FAUCET_KEY } from './provider/hooks/mutations/useRequestFaucet.js';
|
|
33
33
|
export { useAuthenticateWithEmailOrPhone } from './provider/hooks/mutations/useAuthenticateWithEmailOrPhone.js';
|
|
34
34
|
export { useAuthenticateWithOAuth } from './provider/hooks/mutations/useAuthenticateWithOAuth.js';
|
|
35
|
+
export { useAuthenticateWithCustomOAuth } from './provider/hooks/mutations/useAuthenticateWithCustomOAuth.js';
|
|
35
36
|
export { useLoginExternalWallet } from './provider/hooks/mutations/useLoginExternalWallet.js';
|
|
36
37
|
export { useVerifyExternalWallet } from './provider/hooks/mutations/useVerifyExternalWallet.js';
|
|
37
38
|
export { useVerifyOAuth } from './provider/hooks/mutations/useVerifyOAuth.js';
|
|
@@ -40,3 +41,6 @@ export { useVerifyTelegram } from './provider/hooks/mutations/useVerifyTelegram.
|
|
|
40
41
|
export { useWaitForLogin } from './provider/hooks/mutations/useWaitForLogin.js';
|
|
41
42
|
export { useWaitForSignup } from './provider/hooks/mutations/useWaitForSignup.js';
|
|
42
43
|
export { useWaitForWalletCreation } from './provider/hooks/mutations/useWaitForWalletCreation.js';
|
|
44
|
+
export * from './provider/actions/permissions.js';
|
|
45
|
+
export * from './provider/hooks/permissions/queries.js';
|
|
46
|
+
export * from './provider/hooks/permissions/mutations.js';
|
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ import { useExportPrivateKey, EXPORT_PRIVATE_KEY_KEY } from "./provider/hooks/mu
|
|
|
30
30
|
import { useRequestFaucet, REQUEST_FAUCET_KEY } from "./provider/hooks/mutations/useRequestFaucet.js";
|
|
31
31
|
import { useAuthenticateWithEmailOrPhone } from "./provider/hooks/mutations/useAuthenticateWithEmailOrPhone.js";
|
|
32
32
|
import { useAuthenticateWithOAuth } from "./provider/hooks/mutations/useAuthenticateWithOAuth.js";
|
|
33
|
+
import { useAuthenticateWithCustomOAuth } from "./provider/hooks/mutations/useAuthenticateWithCustomOAuth.js";
|
|
33
34
|
import { useLoginExternalWallet } from "./provider/hooks/mutations/useLoginExternalWallet.js";
|
|
34
35
|
import { useVerifyExternalWallet } from "./provider/hooks/mutations/useVerifyExternalWallet.js";
|
|
35
36
|
import { useVerifyOAuth } from "./provider/hooks/mutations/useVerifyOAuth.js";
|
|
@@ -38,11 +39,15 @@ import { useVerifyTelegram } from "./provider/hooks/mutations/useVerifyTelegram.
|
|
|
38
39
|
import { useWaitForLogin } from "./provider/hooks/mutations/useWaitForLogin.js";
|
|
39
40
|
import { useWaitForSignup } from "./provider/hooks/mutations/useWaitForSignup.js";
|
|
40
41
|
import { useWaitForWalletCreation } from "./provider/hooks/mutations/useWaitForWalletCreation.js";
|
|
42
|
+
export * from "./provider/actions/permissions.js";
|
|
43
|
+
export * from "./provider/hooks/permissions/queries.js";
|
|
44
|
+
export * from "./provider/hooks/permissions/mutations.js";
|
|
41
45
|
export {
|
|
42
46
|
ChainId,
|
|
43
47
|
EXPORT_PRIVATE_KEY_KEY,
|
|
44
48
|
REQUEST_FAUCET_KEY,
|
|
45
49
|
useAccount,
|
|
50
|
+
useAuthenticateWithCustomOAuth,
|
|
46
51
|
useAuthenticateWithEmailOrPhone,
|
|
47
52
|
useAuthenticateWithOAuth,
|
|
48
53
|
useClaimPregenWallets,
|
package/dist/mutations.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export { useIssueJwt } from './provider/hooks/mutations/useIssueJwt.js';
|
|
|
20
20
|
export { useResendVerificationCode } from './provider/hooks/mutations/useResendVerificationCode.js';
|
|
21
21
|
export { useAuthenticateWithEmailOrPhone } from './provider/hooks/mutations/useAuthenticateWithEmailOrPhone.js';
|
|
22
22
|
export { useAuthenticateWithOAuth } from './provider/hooks/mutations/useAuthenticateWithOAuth.js';
|
|
23
|
+
export { useAuthenticateWithCustomOAuth } from './provider/hooks/mutations/useAuthenticateWithCustomOAuth.js';
|
|
23
24
|
export { useLoginExternalWallet } from './provider/hooks/mutations/useLoginExternalWallet.js';
|
|
24
25
|
export { useVerifyExternalWallet } from './provider/hooks/mutations/useVerifyExternalWallet.js';
|
|
25
26
|
export { useVerifyOAuth } from './provider/hooks/mutations/useVerifyOAuth.js';
|
|
@@ -30,3 +31,4 @@ export { useWaitForSignup } from './provider/hooks/mutations/useWaitForSignup.js
|
|
|
30
31
|
export { useWaitForWalletCreation } from './provider/hooks/mutations/useWaitForWalletCreation.js';
|
|
31
32
|
export { useExportPrivateKey } from './provider/hooks/mutations/useExportPrivateKey.js';
|
|
32
33
|
export { useRequestFaucet } from './provider/hooks/mutations/useRequestFaucet.js';
|
|
34
|
+
export * from './provider/hooks/permissions/mutations.js';
|
package/dist/mutations.js
CHANGED
|
@@ -20,6 +20,7 @@ import { useIssueJwt } from "./provider/hooks/mutations/useIssueJwt.js";
|
|
|
20
20
|
import { useResendVerificationCode } from "./provider/hooks/mutations/useResendVerificationCode.js";
|
|
21
21
|
import { useAuthenticateWithEmailOrPhone } from "./provider/hooks/mutations/useAuthenticateWithEmailOrPhone.js";
|
|
22
22
|
import { useAuthenticateWithOAuth } from "./provider/hooks/mutations/useAuthenticateWithOAuth.js";
|
|
23
|
+
import { useAuthenticateWithCustomOAuth } from "./provider/hooks/mutations/useAuthenticateWithCustomOAuth.js";
|
|
23
24
|
import { useLoginExternalWallet } from "./provider/hooks/mutations/useLoginExternalWallet.js";
|
|
24
25
|
import { useVerifyExternalWallet } from "./provider/hooks/mutations/useVerifyExternalWallet.js";
|
|
25
26
|
import { useVerifyOAuth } from "./provider/hooks/mutations/useVerifyOAuth.js";
|
|
@@ -30,7 +31,9 @@ import { useWaitForSignup } from "./provider/hooks/mutations/useWaitForSignup.js
|
|
|
30
31
|
import { useWaitForWalletCreation } from "./provider/hooks/mutations/useWaitForWalletCreation.js";
|
|
31
32
|
import { useExportPrivateKey } from "./provider/hooks/mutations/useExportPrivateKey.js";
|
|
32
33
|
import { useRequestFaucet } from "./provider/hooks/mutations/useRequestFaucet.js";
|
|
34
|
+
export * from "./provider/hooks/permissions/mutations.js";
|
|
33
35
|
export {
|
|
36
|
+
useAuthenticateWithCustomOAuth,
|
|
34
37
|
useAuthenticateWithEmailOrPhone,
|
|
35
38
|
useAuthenticateWithOAuth,
|
|
36
39
|
useClaimPregenWallets,
|