@turtleclub/hooks 0.5.0-beta.14 → 0.5.0-beta.16
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 +54 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +54 -34
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/v2/streams/schemas.ts +65 -39
package/dist/index.cjs
CHANGED
|
@@ -1052,12 +1052,13 @@ var import_query_key_factory10 = require("@lukemorales/query-key-factory");
|
|
|
1052
1052
|
// src/v2/streams/schemas.ts
|
|
1053
1053
|
var import_zod10 = require("zod");
|
|
1054
1054
|
var snapshotSchema = import_zod10.z.object({
|
|
1055
|
+
amountBase: import_zod10.z.string(),
|
|
1055
1056
|
amountDistributed: import_zod10.z.string(),
|
|
1056
1057
|
createdAt: import_zod10.z.string().datetime(),
|
|
1057
1058
|
rootHash: import_zod10.z.string().nullable(),
|
|
1058
1059
|
timestamp: import_zod10.z.string().datetime(),
|
|
1059
1060
|
updatedAt: import_zod10.z.string().datetime(),
|
|
1060
|
-
userCount: import_zod10.z.number().
|
|
1061
|
+
userCount: import_zod10.z.number().nullable()
|
|
1061
1062
|
});
|
|
1062
1063
|
var customArgsTokensPerUsdSchema = import_zod10.z.object({
|
|
1063
1064
|
tokensPerUSD: import_zod10.z.string(),
|
|
@@ -1069,25 +1070,52 @@ var customArgsAprSchema = import_zod10.z.object({
|
|
|
1069
1070
|
targetChainId: import_zod10.z.number(),
|
|
1070
1071
|
targetTokenAddress: import_zod10.z.string()
|
|
1071
1072
|
});
|
|
1072
|
-
var
|
|
1073
|
-
admin: import_zod10.z.string(),
|
|
1073
|
+
var chainSchema3 = import_zod10.z.object({
|
|
1074
1074
|
chainId: import_zod10.z.number(),
|
|
1075
|
-
|
|
1076
|
-
|
|
1075
|
+
ecosystem: import_zod10.z.string(),
|
|
1076
|
+
explorerUrl: import_zod10.z.string(),
|
|
1077
|
+
id: import_zod10.z.string().uuid(),
|
|
1078
|
+
isTestnet: import_zod10.z.boolean(),
|
|
1079
|
+
logoUrl: import_zod10.z.string(),
|
|
1080
|
+
name: import_zod10.z.string(),
|
|
1081
|
+
slug: import_zod10.z.string(),
|
|
1082
|
+
status: import_zod10.z.string()
|
|
1083
|
+
});
|
|
1084
|
+
var rewardTokenSchema = import_zod10.z.object({
|
|
1085
|
+
active: import_zod10.z.boolean(),
|
|
1086
|
+
address: import_zod10.z.string(),
|
|
1087
|
+
canonicalAssetId: import_zod10.z.string().uuid(),
|
|
1088
|
+
chain: chainSchema3,
|
|
1089
|
+
decimals: import_zod10.z.number(),
|
|
1090
|
+
id: import_zod10.z.string().uuid(),
|
|
1091
|
+
isNative: import_zod10.z.boolean(),
|
|
1092
|
+
logoUrl: import_zod10.z.string(),
|
|
1093
|
+
name: import_zod10.z.string(),
|
|
1094
|
+
priceUsd: import_zod10.z.number(),
|
|
1095
|
+
symbol: import_zod10.z.string(),
|
|
1096
|
+
streamsMinAmount: import_zod10.z.string().nullable().optional()
|
|
1097
|
+
}).nullable();
|
|
1098
|
+
var streamSchema = import_zod10.z.object({
|
|
1099
|
+
admin: import_zod10.z.string().nullable(),
|
|
1100
|
+
chainId: import_zod10.z.number().nullable(),
|
|
1101
|
+
chargedFee: import_zod10.z.string().nullable(),
|
|
1102
|
+
claimPaused: import_zod10.z.boolean(),
|
|
1103
|
+
contractAddress: import_zod10.z.string().nullable(),
|
|
1077
1104
|
createdAt: import_zod10.z.string().datetime(),
|
|
1105
|
+
creationConfirmedAt: import_zod10.z.string().datetime().nullable(),
|
|
1078
1106
|
customArgs: import_zod10.z.union([customArgsTokensPerUsdSchema, customArgsAprSchema]),
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
finalizationTimestamp: import_zod10.z.string().datetime(),
|
|
1107
|
+
endTimestamp: import_zod10.z.string().datetime().nullable(),
|
|
1108
|
+
hashCommitmentPaused: import_zod10.z.boolean(),
|
|
1082
1109
|
id: import_zod10.z.string().uuid(),
|
|
1083
|
-
isPaused: import_zod10.z.boolean(),
|
|
1084
1110
|
lastSnapshot: snapshotSchema.nullable(),
|
|
1111
|
+
merkleTreeComputationPaused: import_zod10.z.boolean(),
|
|
1085
1112
|
orgId: import_zod10.z.string().uuid(),
|
|
1086
|
-
rewardToken:
|
|
1113
|
+
rewardToken: rewardTokenSchema,
|
|
1114
|
+
snapshotComputationPaused: import_zod10.z.boolean(),
|
|
1087
1115
|
snapshots: import_zod10.z.array(snapshotSchema).optional(),
|
|
1088
1116
|
startTimestamp: import_zod10.z.string().datetime(),
|
|
1089
1117
|
strategy: import_zod10.z.string(),
|
|
1090
|
-
totalAmount: import_zod10.z.string(),
|
|
1118
|
+
totalAmount: import_zod10.z.string().nullable(),
|
|
1091
1119
|
type: import_zod10.z.number(),
|
|
1092
1120
|
updatedAt: import_zod10.z.string().datetime(),
|
|
1093
1121
|
userId: import_zod10.z.string().uuid()
|
|
@@ -1107,27 +1135,26 @@ var getStreamsSupportedChainsOutputSchema = import_zod10.z.object({
|
|
|
1107
1135
|
ecosystem: import_zod10.z.string(),
|
|
1108
1136
|
status: import_zod10.z.string(),
|
|
1109
1137
|
explorerUrl: import_zod10.z.string(),
|
|
1110
|
-
|
|
1138
|
+
streamFactory: import_zod10.z.string()
|
|
1111
1139
|
// Address as string
|
|
1112
1140
|
})
|
|
1113
1141
|
)
|
|
1114
1142
|
});
|
|
1115
1143
|
var streamSignatureRequestInputSchema = import_zod10.z.object({
|
|
1116
|
-
|
|
1117
|
-
chainId: import_zod10.z.number(),
|
|
1144
|
+
chainId: import_zod10.z.number().nullable(),
|
|
1118
1145
|
customArgs: import_zod10.z.intersection(
|
|
1119
1146
|
import_zod10.z.object({
|
|
1120
1147
|
targetChainId: import_zod10.z.number(),
|
|
1121
1148
|
targetTokenAddress: import_zod10.z.string()
|
|
1122
1149
|
}),
|
|
1123
|
-
import_zod10.z.union([import_zod10.z.object({
|
|
1150
|
+
import_zod10.z.union([import_zod10.z.object({ tokensPerUSD: import_zod10.z.string() }), import_zod10.z.object({ apr: import_zod10.z.string() })])
|
|
1124
1151
|
),
|
|
1125
|
-
endTimestamp: import_zod10.z.string(),
|
|
1126
|
-
|
|
1127
|
-
rewardToken: import_zod10.z.string(),
|
|
1152
|
+
endTimestamp: import_zod10.z.string().nullable(),
|
|
1153
|
+
rewardToken: import_zod10.z.string().nullable(),
|
|
1128
1154
|
startTimestamp: import_zod10.z.string(),
|
|
1129
|
-
totalAmount: import_zod10.z.string(),
|
|
1130
|
-
|
|
1155
|
+
totalAmount: import_zod10.z.string().nullable(),
|
|
1156
|
+
type: import_zod10.z.number(),
|
|
1157
|
+
walletAddress: import_zod10.z.string().nullable()
|
|
1131
1158
|
});
|
|
1132
1159
|
var streamSignatureRequestOutputSchema = import_zod10.z.object({
|
|
1133
1160
|
success: import_zod10.z.boolean(),
|
|
@@ -1136,23 +1163,16 @@ var streamSignatureRequestOutputSchema = import_zod10.z.object({
|
|
|
1136
1163
|
chainId: import_zod10.z.number(),
|
|
1137
1164
|
sender: import_zod10.z.string(),
|
|
1138
1165
|
params: import_zod10.z.object({
|
|
1166
|
+
deadline: import_zod10.z.number(),
|
|
1139
1167
|
params: import_zod10.z.object({
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
TotalAmount: import_zod10.z.number(),
|
|
1145
|
-
FeeBps: import_zod10.z.number(),
|
|
1146
|
-
StartTimestamp: import_zod10.z.number(),
|
|
1147
|
-
EndTimestamp: import_zod10.z.number(),
|
|
1148
|
-
FinalizationTimestamp: import_zod10.z.number(),
|
|
1149
|
-
CampaignData: import_zod10.z.string()
|
|
1168
|
+
streamId: import_zod10.z.string().uuid(),
|
|
1169
|
+
rewardToken: import_zod10.z.string(),
|
|
1170
|
+
netTotalAmount: import_zod10.z.string(),
|
|
1171
|
+
feeAmount: import_zod10.z.string()
|
|
1150
1172
|
}),
|
|
1151
|
-
signature: import_zod10.z.string()
|
|
1152
|
-
salt: import_zod10.z.string(),
|
|
1153
|
-
deadline: import_zod10.z.number()
|
|
1173
|
+
signature: import_zod10.z.string()
|
|
1154
1174
|
})
|
|
1155
|
-
})
|
|
1175
|
+
}).nullable()
|
|
1156
1176
|
});
|
|
1157
1177
|
var getStreamsQuerySchema = import_zod10.z.object({
|
|
1158
1178
|
streamId: import_zod10.z.string().optional(),
|