@getpara/react-sdk 2.18.0 → 2.20.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/evm/actions/getViemClient.d.ts +294 -294
- package/dist/evm/hooks/useViemClient.d.ts +294 -294
- package/dist/stellar/actions/getStellarSigner.d.ts +6 -0
- package/dist/stellar/actions/getStellarSigner.js +16 -0
- package/dist/stellar/actions/index.d.ts +1 -0
- package/dist/stellar/actions/index.js +2 -0
- package/dist/stellar/hooks/index.d.ts +1 -0
- package/dist/stellar/hooks/index.js +2 -0
- package/dist/stellar/hooks/useStellarSigner.d.ts +163 -0
- package/dist/stellar/hooks/useStellarSigner.js +40 -0
- package/dist/stellar/index.d.ts +2 -0
- package/dist/stellar/index.js +3 -0
- package/package.json +23 -29
- package/dist/aa/alchemy/index.d.ts +0 -2
- package/dist/aa/alchemy/index.js +0 -8
- package/dist/aa/biconomy/index.d.ts +0 -2
- package/dist/aa/biconomy/index.js +0 -8
- package/dist/aa/cdp/index.d.ts +0 -2
- package/dist/aa/cdp/index.js +0 -8
- package/dist/aa/gelato/index.d.ts +0 -2
- package/dist/aa/gelato/index.js +0 -8
- package/dist/aa/pimlico/index.d.ts +0 -2
- package/dist/aa/pimlico/index.js +0 -8
- package/dist/aa/porto/index.d.ts +0 -2
- package/dist/aa/porto/index.js +0 -8
- package/dist/aa/rhinestone/index.d.ts +0 -2
- package/dist/aa/rhinestone/index.js +0 -8
- package/dist/aa/safe/index.d.ts +0 -2
- package/dist/aa/safe/index.js +0 -8
- package/dist/aa/thirdweb/index.d.ts +0 -2
- package/dist/aa/thirdweb/index.js +0 -8
- package/dist/aa/zerodev/index.d.ts +0 -2
- package/dist/aa/zerodev/index.js +0 -8
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import ParaWeb from '@getpara/react-sdk-lite';
|
|
2
|
+
export declare const getStellarSigner: ({ para, walletId, networkPassphrase, }: {
|
|
3
|
+
para: ParaWeb;
|
|
4
|
+
walletId?: string;
|
|
5
|
+
networkPassphrase?: string;
|
|
6
|
+
}) => Promise<import("@getpara/stellar-sdk-v14-integration").ParaStellarSigner>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__async
|
|
4
|
+
} from "../../chunk-MMUBH76A.js";
|
|
5
|
+
import { Networks } from "@stellar/stellar-sdk";
|
|
6
|
+
import { createParaStellarSigner } from "@getpara/stellar-sdk-v14-integration";
|
|
7
|
+
const getStellarSigner = (_0) => __async(void 0, [_0], function* ({
|
|
8
|
+
para,
|
|
9
|
+
walletId,
|
|
10
|
+
networkPassphrase = Networks.PUBLIC
|
|
11
|
+
}) {
|
|
12
|
+
return createParaStellarSigner({ para, networkPassphrase, walletId });
|
|
13
|
+
});
|
|
14
|
+
export {
|
|
15
|
+
getStellarSigner
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './getStellarSigner.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useStellarSigner.js';
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
export declare const STELLAR_SIGNER_BASE_KEY = "PARA_STELLAR_SIGNER";
|
|
2
|
+
type UseStellarSignerParameters = {
|
|
3
|
+
walletId?: string;
|
|
4
|
+
networkPassphrase?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const useStellarSigner: ({ walletId, networkPassphrase }?: UseStellarSignerParameters) => {
|
|
7
|
+
error: Error;
|
|
8
|
+
isError: true;
|
|
9
|
+
isPending: false;
|
|
10
|
+
isLoadingError: false;
|
|
11
|
+
isRefetchError: true;
|
|
12
|
+
isSuccess: false;
|
|
13
|
+
isPlaceholderData: false;
|
|
14
|
+
status: "error";
|
|
15
|
+
dataUpdatedAt: number;
|
|
16
|
+
errorUpdatedAt: number;
|
|
17
|
+
failureCount: number;
|
|
18
|
+
failureReason: Error | null;
|
|
19
|
+
errorUpdateCount: number;
|
|
20
|
+
isFetched: boolean;
|
|
21
|
+
isFetchedAfterMount: boolean;
|
|
22
|
+
isFetching: boolean;
|
|
23
|
+
isInitialLoading: boolean;
|
|
24
|
+
isPaused: boolean;
|
|
25
|
+
isRefetching: boolean;
|
|
26
|
+
isStale: boolean;
|
|
27
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@getpara/stellar-sdk-v14-integration").ParaStellarSigner | null, Error>>;
|
|
28
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
29
|
+
promise: Promise<import("@getpara/stellar-sdk-v14-integration").ParaStellarSigner | null>;
|
|
30
|
+
stellarSigner: import("@getpara/stellar-sdk-v14-integration").ParaStellarSigner | null | undefined;
|
|
31
|
+
isLoading: boolean;
|
|
32
|
+
} | {
|
|
33
|
+
error: null;
|
|
34
|
+
isError: false;
|
|
35
|
+
isPending: false;
|
|
36
|
+
isLoadingError: false;
|
|
37
|
+
isRefetchError: false;
|
|
38
|
+
isSuccess: true;
|
|
39
|
+
isPlaceholderData: false;
|
|
40
|
+
status: "success";
|
|
41
|
+
dataUpdatedAt: number;
|
|
42
|
+
errorUpdatedAt: number;
|
|
43
|
+
failureCount: number;
|
|
44
|
+
failureReason: Error | null;
|
|
45
|
+
errorUpdateCount: number;
|
|
46
|
+
isFetched: boolean;
|
|
47
|
+
isFetchedAfterMount: boolean;
|
|
48
|
+
isFetching: boolean;
|
|
49
|
+
isInitialLoading: boolean;
|
|
50
|
+
isPaused: boolean;
|
|
51
|
+
isRefetching: boolean;
|
|
52
|
+
isStale: boolean;
|
|
53
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@getpara/stellar-sdk-v14-integration").ParaStellarSigner | null, Error>>;
|
|
54
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
55
|
+
promise: Promise<import("@getpara/stellar-sdk-v14-integration").ParaStellarSigner | null>;
|
|
56
|
+
stellarSigner: import("@getpara/stellar-sdk-v14-integration").ParaStellarSigner | null | undefined;
|
|
57
|
+
isLoading: boolean;
|
|
58
|
+
} | {
|
|
59
|
+
error: Error;
|
|
60
|
+
isError: true;
|
|
61
|
+
isPending: false;
|
|
62
|
+
isLoadingError: true;
|
|
63
|
+
isRefetchError: false;
|
|
64
|
+
isSuccess: false;
|
|
65
|
+
isPlaceholderData: false;
|
|
66
|
+
status: "error";
|
|
67
|
+
dataUpdatedAt: number;
|
|
68
|
+
errorUpdatedAt: number;
|
|
69
|
+
failureCount: number;
|
|
70
|
+
failureReason: Error | null;
|
|
71
|
+
errorUpdateCount: number;
|
|
72
|
+
isFetched: boolean;
|
|
73
|
+
isFetchedAfterMount: boolean;
|
|
74
|
+
isFetching: boolean;
|
|
75
|
+
isInitialLoading: boolean;
|
|
76
|
+
isPaused: boolean;
|
|
77
|
+
isRefetching: boolean;
|
|
78
|
+
isStale: boolean;
|
|
79
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@getpara/stellar-sdk-v14-integration").ParaStellarSigner | null, Error>>;
|
|
80
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
81
|
+
promise: Promise<import("@getpara/stellar-sdk-v14-integration").ParaStellarSigner | null>;
|
|
82
|
+
stellarSigner: import("@getpara/stellar-sdk-v14-integration").ParaStellarSigner | null | undefined;
|
|
83
|
+
isLoading: boolean;
|
|
84
|
+
} | {
|
|
85
|
+
error: null;
|
|
86
|
+
isError: false;
|
|
87
|
+
isPending: true;
|
|
88
|
+
isLoadingError: false;
|
|
89
|
+
isRefetchError: false;
|
|
90
|
+
isSuccess: false;
|
|
91
|
+
isPlaceholderData: false;
|
|
92
|
+
status: "pending";
|
|
93
|
+
dataUpdatedAt: number;
|
|
94
|
+
errorUpdatedAt: number;
|
|
95
|
+
failureCount: number;
|
|
96
|
+
failureReason: Error | null;
|
|
97
|
+
errorUpdateCount: number;
|
|
98
|
+
isFetched: boolean;
|
|
99
|
+
isFetchedAfterMount: boolean;
|
|
100
|
+
isFetching: boolean;
|
|
101
|
+
isInitialLoading: boolean;
|
|
102
|
+
isPaused: boolean;
|
|
103
|
+
isRefetching: boolean;
|
|
104
|
+
isStale: boolean;
|
|
105
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@getpara/stellar-sdk-v14-integration").ParaStellarSigner | null, Error>>;
|
|
106
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
107
|
+
promise: Promise<import("@getpara/stellar-sdk-v14-integration").ParaStellarSigner | null>;
|
|
108
|
+
stellarSigner: import("@getpara/stellar-sdk-v14-integration").ParaStellarSigner | null | undefined;
|
|
109
|
+
isLoading: boolean;
|
|
110
|
+
} | {
|
|
111
|
+
error: null;
|
|
112
|
+
isError: false;
|
|
113
|
+
isPending: true;
|
|
114
|
+
isLoadingError: false;
|
|
115
|
+
isRefetchError: false;
|
|
116
|
+
isSuccess: false;
|
|
117
|
+
isPlaceholderData: false;
|
|
118
|
+
status: "pending";
|
|
119
|
+
dataUpdatedAt: number;
|
|
120
|
+
errorUpdatedAt: number;
|
|
121
|
+
failureCount: number;
|
|
122
|
+
failureReason: Error | null;
|
|
123
|
+
errorUpdateCount: number;
|
|
124
|
+
isFetched: boolean;
|
|
125
|
+
isFetchedAfterMount: boolean;
|
|
126
|
+
isFetching: boolean;
|
|
127
|
+
isInitialLoading: boolean;
|
|
128
|
+
isPaused: boolean;
|
|
129
|
+
isRefetching: boolean;
|
|
130
|
+
isStale: boolean;
|
|
131
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@getpara/stellar-sdk-v14-integration").ParaStellarSigner | null, Error>>;
|
|
132
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
133
|
+
promise: Promise<import("@getpara/stellar-sdk-v14-integration").ParaStellarSigner | null>;
|
|
134
|
+
stellarSigner: import("@getpara/stellar-sdk-v14-integration").ParaStellarSigner | null | undefined;
|
|
135
|
+
isLoading: boolean;
|
|
136
|
+
} | {
|
|
137
|
+
isError: false;
|
|
138
|
+
error: null;
|
|
139
|
+
isPending: false;
|
|
140
|
+
isLoadingError: false;
|
|
141
|
+
isRefetchError: false;
|
|
142
|
+
isSuccess: true;
|
|
143
|
+
isPlaceholderData: true;
|
|
144
|
+
status: "success";
|
|
145
|
+
dataUpdatedAt: number;
|
|
146
|
+
errorUpdatedAt: number;
|
|
147
|
+
failureCount: number;
|
|
148
|
+
failureReason: Error | null;
|
|
149
|
+
errorUpdateCount: number;
|
|
150
|
+
isFetched: boolean;
|
|
151
|
+
isFetchedAfterMount: boolean;
|
|
152
|
+
isFetching: boolean;
|
|
153
|
+
isInitialLoading: boolean;
|
|
154
|
+
isPaused: boolean;
|
|
155
|
+
isRefetching: boolean;
|
|
156
|
+
isStale: boolean;
|
|
157
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@getpara/stellar-sdk-v14-integration").ParaStellarSigner | null, Error>>;
|
|
158
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
159
|
+
promise: Promise<import("@getpara/stellar-sdk-v14-integration").ParaStellarSigner | null>;
|
|
160
|
+
stellarSigner: import("@getpara/stellar-sdk-v14-integration").ParaStellarSigner | null | undefined;
|
|
161
|
+
isLoading: boolean;
|
|
162
|
+
};
|
|
163
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__async,
|
|
4
|
+
__objRest,
|
|
5
|
+
__spreadValues
|
|
6
|
+
} from "../../chunk-MMUBH76A.js";
|
|
7
|
+
import { useAccount, useClient, useWallet } from "@getpara/react-sdk-lite";
|
|
8
|
+
import { useQuery } from "@tanstack/react-query";
|
|
9
|
+
import { getStellarSigner } from "../actions/index.js";
|
|
10
|
+
const STELLAR_SIGNER_BASE_KEY = "PARA_STELLAR_SIGNER";
|
|
11
|
+
const useStellarSigner = ({ walletId, networkPassphrase } = {}) => {
|
|
12
|
+
const para = useClient();
|
|
13
|
+
const {
|
|
14
|
+
isConnected,
|
|
15
|
+
embedded: { userId }
|
|
16
|
+
} = useAccount();
|
|
17
|
+
const { data: wallet } = useWallet();
|
|
18
|
+
const _a = useQuery({
|
|
19
|
+
queryKey: [
|
|
20
|
+
STELLAR_SIGNER_BASE_KEY,
|
|
21
|
+
isConnected,
|
|
22
|
+
userId,
|
|
23
|
+
walletId != null ? walletId : (wallet == null ? void 0 : wallet.type) === "STELLAR" ? wallet == null ? void 0 : wallet.id : null,
|
|
24
|
+
networkPassphrase
|
|
25
|
+
],
|
|
26
|
+
enabled: isConnected && !!para,
|
|
27
|
+
queryFn: () => __async(void 0, null, function* () {
|
|
28
|
+
if (!isConnected || !para) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
const _id = walletId != null ? walletId : (wallet == null ? void 0 : wallet.type) === "STELLAR" ? wallet == null ? void 0 : wallet.id : void 0;
|
|
32
|
+
return yield getStellarSigner({ para, walletId: _id, networkPassphrase });
|
|
33
|
+
})
|
|
34
|
+
}), { data, isLoading } = _a, rest = __objRest(_a, ["data", "isLoading"]);
|
|
35
|
+
return __spreadValues({ stellarSigner: data, isLoading }, rest);
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
STELLAR_SIGNER_BASE_KEY,
|
|
39
|
+
useStellarSigner
|
|
40
|
+
};
|
package/package.json
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/react-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.20.0",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@getpara/aa-alchemy": "2.
|
|
6
|
-
"@getpara/aa-biconomy": "2.
|
|
7
|
-
"@getpara/aa-cdp": "2.
|
|
8
|
-
"@getpara/aa-gelato": "2.
|
|
9
|
-
"@getpara/aa-pimlico": "2.
|
|
10
|
-
"@getpara/aa-porto": "2.
|
|
11
|
-
"@getpara/aa-rhinestone": "2.
|
|
12
|
-
"@getpara/aa-safe": "2.
|
|
13
|
-
"@getpara/aa-thirdweb": "2.
|
|
14
|
-
"@getpara/aa-zerodev": "2.
|
|
15
|
-
"@getpara/cosmjs-v0-integration": "2.
|
|
16
|
-
"@getpara/cosmos-wallet-connectors": "2.
|
|
17
|
-
"@getpara/evm-wallet-connectors": "2.
|
|
18
|
-
"@getpara/react-sdk-lite": "2.
|
|
19
|
-
"@getpara/solana-signers-v2-integration": "2.
|
|
20
|
-
"@getpara/solana-wallet-connectors": "2.
|
|
21
|
-
"@getpara/
|
|
5
|
+
"@getpara/aa-alchemy": "2.20.0",
|
|
6
|
+
"@getpara/aa-biconomy": "2.20.0",
|
|
7
|
+
"@getpara/aa-cdp": "2.20.0",
|
|
8
|
+
"@getpara/aa-gelato": "2.20.0",
|
|
9
|
+
"@getpara/aa-pimlico": "2.20.0",
|
|
10
|
+
"@getpara/aa-porto": "2.20.0",
|
|
11
|
+
"@getpara/aa-rhinestone": "2.20.0",
|
|
12
|
+
"@getpara/aa-safe": "2.20.0",
|
|
13
|
+
"@getpara/aa-thirdweb": "2.20.0",
|
|
14
|
+
"@getpara/aa-zerodev": "2.20.0",
|
|
15
|
+
"@getpara/cosmjs-v0-integration": "2.20.0",
|
|
16
|
+
"@getpara/cosmos-wallet-connectors": "2.20.0",
|
|
17
|
+
"@getpara/evm-wallet-connectors": "2.20.0",
|
|
18
|
+
"@getpara/react-sdk-lite": "2.20.0",
|
|
19
|
+
"@getpara/solana-signers-v2-integration": "2.20.0",
|
|
20
|
+
"@getpara/solana-wallet-connectors": "2.20.0",
|
|
21
|
+
"@getpara/stellar-sdk-v14-integration": "2.20.0",
|
|
22
|
+
"@getpara/viem-v2-integration": "2.20.0"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
24
25
|
"@metamask/delegation-toolkit": "^0.11.0",
|
|
@@ -38,23 +39,16 @@
|
|
|
38
39
|
"./solana": "./dist/solana/index.js",
|
|
39
40
|
"./solana/hooks": "./dist/solana/hooks/index.js",
|
|
40
41
|
"./solana/actions": "./dist/solana/actions/index.js",
|
|
41
|
-
"./
|
|
42
|
-
"./
|
|
43
|
-
"./
|
|
44
|
-
"./aa/gelato": "./dist/aa/gelato/index.js",
|
|
45
|
-
"./aa/pimlico": "./dist/aa/pimlico/index.js",
|
|
46
|
-
"./aa/porto": "./dist/aa/porto/index.js",
|
|
47
|
-
"./aa/rhinestone": "./dist/aa/rhinestone/index.js",
|
|
48
|
-
"./aa/safe": "./dist/aa/safe/index.js",
|
|
49
|
-
"./aa/thirdweb": "./dist/aa/thirdweb/index.js",
|
|
50
|
-
"./aa/zerodev": "./dist/aa/zerodev/index.js"
|
|
42
|
+
"./stellar": "./dist/stellar/index.js",
|
|
43
|
+
"./stellar/hooks": "./dist/stellar/hooks/index.js",
|
|
44
|
+
"./stellar/actions": "./dist/stellar/actions/index.js"
|
|
51
45
|
},
|
|
52
46
|
"files": [
|
|
53
47
|
"dist",
|
|
54
48
|
"package.json",
|
|
55
49
|
"styles.css"
|
|
56
50
|
],
|
|
57
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "a8443bcc4018864f5e582f238ade1bb3b4e121f4",
|
|
58
52
|
"main": "dist/index.js",
|
|
59
53
|
"peerDependencies": {
|
|
60
54
|
"@tanstack/react-query": ">=5.0.0",
|
package/dist/aa/alchemy/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../../chunk-MMUBH76A.js";
|
|
3
|
-
export * from "@getpara/aa-biconomy";
|
|
4
|
-
import { useBiconomySmartAccount, BICONOMY_SMART_ACCOUNT_BASE_KEY } from "@getpara/react-sdk-lite";
|
|
5
|
-
export {
|
|
6
|
-
BICONOMY_SMART_ACCOUNT_BASE_KEY,
|
|
7
|
-
useBiconomySmartAccount
|
|
8
|
-
};
|
package/dist/aa/cdp/index.d.ts
DELETED
package/dist/aa/cdp/index.js
DELETED
package/dist/aa/gelato/index.js
DELETED
package/dist/aa/pimlico/index.js
DELETED
package/dist/aa/porto/index.d.ts
DELETED
package/dist/aa/porto/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../../chunk-MMUBH76A.js";
|
|
3
|
-
export * from "@getpara/aa-rhinestone";
|
|
4
|
-
import { useRhinestoneSmartAccount, RHINESTONE_SMART_ACCOUNT_BASE_KEY } from "@getpara/react-sdk-lite";
|
|
5
|
-
export {
|
|
6
|
-
RHINESTONE_SMART_ACCOUNT_BASE_KEY,
|
|
7
|
-
useRhinestoneSmartAccount
|
|
8
|
-
};
|
package/dist/aa/safe/index.d.ts
DELETED
package/dist/aa/safe/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../../chunk-MMUBH76A.js";
|
|
3
|
-
export * from "@getpara/aa-thirdweb";
|
|
4
|
-
import { useThirdwebSmartAccount, THIRDWEB_SMART_ACCOUNT_BASE_KEY } from "@getpara/react-sdk-lite";
|
|
5
|
-
export {
|
|
6
|
-
THIRDWEB_SMART_ACCOUNT_BASE_KEY,
|
|
7
|
-
useThirdwebSmartAccount
|
|
8
|
-
};
|
package/dist/aa/zerodev/index.js
DELETED