@turtleclub/hooks 0.5.0-beta.35 → 0.5.0-beta.36
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.cjs +9 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -13
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/v2/streams/api.ts +1 -1
- package/src/v2/streams/hooks.ts +1 -22
- package/src/v2/streams/schemas.ts +9 -0
package/dist/index.cjs
CHANGED
|
@@ -182,7 +182,6 @@ __export(index_exports, {
|
|
|
182
182
|
usePortfolioBalance: () => usePortfolioBalance,
|
|
183
183
|
useProduct: () => useProduct,
|
|
184
184
|
useProducts: () => useProducts,
|
|
185
|
-
useRequestStreamSignature: () => useRequestStreamSignature,
|
|
186
185
|
useStreamSupportedChains: () => useStreamSupportedChains,
|
|
187
186
|
useStreamWalletDetails: () => useStreamWalletDetails,
|
|
188
187
|
useStreamWallets: () => useStreamWallets,
|
|
@@ -1290,7 +1289,14 @@ var rewardTokenSchema = import_zod10.z.object({
|
|
|
1290
1289
|
symbol: import_zod10.z.string(),
|
|
1291
1290
|
streamsMinAmount: import_zod10.z.string().nullable().optional()
|
|
1292
1291
|
}).nullable();
|
|
1292
|
+
var adaptersSchema = import_zod10.z.array(
|
|
1293
|
+
import_zod10.z.object({
|
|
1294
|
+
type: import_zod10.z.string(),
|
|
1295
|
+
params: import_zod10.z.record(import_zod10.z.string(), import_zod10.z.number())
|
|
1296
|
+
})
|
|
1297
|
+
);
|
|
1293
1298
|
var streamSchema = import_zod10.z.object({
|
|
1299
|
+
adapters: adaptersSchema,
|
|
1294
1300
|
admin: import_zod10.z.string().nullable(),
|
|
1295
1301
|
chainId: import_zod10.z.number().nullable(),
|
|
1296
1302
|
chargedFee: import_zod10.z.string().nullable(),
|
|
@@ -1336,6 +1342,7 @@ var getStreamsSupportedChainsOutputSchema = import_zod10.z.object({
|
|
|
1336
1342
|
)
|
|
1337
1343
|
});
|
|
1338
1344
|
var streamSignatureRequestInputSchema = import_zod10.z.object({
|
|
1345
|
+
adapters: adaptersSchema,
|
|
1339
1346
|
chainId: import_zod10.z.number().nullable(),
|
|
1340
1347
|
customArgs: import_zod10.z.intersection(
|
|
1341
1348
|
import_zod10.z.object({
|
|
@@ -1474,7 +1481,7 @@ async function getStreamsSupportedChains() {
|
|
|
1474
1481
|
return result.data.chains;
|
|
1475
1482
|
}
|
|
1476
1483
|
async function requestStreamSignature(organizationId, input) {
|
|
1477
|
-
const endpoint = `/streams/
|
|
1484
|
+
const endpoint = `/streams/create/${organizationId}`;
|
|
1478
1485
|
const data = await apiClient.fetch(endpoint, {
|
|
1479
1486
|
method: "POST",
|
|
1480
1487
|
body: input
|
|
@@ -2622,14 +2629,6 @@ function useStreamSupportedChains({
|
|
|
2622
2629
|
} = {}) {
|
|
2623
2630
|
return (0, import_react_query14.useQuery)(createQueryOptions(streamsQueries.supportedChains, options));
|
|
2624
2631
|
}
|
|
2625
|
-
function useRequestStreamSignature({
|
|
2626
|
-
options
|
|
2627
|
-
} = {}) {
|
|
2628
|
-
return (0, import_react_query14.useMutation)({
|
|
2629
|
-
mutationFn: ({ organizationId, data }) => requestStreamSignature(organizationId, data),
|
|
2630
|
-
...options
|
|
2631
|
-
});
|
|
2632
|
-
}
|
|
2633
2632
|
|
|
2634
2633
|
// src/v2/swap/useSwapRoute.ts
|
|
2635
2634
|
var import_react8 = require("react");
|
|
@@ -2996,7 +2995,6 @@ var queries = (0, import_query_key_factory16.mergeQueryKeys)(
|
|
|
2996
2995
|
usePortfolioBalance,
|
|
2997
2996
|
useProduct,
|
|
2998
2997
|
useProducts,
|
|
2999
|
-
useRequestStreamSignature,
|
|
3000
2998
|
useStreamSupportedChains,
|
|
3001
2999
|
useStreamWalletDetails,
|
|
3002
3000
|
useStreamWallets,
|