@xyo-network/xl1-rpc 1.16.0 → 1.16.1
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/neutral/engine/rpcMethodHandlersFromNetworkStakingStepRewardsByPositionViewer.d.ts +2 -2
- package/dist/neutral/engine/rpcMethodHandlersFromNetworkStakingStepRewardsByPositionViewer.d.ts.map +1 -1
- package/dist/neutral/index.mjs +573 -796
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/provider/connection/HttpRpcXyoConnection.d.ts +2 -2
- package/dist/neutral/provider/connection/HttpRpcXyoConnection.d.ts.map +1 -1
- package/dist/neutral/provider/connection/XyoBaseConnection.d.ts +3 -3
- package/dist/neutral/provider/connection/XyoBaseConnection.d.ts.map +1 -1
- package/dist/neutral/provider/datalake/JsonRpcDataLakeViewer.d.ts +7 -0
- package/dist/neutral/provider/datalake/JsonRpcDataLakeViewer.d.ts.map +1 -0
- package/dist/neutral/provider/datalake/JsonRpcDataLakeViewerMethods.d.ts +10 -0
- package/dist/neutral/provider/datalake/JsonRpcDataLakeViewerMethods.d.ts.map +1 -0
- package/dist/neutral/provider/datalake/index.d.ts +2 -3
- package/dist/neutral/provider/datalake/index.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakeViewer/JsonRpcNetworkStakeViewer.d.ts +3 -3
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakeViewer/JsonRpcNetworkStakeViewer.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakingStepRewardsByPositionViewer/JsonRpcNetworkStakingStepRewardsByPositionViewer.d.ts +2 -2
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakingStepRewardsByPositionViewer/JsonRpcNetworkStakingStepRewardsByPositionViewer.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakingStepRewardsByPositionViewer/JsonRpcNetworkStakingStepRewardsByPositionViewerMethods.d.ts +7 -7
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakingStepRewardsByPositionViewer/JsonRpcNetworkStakingStepRewardsByPositionViewerMethods.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakingStepRewardsByStakerViewer/JsonRpcNetworkStakingStepRewardsByStakerViewer.d.ts +2 -2
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakingStepRewardsByStakerViewer/JsonRpcNetworkStakingStepRewardsByStakerViewer.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakingStepRewardsByStakerViewer/JsonRpcNetworkStakingStepRewardsByStakerViewerMethods.d.ts +7 -7
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakingStepRewardsByStakerViewer/JsonRpcNetworkStakingStepRewardsByStakerViewerMethods.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakingStepRewardsByStepViewer/JsonRpcNetworkStakingStepRewardsByStepViewer.d.ts +2 -2
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakingStepRewardsByStepViewer/JsonRpcNetworkStakingStepRewardsByStepViewer.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakingStepRewardsByStepViewer/JsonRpcNetworkStakingStepRewardsByStepViewerMethods.d.ts +7 -7
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakingStepRewardsByStepViewer/JsonRpcNetworkStakingStepRewardsByStepViewerMethods.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakingStepRewardsTotalViewer/JsonRpcNetworkStakingStepRewardsTotalViewer.d.ts +2 -2
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakingStepRewardsTotalViewer/JsonRpcNetworkStakingStepRewardsTotalViewer.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakingStepRewardsTotalViewer/JsonRpcNetworkStakingStepRewardsTotalViewerMethods.d.ts +7 -7
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakingStepRewardsTotalViewer/JsonRpcNetworkStakingStepRewardsTotalViewerMethods.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakingStepRewardsViewer/JsonRpcNetworkStakingStepRewardsViewer.d.ts +14 -11
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakingStepRewardsViewer/JsonRpcNetworkStakingStepRewardsViewer.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakingStepRewardsViewer/JsonRpcNetworkStakingStepRewardsViewerMethods.d.ts +2 -2
- package/dist/neutral/provider/viewer/JsonRpcNetworkStakingStepRewardsViewer/JsonRpcNetworkStakingStepRewardsViewerMethods.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcXyoViewer.d.ts +6 -3
- package/dist/neutral/provider/viewer/JsonRpcXyoViewer.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/index.d.ts +1 -0
- package/dist/neutral/provider/viewer/index.d.ts.map +1 -1
- package/dist/neutral/types/NetworkStakingStepRewardsByPositionViewerRpc.d.ts +3 -3
- package/dist/neutral/types/NetworkStakingStepRewardsByPositionViewerRpc.d.ts.map +1 -1
- package/dist/neutral/types/NetworkStakingStepRewardsByStakerViewerRpc.d.ts +3 -3
- package/dist/neutral/types/NetworkStakingStepRewardsByStakerViewerRpc.d.ts.map +1 -1
- package/dist/neutral/types/NetworkStakingStepRewardsByStepViewerRpc.d.ts +3 -3
- package/dist/neutral/types/NetworkStakingStepRewardsByStepViewerRpc.d.ts.map +1 -1
- package/dist/neutral/types/NetworkStakingStepRewardsTotalViewerRpc.d.ts +3 -3
- package/dist/neutral/types/NetworkStakingStepRewardsTotalViewerRpc.d.ts.map +1 -1
- package/dist/neutral/types/NetworkStakingStepRewardsViewerRpc.d.ts +3 -3
- package/dist/neutral/types/NetworkStakingStepRewardsViewerRpc.d.ts.map +1 -1
- package/dist/neutral/types/XyoDataLakeViewerRpc.d.ts +10 -0
- package/dist/neutral/types/XyoDataLakeViewerRpc.d.ts.map +1 -0
- package/dist/neutral/types/schema/DataLakeViewerRpcSchema.d.ts +74 -0
- package/dist/neutral/types/schema/DataLakeViewerRpcSchema.d.ts.map +1 -0
- package/dist/neutral/types/schema/common/ArrayBuffer.d.ts +4 -0
- package/dist/neutral/types/schema/common/ArrayBuffer.d.ts.map +1 -0
- package/dist/neutral/types/schema/common/index.d.ts +1 -0
- package/dist/neutral/types/schema/common/index.d.ts.map +1 -1
- package/dist/neutral/types/schema/index.d.ts +1 -0
- package/dist/neutral/types/schema/index.d.ts.map +1 -1
- package/dist/node/engine/rpcMethodHandlersFromNetworkStakingStepRewardsByPositionViewer.d.ts +2 -2
- package/dist/node/engine/rpcMethodHandlersFromNetworkStakingStepRewardsByPositionViewer.d.ts.map +1 -1
- package/dist/node/index-node.mjs +573 -796
- package/dist/node/index-node.mjs.map +1 -1
- package/dist/node/provider/connection/HttpRpcXyoConnection.d.ts +2 -2
- package/dist/node/provider/connection/HttpRpcXyoConnection.d.ts.map +1 -1
- package/dist/node/provider/connection/XyoBaseConnection.d.ts +3 -3
- package/dist/node/provider/connection/XyoBaseConnection.d.ts.map +1 -1
- package/dist/node/provider/datalake/JsonRpcDataLakeViewer.d.ts +7 -0
- package/dist/node/provider/datalake/JsonRpcDataLakeViewer.d.ts.map +1 -0
- package/dist/node/provider/datalake/JsonRpcDataLakeViewerMethods.d.ts +10 -0
- package/dist/node/provider/datalake/JsonRpcDataLakeViewerMethods.d.ts.map +1 -0
- package/dist/node/provider/datalake/index.d.ts +2 -3
- package/dist/node/provider/datalake/index.d.ts.map +1 -1
- package/dist/node/provider/viewer/JsonRpcNetworkStakeViewer/JsonRpcNetworkStakeViewer.d.ts +3 -3
- package/dist/node/provider/viewer/JsonRpcNetworkStakeViewer/JsonRpcNetworkStakeViewer.d.ts.map +1 -1
- package/dist/node/provider/viewer/JsonRpcNetworkStakingStepRewardsByPositionViewer/JsonRpcNetworkStakingStepRewardsByPositionViewer.d.ts +2 -2
- package/dist/node/provider/viewer/JsonRpcNetworkStakingStepRewardsByPositionViewer/JsonRpcNetworkStakingStepRewardsByPositionViewer.d.ts.map +1 -1
- package/dist/node/provider/viewer/JsonRpcNetworkStakingStepRewardsByPositionViewer/JsonRpcNetworkStakingStepRewardsByPositionViewerMethods.d.ts +7 -7
- package/dist/node/provider/viewer/JsonRpcNetworkStakingStepRewardsByPositionViewer/JsonRpcNetworkStakingStepRewardsByPositionViewerMethods.d.ts.map +1 -1
- package/dist/node/provider/viewer/JsonRpcNetworkStakingStepRewardsByStakerViewer/JsonRpcNetworkStakingStepRewardsByStakerViewer.d.ts +2 -2
- package/dist/node/provider/viewer/JsonRpcNetworkStakingStepRewardsByStakerViewer/JsonRpcNetworkStakingStepRewardsByStakerViewer.d.ts.map +1 -1
- package/dist/node/provider/viewer/JsonRpcNetworkStakingStepRewardsByStakerViewer/JsonRpcNetworkStakingStepRewardsByStakerViewerMethods.d.ts +7 -7
- package/dist/node/provider/viewer/JsonRpcNetworkStakingStepRewardsByStakerViewer/JsonRpcNetworkStakingStepRewardsByStakerViewerMethods.d.ts.map +1 -1
- package/dist/node/provider/viewer/JsonRpcNetworkStakingStepRewardsByStepViewer/JsonRpcNetworkStakingStepRewardsByStepViewer.d.ts +2 -2
- package/dist/node/provider/viewer/JsonRpcNetworkStakingStepRewardsByStepViewer/JsonRpcNetworkStakingStepRewardsByStepViewer.d.ts.map +1 -1
- package/dist/node/provider/viewer/JsonRpcNetworkStakingStepRewardsByStepViewer/JsonRpcNetworkStakingStepRewardsByStepViewerMethods.d.ts +7 -7
- package/dist/node/provider/viewer/JsonRpcNetworkStakingStepRewardsByStepViewer/JsonRpcNetworkStakingStepRewardsByStepViewerMethods.d.ts.map +1 -1
- package/dist/node/provider/viewer/JsonRpcNetworkStakingStepRewardsTotalViewer/JsonRpcNetworkStakingStepRewardsTotalViewer.d.ts +2 -2
- package/dist/node/provider/viewer/JsonRpcNetworkStakingStepRewardsTotalViewer/JsonRpcNetworkStakingStepRewardsTotalViewer.d.ts.map +1 -1
- package/dist/node/provider/viewer/JsonRpcNetworkStakingStepRewardsTotalViewer/JsonRpcNetworkStakingStepRewardsTotalViewerMethods.d.ts +7 -7
- package/dist/node/provider/viewer/JsonRpcNetworkStakingStepRewardsTotalViewer/JsonRpcNetworkStakingStepRewardsTotalViewerMethods.d.ts.map +1 -1
- package/dist/node/provider/viewer/JsonRpcNetworkStakingStepRewardsViewer/JsonRpcNetworkStakingStepRewardsViewer.d.ts +14 -11
- package/dist/node/provider/viewer/JsonRpcNetworkStakingStepRewardsViewer/JsonRpcNetworkStakingStepRewardsViewer.d.ts.map +1 -1
- package/dist/node/provider/viewer/JsonRpcNetworkStakingStepRewardsViewer/JsonRpcNetworkStakingStepRewardsViewerMethods.d.ts +2 -2
- package/dist/node/provider/viewer/JsonRpcNetworkStakingStepRewardsViewer/JsonRpcNetworkStakingStepRewardsViewerMethods.d.ts.map +1 -1
- package/dist/node/provider/viewer/JsonRpcXyoViewer.d.ts +6 -3
- package/dist/node/provider/viewer/JsonRpcXyoViewer.d.ts.map +1 -1
- package/dist/node/provider/viewer/index.d.ts +1 -0
- package/dist/node/provider/viewer/index.d.ts.map +1 -1
- package/dist/node/types/NetworkStakingStepRewardsByPositionViewerRpc.d.ts +3 -3
- package/dist/node/types/NetworkStakingStepRewardsByPositionViewerRpc.d.ts.map +1 -1
- package/dist/node/types/NetworkStakingStepRewardsByStakerViewerRpc.d.ts +3 -3
- package/dist/node/types/NetworkStakingStepRewardsByStakerViewerRpc.d.ts.map +1 -1
- package/dist/node/types/NetworkStakingStepRewardsByStepViewerRpc.d.ts +3 -3
- package/dist/node/types/NetworkStakingStepRewardsByStepViewerRpc.d.ts.map +1 -1
- package/dist/node/types/NetworkStakingStepRewardsTotalViewerRpc.d.ts +3 -3
- package/dist/node/types/NetworkStakingStepRewardsTotalViewerRpc.d.ts.map +1 -1
- package/dist/node/types/NetworkStakingStepRewardsViewerRpc.d.ts +3 -3
- package/dist/node/types/NetworkStakingStepRewardsViewerRpc.d.ts.map +1 -1
- package/dist/node/types/XyoDataLakeViewerRpc.d.ts +10 -0
- package/dist/node/types/XyoDataLakeViewerRpc.d.ts.map +1 -0
- package/dist/node/types/schema/DataLakeViewerRpcSchema.d.ts +74 -0
- package/dist/node/types/schema/DataLakeViewerRpcSchema.d.ts.map +1 -0
- package/dist/node/types/schema/common/ArrayBuffer.d.ts +4 -0
- package/dist/node/types/schema/common/ArrayBuffer.d.ts.map +1 -0
- package/dist/node/types/schema/common/index.d.ts +1 -0
- package/dist/node/types/schema/common/index.d.ts.map +1 -1
- package/dist/node/types/schema/index.d.ts +1 -0
- package/dist/node/types/schema/index.d.ts.map +1 -1
- package/package.json +15 -15
- package/src/engine/rpcMethodHandlersFromNetworkStakingStepRewardsByPositionViewer.ts +2 -2
- package/src/provider/connection/HttpRpcXyoConnection.ts +4 -6
- package/src/provider/connection/XyoBaseConnection.ts +4 -4
- package/src/provider/connection/spec/XyoConnection.spec.ts +1 -1
- package/src/provider/datalake/JsonRpcDataLakeViewer.ts +10 -0
- package/src/provider/datalake/JsonRpcDataLakeViewerMethods.ts +19 -0
- package/src/provider/datalake/index.ts +2 -3
- package/src/provider/viewer/JsonRpcNetworkStakeViewer/JsonRpcNetworkStakeViewer.ts +3 -3
- package/src/provider/viewer/JsonRpcNetworkStakingStepRewardsByPositionViewer/JsonRpcNetworkStakingStepRewardsByPositionViewer.ts +2 -2
- package/src/provider/viewer/JsonRpcNetworkStakingStepRewardsByPositionViewer/JsonRpcNetworkStakingStepRewardsByPositionViewerMethods.ts +7 -7
- package/src/provider/viewer/JsonRpcNetworkStakingStepRewardsByStakerViewer/JsonRpcNetworkStakingStepRewardsByStakerViewer.ts +3 -2
- package/src/provider/viewer/JsonRpcNetworkStakingStepRewardsByStakerViewer/JsonRpcNetworkStakingStepRewardsByStakerViewerMethods.ts +7 -7
- package/src/provider/viewer/JsonRpcNetworkStakingStepRewardsByStepViewer/JsonRpcNetworkStakingStepRewardsByStepViewer.ts +3 -2
- package/src/provider/viewer/JsonRpcNetworkStakingStepRewardsByStepViewer/JsonRpcNetworkStakingStepRewardsByStepViewerMethods.ts +7 -7
- package/src/provider/viewer/JsonRpcNetworkStakingStepRewardsTotalViewer/JsonRpcNetworkStakingStepRewardsTotalViewer.ts +3 -2
- package/src/provider/viewer/JsonRpcNetworkStakingStepRewardsTotalViewer/JsonRpcNetworkStakingStepRewardsTotalViewerMethods.ts +7 -7
- package/src/provider/viewer/JsonRpcNetworkStakingStepRewardsViewer/JsonRpcNetworkStakingStepRewardsViewer.ts +21 -23
- package/src/provider/viewer/JsonRpcNetworkStakingStepRewardsViewer/JsonRpcNetworkStakingStepRewardsViewerMethods.ts +2 -2
- package/src/provider/viewer/JsonRpcXyoViewer.ts +10 -5
- package/src/provider/viewer/index.ts +1 -0
- package/src/provider/viewer/spec/JsonRpcXyoViewer.spec.ts +1 -1
- package/src/types/NetworkStakingStepRewardsByPositionViewerRpc.ts +4 -4
- package/src/types/NetworkStakingStepRewardsByStakerViewerRpc.ts +4 -4
- package/src/types/NetworkStakingStepRewardsByStepViewerRpc.ts +4 -4
- package/src/types/NetworkStakingStepRewardsTotalViewerRpc.ts +4 -4
- package/src/types/NetworkStakingStepRewardsViewerRpc.ts +4 -4
- package/src/types/XyoDataLakeViewerRpc.ts +16 -0
- package/src/types/schema/DataLakeViewerRpcSchema.ts +41 -0
- package/src/types/schema/common/ArrayBuffer.ts +42 -0
- package/src/types/schema/common/index.ts +1 -0
- package/src/types/schema/index.ts +1 -0
- package/dist/neutral/provider/datalake/AbstractXyoDataLake.d.ts +0 -10
- package/dist/neutral/provider/datalake/AbstractXyoDataLake.d.ts.map +0 -1
- package/dist/neutral/provider/datalake/ArchivistXyoDataLake.d.ts +0 -11
- package/dist/neutral/provider/datalake/ArchivistXyoDataLake.d.ts.map +0 -1
- package/dist/neutral/provider/datalake/HttpXyoDataLake.d.ts +0 -20
- package/dist/neutral/provider/datalake/HttpXyoDataLake.d.ts.map +0 -1
- package/dist/neutral/provider/datalake/spec/HttpXyoDataLake.spec.d.ts +0 -2
- package/dist/neutral/provider/datalake/spec/HttpXyoDataLake.spec.d.ts.map +0 -1
- package/dist/node/provider/datalake/AbstractXyoDataLake.d.ts +0 -10
- package/dist/node/provider/datalake/AbstractXyoDataLake.d.ts.map +0 -1
- package/dist/node/provider/datalake/ArchivistXyoDataLake.d.ts +0 -11
- package/dist/node/provider/datalake/ArchivistXyoDataLake.d.ts.map +0 -1
- package/dist/node/provider/datalake/HttpXyoDataLake.d.ts +0 -20
- package/dist/node/provider/datalake/HttpXyoDataLake.d.ts.map +0 -1
- package/dist/node/provider/datalake/spec/HttpXyoDataLake.spec.d.ts +0 -2
- package/dist/node/provider/datalake/spec/HttpXyoDataLake.spec.d.ts.map +0 -1
- package/src/provider/datalake/AbstractXyoDataLake.ts +0 -38
- package/src/provider/datalake/ArchivistXyoDataLake.ts +0 -26
- package/src/provider/datalake/HttpXyoDataLake.ts +0 -116
- package/src/provider/datalake/spec/HttpXyoDataLake.spec.ts +0 -161
package/dist/node/index-node.mjs
CHANGED
|
@@ -164,57 +164,90 @@ var NetworkStakingStepRewardsViewerRpcNamespace = "networkStakingStepRewardsView
|
|
|
164
164
|
|
|
165
165
|
// src/types/schema/NetworkStakeViewerRpcSchemas.ts
|
|
166
166
|
import { BigIntToJsonZod as BigIntToJsonZod2, JsonToBigIntZod as JsonToBigIntZod2 } from "@xylabs/hex";
|
|
167
|
-
import * as
|
|
167
|
+
import * as z20 from "zod";
|
|
168
168
|
|
|
169
169
|
// src/types/schema/common/Address.ts
|
|
170
170
|
import { AddressRegEx, toAddress } from "@xylabs/hex";
|
|
171
171
|
import * as z from "zod";
|
|
172
172
|
var AddressZod = z.string().toLowerCase().regex(AddressRegEx).transform((v) => toAddress(v));
|
|
173
173
|
|
|
174
|
+
// src/types/schema/common/ArrayBuffer.ts
|
|
175
|
+
import * as z2 from "zod";
|
|
176
|
+
function base64Encode(u8) {
|
|
177
|
+
if (typeof Buffer !== "undefined" && typeof Buffer.from === "function") {
|
|
178
|
+
return Buffer.from(u8).toString("base64");
|
|
179
|
+
}
|
|
180
|
+
let binary = "";
|
|
181
|
+
const chunk = 32768;
|
|
182
|
+
for (let i = 0; i < u8.length; i += chunk) {
|
|
183
|
+
binary += String.fromCharCode(...u8.subarray(i, i + chunk));
|
|
184
|
+
}
|
|
185
|
+
return btoa(binary);
|
|
186
|
+
}
|
|
187
|
+
__name(base64Encode, "base64Encode");
|
|
188
|
+
function base64Decode(b64) {
|
|
189
|
+
if (typeof Buffer !== "undefined" && typeof Buffer.from === "function") {
|
|
190
|
+
return new Uint8Array(Buffer.from(b64, "base64"));
|
|
191
|
+
}
|
|
192
|
+
const binary = atob(b64);
|
|
193
|
+
const u8 = new Uint8Array(binary.length);
|
|
194
|
+
for (let i = 0; i < binary.length; i++) u8[i] = binary.charCodeAt(i);
|
|
195
|
+
return u8;
|
|
196
|
+
}
|
|
197
|
+
__name(base64Decode, "base64Decode");
|
|
198
|
+
var ArrayBufferToJsonZod = z2.instanceof(ArrayBuffer).transform((x) => {
|
|
199
|
+
const u8 = new Uint8Array(x);
|
|
200
|
+
return base64Encode(u8);
|
|
201
|
+
});
|
|
202
|
+
var JsonToArrayBufferZod = z2.string().transform((x) => {
|
|
203
|
+
const u8 = base64Decode(x);
|
|
204
|
+
return u8.buffer;
|
|
205
|
+
});
|
|
206
|
+
|
|
174
207
|
// src/types/schema/common/BlockBoundWitness.ts
|
|
175
208
|
import { asXL1BlockNumber } from "@xyo-network/xl1-protocol";
|
|
176
|
-
import * as
|
|
209
|
+
import * as z7 from "zod";
|
|
177
210
|
|
|
178
211
|
// src/types/schema/common/BoundWitness.ts
|
|
179
212
|
import { HashZod, HexZod } from "@xylabs/hex";
|
|
180
213
|
import { BoundWitnessSchema } from "@xyo-network/boundwitness-model";
|
|
181
|
-
import * as
|
|
214
|
+
import * as z5 from "zod";
|
|
182
215
|
|
|
183
216
|
// src/types/schema/common/Payload.ts
|
|
184
217
|
import { HashToJsonZod } from "@xylabs/hex";
|
|
185
|
-
import * as
|
|
218
|
+
import * as z4 from "zod";
|
|
186
219
|
|
|
187
220
|
// src/types/schema/common/Sequence.ts
|
|
188
221
|
import { HexRegExMinMax, toHex } from "@xylabs/hex";
|
|
189
222
|
import { SequenceConstants } from "@xyo-network/payload-model";
|
|
190
|
-
import * as
|
|
223
|
+
import * as z3 from "zod";
|
|
191
224
|
var LocalSequenceRegex = new RegExp(HexRegExMinMax(SequenceConstants.localSequenceBytes, SequenceConstants.localSequenceBytes));
|
|
192
|
-
var LocalSequenceToStringZod =
|
|
193
|
-
var LocalSequenceFromStringZod =
|
|
225
|
+
var LocalSequenceToStringZod = z3.string().regex(LocalSequenceRegex);
|
|
226
|
+
var LocalSequenceFromStringZod = z3.string().regex(LocalSequenceRegex).transform((v) => toHex(v));
|
|
194
227
|
var QualifiedSequenceRegex = new RegExp(HexRegExMinMax(SequenceConstants.qualifiedSequenceBytes, SequenceConstants.qualifiedSequenceBytes));
|
|
195
|
-
var QualifiedSequenceToStringZod =
|
|
196
|
-
var QualifiedSequenceFromStringZod =
|
|
197
|
-
var SequenceToStringZod =
|
|
228
|
+
var QualifiedSequenceToStringZod = z3.string().regex(QualifiedSequenceRegex);
|
|
229
|
+
var QualifiedSequenceFromStringZod = z3.string().regex(QualifiedSequenceRegex).transform((v) => toHex(v));
|
|
230
|
+
var SequenceToStringZod = z3.union([
|
|
198
231
|
LocalSequenceToStringZod,
|
|
199
232
|
QualifiedSequenceToStringZod
|
|
200
233
|
]);
|
|
201
|
-
var SequenceFromStringZod =
|
|
234
|
+
var SequenceFromStringZod = z3.union([
|
|
202
235
|
LocalSequenceFromStringZod,
|
|
203
236
|
QualifiedSequenceFromStringZod
|
|
204
237
|
]);
|
|
205
238
|
|
|
206
239
|
// src/types/schema/common/Payload.ts
|
|
207
|
-
var StorageMetaZod =
|
|
240
|
+
var StorageMetaZod = z4.object({
|
|
208
241
|
_hash: HashToJsonZod,
|
|
209
242
|
_dataHash: HashToJsonZod,
|
|
210
243
|
_sequence: SequenceToStringZod
|
|
211
244
|
});
|
|
212
|
-
var SchemaZod =
|
|
213
|
-
var PayloadZod =
|
|
245
|
+
var SchemaZod = z4.string();
|
|
246
|
+
var PayloadZod = z4.object({
|
|
214
247
|
schema: SchemaZod
|
|
215
|
-
}).catchall(
|
|
248
|
+
}).catchall(z4.any());
|
|
216
249
|
var PayloadWithStorageMetaZod = PayloadZod.extend(StorageMetaZod.shape);
|
|
217
|
-
var AnyPayloadZod = PayloadZod.catchall(
|
|
250
|
+
var AnyPayloadZod = PayloadZod.catchall(z4.json());
|
|
218
251
|
var AnyPayloadWithStorageMetaZod = AnyPayloadZod.extend(StorageMetaZod.shape);
|
|
219
252
|
function WithStorageMetaZod(valueZod) {
|
|
220
253
|
return StorageMetaZod.extend(valueZod.shape);
|
|
@@ -222,57 +255,57 @@ function WithStorageMetaZod(valueZod) {
|
|
|
222
255
|
__name(WithStorageMetaZod, "WithStorageMetaZod");
|
|
223
256
|
|
|
224
257
|
// src/types/schema/common/BoundWitness.ts
|
|
225
|
-
var BoundWitnessRequiredFieldsZod =
|
|
226
|
-
addresses:
|
|
227
|
-
payload_hashes:
|
|
228
|
-
payload_schemas:
|
|
229
|
-
previous_hashes:
|
|
258
|
+
var BoundWitnessRequiredFieldsZod = z5.object({
|
|
259
|
+
addresses: z5.array(AddressZod),
|
|
260
|
+
payload_hashes: z5.array(HashZod),
|
|
261
|
+
payload_schemas: z5.array(SchemaZod),
|
|
262
|
+
previous_hashes: z5.array(HashZod.nullable())
|
|
230
263
|
});
|
|
231
|
-
var BoundWitnessMetaZod =
|
|
264
|
+
var BoundWitnessMetaZod = z5.object({
|
|
232
265
|
$destination: AddressZod.optional(),
|
|
233
266
|
$sourceQuery: HashZod.optional(),
|
|
234
|
-
$signatures:
|
|
267
|
+
$signatures: z5.array(z5.union([
|
|
235
268
|
HexZod,
|
|
236
|
-
|
|
269
|
+
z5.null()
|
|
237
270
|
]))
|
|
238
271
|
});
|
|
239
272
|
var BoundWitnessZod = PayloadZod.extend({
|
|
240
|
-
schema:
|
|
273
|
+
schema: z5.literal(BoundWitnessSchema)
|
|
241
274
|
}).extend(BoundWitnessRequiredFieldsZod.shape).extend(BoundWitnessMetaZod.shape).refine((data) => data.$signatures.length === data.addresses.length, {
|
|
242
275
|
message: "$signatures length must equal addresses length"
|
|
243
276
|
});
|
|
244
|
-
var AnyBoundWitnessZod = BoundWitnessZod.catchall(
|
|
277
|
+
var AnyBoundWitnessZod = BoundWitnessZod.catchall(z5.any());
|
|
245
278
|
var UnsignedBoundWitnessZod = BoundWitnessZod.refine((data) => data.$signatures.includes(null), {
|
|
246
279
|
message: "all $signatures must be null"
|
|
247
280
|
});
|
|
248
|
-
var AnyUnsignedBoundWitnessZod = UnsignedBoundWitnessZod.catchall(
|
|
281
|
+
var AnyUnsignedBoundWitnessZod = UnsignedBoundWitnessZod.catchall(z5.any());
|
|
249
282
|
var UnsignedBoundWitnessWithStorageMetaZod = UnsignedBoundWitnessZod.safeExtend(BoundWitnessRequiredFieldsZod.shape).safeExtend(BoundWitnessMetaZod.shape).safeExtend(StorageMetaZod.shape);
|
|
250
283
|
var SignedBoundWitnessZod = BoundWitnessZod.refine((data) => !data.$signatures.includes(null), {
|
|
251
284
|
message: "all $signatures must not be null"
|
|
252
285
|
});
|
|
253
286
|
var SignedBoundWitnessWithStorageMetaZod = UnsignedBoundWitnessWithStorageMetaZod;
|
|
254
|
-
var AnySignedBoundWitnessZod = UnsignedBoundWitnessZod.catchall(
|
|
255
|
-
var AnySignedBoundWitnessWithStorageMetaZod = UnsignedBoundWitnessWithStorageMetaZod.catchall(
|
|
287
|
+
var AnySignedBoundWitnessZod = UnsignedBoundWitnessZod.catchall(z5.any());
|
|
288
|
+
var AnySignedBoundWitnessWithStorageMetaZod = UnsignedBoundWitnessWithStorageMetaZod.catchall(z5.any());
|
|
256
289
|
|
|
257
290
|
// src/types/schema/common/Chain.ts
|
|
258
291
|
import { AddressRegEx as AddressRegEx2, toAddress as toAddress2 } from "@xylabs/hex";
|
|
259
|
-
import * as
|
|
260
|
-
var ChainZod =
|
|
292
|
+
import * as z6 from "zod";
|
|
293
|
+
var ChainZod = z6.string().toLowerCase().regex(AddressRegEx2).transform((v) => toAddress2(v));
|
|
261
294
|
|
|
262
295
|
// src/types/schema/common/BlockBoundWitness.ts
|
|
263
|
-
var BlockNumberZod =
|
|
296
|
+
var BlockNumberZod = z7.number().int().nonnegative();
|
|
264
297
|
var XL1BlockNumberZod = BlockNumberZod.transform(asXL1BlockNumber);
|
|
265
|
-
var HexZod2 =
|
|
298
|
+
var HexZod2 = z7.string().regex(/^[0-9a-f]+$/);
|
|
266
299
|
var HashZod2 = HexZod2.transform((v) => v);
|
|
267
|
-
var BlockBoundWitnessFieldsZod =
|
|
300
|
+
var BlockBoundWitnessFieldsZod = z7.object({
|
|
268
301
|
block: XL1BlockNumberZod,
|
|
269
302
|
chain: ChainZod,
|
|
270
303
|
previous: HashZod2.nullable(),
|
|
271
|
-
protocol:
|
|
272
|
-
step_hashes:
|
|
304
|
+
protocol: z7.number(),
|
|
305
|
+
step_hashes: z7.array(HashZod2).optional()
|
|
273
306
|
});
|
|
274
|
-
var BlockBoundWitnessMetaZod =
|
|
275
|
-
$epoch:
|
|
307
|
+
var BlockBoundWitnessMetaZod = z7.object({
|
|
308
|
+
$epoch: z7.number()
|
|
276
309
|
});
|
|
277
310
|
var BlockBoundWitnessZod = UnsignedBoundWitnessZod.merge(StorageMetaZod.partial()).merge(BlockBoundWitnessFieldsZod).merge(BlockBoundWitnessMetaZod);
|
|
278
311
|
var BlockBoundWitnessWithStorageMetaZod = UnsignedBoundWitnessWithStorageMetaZod.merge(BlockBoundWitnessFieldsZod).merge(BlockBoundWitnessMetaZod);
|
|
@@ -280,57 +313,57 @@ var SignedBlockBoundWitnessZod = SignedBoundWitnessZod.merge(StorageMetaZod.part
|
|
|
280
313
|
var SignedBlockBoundWitnessWithStorageMetaZod = SignedBoundWitnessWithStorageMetaZod.merge(StorageMetaZod.partial()).merge(BlockBoundWitnessFieldsZod).merge(BlockBoundWitnessMetaZod);
|
|
281
314
|
|
|
282
315
|
// src/types/schema/common/BlockRange.ts
|
|
283
|
-
import { z as
|
|
284
|
-
var BlockRangeZod =
|
|
285
|
-
|
|
286
|
-
|
|
316
|
+
import { z as z8 } from "zod";
|
|
317
|
+
var BlockRangeZod = z8.tuple([
|
|
318
|
+
z8.number().optional(),
|
|
319
|
+
z8.number().optional()
|
|
287
320
|
]);
|
|
288
321
|
|
|
289
322
|
// src/types/schema/common/HydratedBlock.ts
|
|
290
|
-
import * as
|
|
291
|
-
var HydratedBlockZod =
|
|
323
|
+
import * as z9 from "zod";
|
|
324
|
+
var HydratedBlockZod = z9.tuple([
|
|
292
325
|
BlockBoundWitnessZod,
|
|
293
|
-
|
|
326
|
+
z9.array(PayloadZod)
|
|
294
327
|
]);
|
|
295
|
-
var HydratedBlockWithStorageMetaZod =
|
|
328
|
+
var HydratedBlockWithStorageMetaZod = z9.tuple([
|
|
296
329
|
BlockBoundWitnessWithStorageMetaZod,
|
|
297
|
-
|
|
330
|
+
z9.array(PayloadWithStorageMetaZod)
|
|
298
331
|
]);
|
|
299
|
-
var SignedHydratedBlockZod =
|
|
332
|
+
var SignedHydratedBlockZod = z9.tuple([
|
|
300
333
|
SignedBlockBoundWitnessZod,
|
|
301
|
-
|
|
334
|
+
z9.array(PayloadZod)
|
|
302
335
|
]);
|
|
303
|
-
var SignedHydratedBlockToJsonZod =
|
|
336
|
+
var SignedHydratedBlockToJsonZod = z9.tuple([
|
|
304
337
|
SignedBlockBoundWitnessZod,
|
|
305
|
-
|
|
338
|
+
z9.array(PayloadZod)
|
|
306
339
|
]);
|
|
307
|
-
var SignedHydratedBlockWithStorageMetaZod =
|
|
340
|
+
var SignedHydratedBlockWithStorageMetaZod = z9.tuple([
|
|
308
341
|
SignedBlockBoundWitnessWithStorageMetaZod,
|
|
309
|
-
|
|
342
|
+
z9.array(PayloadWithStorageMetaZod)
|
|
310
343
|
]);
|
|
311
344
|
|
|
312
345
|
// src/types/schema/common/HydratedTransaction.ts
|
|
313
346
|
import { asAnyPayload } from "@xyo-network/payload-model";
|
|
314
347
|
import { asSignedHydratedTransaction } from "@xyo-network/xl1-protocol";
|
|
315
|
-
import * as
|
|
348
|
+
import * as z12 from "zod";
|
|
316
349
|
|
|
317
350
|
// src/types/schema/common/TransactionBoundWitness.ts
|
|
318
|
-
import * as
|
|
351
|
+
import * as z11 from "zod";
|
|
319
352
|
|
|
320
353
|
// src/types/schema/common/TransactionFees.ts
|
|
321
354
|
import { BigIntToJsonZod, HexZod as HexZod3, JsonToBigIntZod } from "@xylabs/hex";
|
|
322
355
|
import { asAttoXL1 } from "@xyo-network/xl1-protocol";
|
|
323
|
-
import * as
|
|
324
|
-
var AttoZod =
|
|
356
|
+
import * as z10 from "zod";
|
|
357
|
+
var AttoZod = z10.bigint();
|
|
325
358
|
var JsonToAttoZod = JsonToBigIntZod.transform((v) => asAttoXL1(v));
|
|
326
359
|
var AttoToJsonZod = BigIntToJsonZod;
|
|
327
|
-
var TransactionFeesHexZod =
|
|
360
|
+
var TransactionFeesHexZod = z10.object({
|
|
328
361
|
base: HexZod3,
|
|
329
362
|
gasLimit: HexZod3,
|
|
330
363
|
gasPrice: HexZod3,
|
|
331
364
|
priority: HexZod3
|
|
332
365
|
});
|
|
333
|
-
var TransactionFeesBigIntZod =
|
|
366
|
+
var TransactionFeesBigIntZod = z10.object({
|
|
334
367
|
base: AttoZod,
|
|
335
368
|
gasLimit: AttoZod,
|
|
336
369
|
gasPrice: AttoZod,
|
|
@@ -350,23 +383,23 @@ var TransactionFeesBigIntToJsonZod = TransactionFeesBigIntZod.transform((val) =>
|
|
|
350
383
|
}));
|
|
351
384
|
|
|
352
385
|
// src/types/schema/common/TransactionBoundWitness.ts
|
|
353
|
-
var BlockStartZod =
|
|
386
|
+
var BlockStartZod = z11.object({
|
|
354
387
|
nbf: BlockNumberZod
|
|
355
388
|
});
|
|
356
|
-
var BlockEndZod =
|
|
389
|
+
var BlockEndZod = z11.object({
|
|
357
390
|
exp: BlockNumberZod
|
|
358
391
|
});
|
|
359
|
-
var BlockDurationZod =
|
|
392
|
+
var BlockDurationZod = z11.object({
|
|
360
393
|
nbf: BlockNumberZod,
|
|
361
394
|
exp: BlockNumberZod
|
|
362
395
|
});
|
|
363
|
-
var BlockScriptsZod =
|
|
364
|
-
script:
|
|
396
|
+
var BlockScriptsZod = z11.object({
|
|
397
|
+
script: z11.array(z11.string()).optional()
|
|
365
398
|
});
|
|
366
|
-
var WithTransactionFeesZod =
|
|
399
|
+
var WithTransactionFeesZod = z11.object({
|
|
367
400
|
fees: TransactionFeesHexZod
|
|
368
401
|
});
|
|
369
|
-
var TransactionBoundWitnessFields =
|
|
402
|
+
var TransactionBoundWitnessFields = z11.object({
|
|
370
403
|
chain: ChainZod,
|
|
371
404
|
from: ChainZod
|
|
372
405
|
});
|
|
@@ -374,17 +407,17 @@ var TransactionBoundWitnessZod = UnsignedBoundWitnessZod.merge(StorageMetaZod.pa
|
|
|
374
407
|
var SignedTransactionBoundWitnessZod = SignedBoundWitnessZod.merge(StorageMetaZod.partial()).merge(BlockDurationZod).merge(WithTransactionFeesZod).merge(TransactionBoundWitnessFields).merge(BlockScriptsZod.partial());
|
|
375
408
|
|
|
376
409
|
// src/types/schema/common/HydratedTransaction.ts
|
|
377
|
-
var HydratedTransactionZod =
|
|
410
|
+
var HydratedTransactionZod = z12.tuple([
|
|
378
411
|
TransactionBoundWitnessZod,
|
|
379
|
-
|
|
412
|
+
z12.array(PayloadZod)
|
|
380
413
|
]);
|
|
381
|
-
var UnsignedHydratedTransactionZod =
|
|
414
|
+
var UnsignedHydratedTransactionZod = z12.tuple([
|
|
382
415
|
TransactionBoundWitnessZod,
|
|
383
|
-
|
|
416
|
+
z12.array(PayloadZod)
|
|
384
417
|
]);
|
|
385
|
-
var SignedHydratedTransactionZod =
|
|
418
|
+
var SignedHydratedTransactionZod = z12.tuple([
|
|
386
419
|
SignedTransactionBoundWitnessZod,
|
|
387
|
-
|
|
420
|
+
z12.array(PayloadZod)
|
|
388
421
|
]);
|
|
389
422
|
var SignedHydratedTransactionToJsonZod = SignedHydratedTransactionZod.transform(([tx, payloads]) => asSignedHydratedTransaction([
|
|
390
423
|
tx,
|
|
@@ -396,79 +429,79 @@ var JsonToSignedHydratedTransactionZod = SignedHydratedTransactionZod.transform(
|
|
|
396
429
|
]);
|
|
397
430
|
|
|
398
431
|
// src/types/schema/common/Json.ts
|
|
399
|
-
import * as
|
|
400
|
-
var JsonValueZod =
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
432
|
+
import * as z13 from "zod";
|
|
433
|
+
var JsonValueZod = z13.lazy(() => z13.union([
|
|
434
|
+
z13.string(),
|
|
435
|
+
z13.number(),
|
|
436
|
+
z13.boolean(),
|
|
437
|
+
z13.null(),
|
|
438
|
+
z13.array(JsonValueZod),
|
|
439
|
+
z13.record(z13.string(), JsonValueZod)
|
|
407
440
|
]));
|
|
408
|
-
var JsonObjectZod =
|
|
441
|
+
var JsonObjectZod = z13.record(z13.string(), JsonValueZod);
|
|
409
442
|
|
|
410
443
|
// src/types/schema/common/Permission.ts
|
|
411
|
-
import { z as
|
|
412
|
-
var CaveatTypesZod =
|
|
444
|
+
import { z as z14 } from "zod";
|
|
445
|
+
var CaveatTypesZod = z14.enum([
|
|
413
446
|
"chain",
|
|
414
447
|
"expiration",
|
|
415
448
|
"filteredResponse",
|
|
416
449
|
"rateLimit",
|
|
417
450
|
"restrictReturnedAccounts"
|
|
418
451
|
]);
|
|
419
|
-
var CaveatsZod =
|
|
452
|
+
var CaveatsZod = z14.object({
|
|
420
453
|
type: CaveatTypesZod,
|
|
421
|
-
value:
|
|
454
|
+
value: z14.json()
|
|
422
455
|
});
|
|
423
|
-
var PermissionZod =
|
|
424
|
-
parentCapability:
|
|
456
|
+
var PermissionZod = z14.object({
|
|
457
|
+
parentCapability: z14.string(),
|
|
425
458
|
caveats: CaveatsZod.array().optional(),
|
|
426
|
-
invoker:
|
|
459
|
+
invoker: z14.string()
|
|
427
460
|
});
|
|
428
461
|
var InvokerPermissionZod = PermissionZod.extend({
|
|
429
|
-
date:
|
|
462
|
+
date: z14.number().optional()
|
|
430
463
|
});
|
|
431
|
-
var PermissionRequestZod =
|
|
432
|
-
var RequestedPermissionZod =
|
|
433
|
-
parentCapability:
|
|
434
|
-
date:
|
|
464
|
+
var PermissionRequestZod = z14.record(z14.string(), z14.record(z14.string(), z14.any()));
|
|
465
|
+
var RequestedPermissionZod = z14.object({
|
|
466
|
+
parentCapability: z14.string(),
|
|
467
|
+
date: z14.number().optional()
|
|
435
468
|
});
|
|
436
469
|
|
|
437
470
|
// src/types/schema/common/RewardsRangeOptions.ts
|
|
438
|
-
import { z as
|
|
471
|
+
import { z as z16 } from "zod";
|
|
439
472
|
|
|
440
473
|
// src/types/schema/common/StepIdentity.ts
|
|
441
|
-
import * as
|
|
442
|
-
var StepIdentityZod =
|
|
443
|
-
block:
|
|
444
|
-
step:
|
|
474
|
+
import * as z15 from "zod";
|
|
475
|
+
var StepIdentityZod = z15.object({
|
|
476
|
+
block: z15.number(),
|
|
477
|
+
step: z15.number()
|
|
445
478
|
});
|
|
446
479
|
|
|
447
480
|
// src/types/schema/common/RewardsRangeOptions.ts
|
|
448
|
-
var RewardsRangeOptionsZod =
|
|
449
|
-
positions:
|
|
481
|
+
var RewardsRangeOptionsZod = z16.object({
|
|
482
|
+
positions: z16.array(z16.number()).optional(),
|
|
450
483
|
range: BlockRangeZod.optional(),
|
|
451
|
-
steps:
|
|
452
|
-
stakers:
|
|
484
|
+
steps: z16.array(StepIdentityZod).optional(),
|
|
485
|
+
stakers: z16.array(AddressZod).optional()
|
|
453
486
|
});
|
|
454
487
|
|
|
455
488
|
// src/types/schema/common/Stake.ts
|
|
456
489
|
import { HexZod as HexZod4 } from "@xylabs/hex";
|
|
457
|
-
import * as
|
|
458
|
-
var StakeZod =
|
|
490
|
+
import * as z17 from "zod";
|
|
491
|
+
var StakeZod = z17.object({
|
|
459
492
|
amount: AttoZod,
|
|
460
493
|
// the block number when the stake was added
|
|
461
|
-
addBlock:
|
|
494
|
+
addBlock: z17.number(),
|
|
462
495
|
// the unique id for the stake item
|
|
463
|
-
id:
|
|
496
|
+
id: z17.number(),
|
|
464
497
|
// the block number when the stake was removed (set to 0 if not removed)
|
|
465
|
-
removeBlock:
|
|
498
|
+
removeBlock: z17.number(),
|
|
466
499
|
// the address that is being staked
|
|
467
500
|
staked: AddressZod,
|
|
468
501
|
// the address that owns the stake
|
|
469
502
|
staker: AddressZod,
|
|
470
503
|
// the block number when the stake was withdrawn (set to 0 if not withdrawn)
|
|
471
|
-
withdrawBlock:
|
|
504
|
+
withdrawBlock: z17.number()
|
|
472
505
|
});
|
|
473
506
|
var StakeToJsonZod = StakeZod.transform((val) => ({
|
|
474
507
|
addBlock: val.addBlock,
|
|
@@ -495,20 +528,20 @@ var JsonToStakeZod = StakeZod.extend({
|
|
|
495
528
|
import { HexZod as HexZod5 } from "@xylabs/hex";
|
|
496
529
|
import { PayloadZodStrictOfSchema, StorageMetaZod as StorageMetaZod2 } from "@xyo-network/payload-model";
|
|
497
530
|
import { TransferSchema } from "@xyo-network/xl1-protocol";
|
|
498
|
-
import
|
|
499
|
-
var TransferFieldsZod =
|
|
500
|
-
$opCodes:
|
|
501
|
-
context:
|
|
502
|
-
epoch:
|
|
531
|
+
import z18 from "zod";
|
|
532
|
+
var TransferFieldsZod = z18.object({
|
|
533
|
+
$opCodes: z18.array(z18.string()).optional(),
|
|
534
|
+
context: z18.object().optional(),
|
|
535
|
+
epoch: z18.number(),
|
|
503
536
|
from: AddressZod,
|
|
504
|
-
transfers:
|
|
537
|
+
transfers: z18.record(AddressZod, HexZod5)
|
|
505
538
|
});
|
|
506
539
|
var TransferZod = PayloadZodStrictOfSchema(TransferSchema).extend(TransferFieldsZod.shape);
|
|
507
540
|
var TransferZodWithStorageMeta = TransferZod.extend(StorageMetaZod2.shape);
|
|
508
541
|
|
|
509
542
|
// src/types/schema/common/TransferPair.ts
|
|
510
|
-
import
|
|
511
|
-
var TransferPairZod =
|
|
543
|
+
import z19 from "zod";
|
|
544
|
+
var TransferPairZod = z19.tuple([
|
|
512
545
|
AddressZod,
|
|
513
546
|
AddressZod
|
|
514
547
|
]);
|
|
@@ -517,79 +550,79 @@ var TransferPairZod = z18.tuple([
|
|
|
517
550
|
var NetworkStakeViewerRpcSchemas = {
|
|
518
551
|
networkStakeViewer_active: {
|
|
519
552
|
params: {
|
|
520
|
-
from:
|
|
553
|
+
from: z20.tuple([
|
|
521
554
|
BlockNumberZod.optional()
|
|
522
555
|
]),
|
|
523
|
-
to:
|
|
556
|
+
to: z20.tuple([
|
|
524
557
|
BlockNumberZod.optional()
|
|
525
558
|
])
|
|
526
559
|
},
|
|
527
560
|
result: {
|
|
528
|
-
from:
|
|
561
|
+
from: z20.tuple([
|
|
529
562
|
JsonToBigIntZod2,
|
|
530
|
-
|
|
563
|
+
z20.number()
|
|
531
564
|
]),
|
|
532
|
-
to:
|
|
565
|
+
to: z20.tuple([
|
|
533
566
|
BigIntToJsonZod2,
|
|
534
|
-
|
|
567
|
+
z20.number()
|
|
535
568
|
])
|
|
536
569
|
}
|
|
537
570
|
}
|
|
538
571
|
};
|
|
539
572
|
|
|
540
573
|
// src/types/schema/XyoPermissionsRpcSchemas.ts
|
|
541
|
-
import * as
|
|
574
|
+
import * as z21 from "zod";
|
|
542
575
|
var XyoPermissionsRpcSchemas = {
|
|
543
576
|
xyoPermissions_getPermissions: {
|
|
544
577
|
params: {
|
|
545
|
-
to:
|
|
546
|
-
from:
|
|
578
|
+
to: z21.array(z21.any()).length(0),
|
|
579
|
+
from: z21.array(z21.any()).length(0)
|
|
547
580
|
},
|
|
548
581
|
result: {
|
|
549
|
-
to:
|
|
550
|
-
from:
|
|
582
|
+
to: z21.array(InvokerPermissionZod),
|
|
583
|
+
from: z21.array(InvokerPermissionZod)
|
|
551
584
|
}
|
|
552
585
|
},
|
|
553
586
|
xyoPermissions_requestPermissions: {
|
|
554
587
|
params: {
|
|
555
|
-
to:
|
|
556
|
-
|
|
588
|
+
to: z21.tuple([
|
|
589
|
+
z21.array(PermissionRequestZod)
|
|
557
590
|
]),
|
|
558
|
-
from:
|
|
559
|
-
|
|
591
|
+
from: z21.tuple([
|
|
592
|
+
z21.array(PermissionRequestZod)
|
|
560
593
|
])
|
|
561
594
|
},
|
|
562
595
|
result: {
|
|
563
|
-
to:
|
|
564
|
-
from:
|
|
596
|
+
to: z21.array(RequestedPermissionZod),
|
|
597
|
+
from: z21.array(RequestedPermissionZod)
|
|
565
598
|
}
|
|
566
599
|
},
|
|
567
600
|
xyoPermissions_revokePermissions: {
|
|
568
601
|
params: {
|
|
569
|
-
to:
|
|
570
|
-
|
|
602
|
+
to: z21.tuple([
|
|
603
|
+
z21.array(PermissionRequestZod)
|
|
571
604
|
]),
|
|
572
|
-
from:
|
|
573
|
-
|
|
605
|
+
from: z21.tuple([
|
|
606
|
+
z21.array(PermissionRequestZod)
|
|
574
607
|
])
|
|
575
608
|
},
|
|
576
609
|
result: {
|
|
577
|
-
to:
|
|
578
|
-
from:
|
|
610
|
+
to: z21.array(RequestedPermissionZod),
|
|
611
|
+
from: z21.array(RequestedPermissionZod)
|
|
579
612
|
}
|
|
580
613
|
}
|
|
581
614
|
};
|
|
582
615
|
|
|
583
616
|
// src/types/schema/XyoRunnerRpcSchemas.ts
|
|
584
617
|
import { HashToJsonZod as HashToJsonZod2, JsonToHashZod } from "@xylabs/hex";
|
|
585
|
-
import * as
|
|
618
|
+
import * as z22 from "zod";
|
|
586
619
|
var XyoRunnerRpcSchemas = {
|
|
587
620
|
xyoRunner_broadcastTransaction: {
|
|
588
621
|
params: {
|
|
589
|
-
to:
|
|
622
|
+
to: z22.tuple([
|
|
590
623
|
SignedHydratedTransactionZod
|
|
591
624
|
]),
|
|
592
|
-
from:
|
|
625
|
+
from: z22.tuple([
|
|
593
626
|
SignedHydratedTransactionZod
|
|
594
627
|
])
|
|
595
628
|
},
|
|
@@ -602,12 +635,12 @@ var XyoRunnerRpcSchemas = {
|
|
|
602
635
|
|
|
603
636
|
// src/types/schema/XyoSignerRpcSchemas.ts
|
|
604
637
|
import { asHydratedTransactionWithStorageMeta } from "@xyo-network/xl1-protocol";
|
|
605
|
-
import { z as
|
|
638
|
+
import { z as z23 } from "zod";
|
|
606
639
|
var XyoSignerRpcSchemas = {
|
|
607
640
|
xyoSigner_address: {
|
|
608
641
|
params: {
|
|
609
|
-
to:
|
|
610
|
-
from:
|
|
642
|
+
to: z23.array(z23.any()).length(0).optional(),
|
|
643
|
+
from: z23.array(z23.any()).length(0).optional()
|
|
611
644
|
},
|
|
612
645
|
result: {
|
|
613
646
|
to: AddressZod,
|
|
@@ -616,10 +649,10 @@ var XyoSignerRpcSchemas = {
|
|
|
616
649
|
},
|
|
617
650
|
xyoSigner_signTransaction: {
|
|
618
651
|
params: {
|
|
619
|
-
to:
|
|
652
|
+
to: z23.tuple([
|
|
620
653
|
UnsignedHydratedTransactionZod
|
|
621
654
|
]),
|
|
622
|
-
from:
|
|
655
|
+
from: z23.tuple([
|
|
623
656
|
UnsignedHydratedTransactionZod
|
|
624
657
|
])
|
|
625
658
|
},
|
|
@@ -634,14 +667,14 @@ var XyoSignerRpcSchemas = {
|
|
|
634
667
|
|
|
635
668
|
// src/types/schema/XyoViewerRpcSchemas.ts
|
|
636
669
|
import { BigIntToJsonZod as BigIntToJsonZod3, HashToJsonZod as HashToJsonZod3, HashZod as HashZod3, JsonToBigIntZod as JsonToBigIntZod3, JsonToHashZod as JsonToHashZod2 } from "@xylabs/hex";
|
|
637
|
-
import * as
|
|
670
|
+
import * as z24 from "zod";
|
|
638
671
|
var XyoViewerRpcSchemas = {
|
|
639
672
|
xyoViewer_networkStakeStepRewardClaimedByAddress: {
|
|
640
673
|
params: {
|
|
641
|
-
to:
|
|
674
|
+
to: z24.tuple([
|
|
642
675
|
AddressZod
|
|
643
676
|
]),
|
|
644
|
-
from:
|
|
677
|
+
from: z24.tuple([
|
|
645
678
|
AddressZod
|
|
646
679
|
])
|
|
647
680
|
},
|
|
@@ -652,51 +685,51 @@ var XyoViewerRpcSchemas = {
|
|
|
652
685
|
},
|
|
653
686
|
xyoViewer_networkStakeStepRewardAddressReward: {
|
|
654
687
|
params: {
|
|
655
|
-
to:
|
|
688
|
+
to: z24.tuple([
|
|
656
689
|
StepIdentityZod,
|
|
657
690
|
AddressZod
|
|
658
691
|
]),
|
|
659
|
-
from:
|
|
692
|
+
from: z24.tuple([
|
|
660
693
|
StepIdentityZod,
|
|
661
694
|
AddressZod
|
|
662
695
|
])
|
|
663
696
|
},
|
|
664
697
|
result: {
|
|
665
|
-
to:
|
|
666
|
-
from:
|
|
698
|
+
to: z24.record(AddressZod, BigIntToJsonZod3),
|
|
699
|
+
from: z24.record(AddressZod, JsonToBigIntZod3)
|
|
667
700
|
}
|
|
668
701
|
},
|
|
669
702
|
xyoViewer_networkStakeStepRewardAddressHistory: {
|
|
670
703
|
params: {
|
|
671
|
-
to:
|
|
704
|
+
to: z24.tuple([
|
|
672
705
|
AddressZod
|
|
673
706
|
]),
|
|
674
|
-
from:
|
|
707
|
+
from: z24.tuple([
|
|
675
708
|
AddressZod
|
|
676
709
|
])
|
|
677
710
|
},
|
|
678
711
|
result: {
|
|
679
|
-
to:
|
|
680
|
-
from:
|
|
712
|
+
to: z24.record(AddressZod, BigIntToJsonZod3),
|
|
713
|
+
from: z24.record(AddressZod, JsonToBigIntZod3)
|
|
681
714
|
}
|
|
682
715
|
},
|
|
683
716
|
xyoViewer_networkStakeStepRewardAddressShare: {
|
|
684
717
|
params: {
|
|
685
|
-
to:
|
|
718
|
+
to: z24.tuple([
|
|
686
719
|
StepIdentityZod,
|
|
687
720
|
AddressZod
|
|
688
721
|
]),
|
|
689
|
-
from:
|
|
722
|
+
from: z24.tuple([
|
|
690
723
|
StepIdentityZod,
|
|
691
724
|
AddressZod
|
|
692
725
|
])
|
|
693
726
|
},
|
|
694
727
|
result: {
|
|
695
|
-
to:
|
|
728
|
+
to: z24.tuple([
|
|
696
729
|
BigIntToJsonZod3,
|
|
697
730
|
BigIntToJsonZod3
|
|
698
731
|
]),
|
|
699
|
-
from:
|
|
732
|
+
from: z24.tuple([
|
|
700
733
|
JsonToBigIntZod3,
|
|
701
734
|
JsonToBigIntZod3
|
|
702
735
|
])
|
|
@@ -704,11 +737,11 @@ var XyoViewerRpcSchemas = {
|
|
|
704
737
|
},
|
|
705
738
|
xyoViewer_networkStakeStepRewardWeightForAddress: {
|
|
706
739
|
params: {
|
|
707
|
-
to:
|
|
740
|
+
to: z24.tuple([
|
|
708
741
|
StepIdentityZod,
|
|
709
742
|
AddressZod
|
|
710
743
|
]),
|
|
711
|
-
from:
|
|
744
|
+
from: z24.tuple([
|
|
712
745
|
StepIdentityZod,
|
|
713
746
|
AddressZod
|
|
714
747
|
])
|
|
@@ -720,10 +753,10 @@ var XyoViewerRpcSchemas = {
|
|
|
720
753
|
},
|
|
721
754
|
xyoViewer_networkStakeStepRewardUnclaimedByAddress: {
|
|
722
755
|
params: {
|
|
723
|
-
to:
|
|
756
|
+
to: z24.tuple([
|
|
724
757
|
AddressZod
|
|
725
758
|
]),
|
|
726
|
-
from:
|
|
759
|
+
from: z24.tuple([
|
|
727
760
|
AddressZod
|
|
728
761
|
])
|
|
729
762
|
},
|
|
@@ -734,27 +767,27 @@ var XyoViewerRpcSchemas = {
|
|
|
734
767
|
},
|
|
735
768
|
xyoViewer_networkStakeStepRewardPoolRewards: {
|
|
736
769
|
params: {
|
|
737
|
-
to:
|
|
770
|
+
to: z24.tuple([
|
|
738
771
|
StepIdentityZod
|
|
739
772
|
]),
|
|
740
|
-
from:
|
|
773
|
+
from: z24.tuple([
|
|
741
774
|
StepIdentityZod
|
|
742
775
|
])
|
|
743
776
|
},
|
|
744
777
|
result: {
|
|
745
|
-
to:
|
|
746
|
-
from:
|
|
778
|
+
to: z24.record(AddressZod, BigIntToJsonZod3),
|
|
779
|
+
from: z24.record(AddressZod, JsonToBigIntZod3)
|
|
747
780
|
}
|
|
748
781
|
},
|
|
749
782
|
xyoViewer_networkStakeStepRewardPositionWeight: {
|
|
750
783
|
params: {
|
|
751
|
-
to:
|
|
784
|
+
to: z24.tuple([
|
|
752
785
|
StepIdentityZod,
|
|
753
|
-
|
|
786
|
+
z24.number()
|
|
754
787
|
]),
|
|
755
|
-
from:
|
|
788
|
+
from: z24.tuple([
|
|
756
789
|
StepIdentityZod,
|
|
757
|
-
|
|
790
|
+
z24.number()
|
|
758
791
|
])
|
|
759
792
|
},
|
|
760
793
|
result: {
|
|
@@ -764,13 +797,13 @@ var XyoViewerRpcSchemas = {
|
|
|
764
797
|
},
|
|
765
798
|
xyoViewer_networkStakeStepRewardPotentialPositionLoss: {
|
|
766
799
|
params: {
|
|
767
|
-
to:
|
|
800
|
+
to: z24.tuple([
|
|
768
801
|
StepIdentityZod,
|
|
769
|
-
|
|
802
|
+
z24.number()
|
|
770
803
|
]),
|
|
771
|
-
from:
|
|
804
|
+
from: z24.tuple([
|
|
772
805
|
StepIdentityZod,
|
|
773
|
-
|
|
806
|
+
z24.number()
|
|
774
807
|
])
|
|
775
808
|
},
|
|
776
809
|
result: {
|
|
@@ -780,10 +813,10 @@ var XyoViewerRpcSchemas = {
|
|
|
780
813
|
},
|
|
781
814
|
xyoViewer_networkStakeStepRewardForStep: {
|
|
782
815
|
params: {
|
|
783
|
-
to:
|
|
816
|
+
to: z24.tuple([
|
|
784
817
|
StepIdentityZod
|
|
785
818
|
]),
|
|
786
|
-
from:
|
|
819
|
+
from: z24.tuple([
|
|
787
820
|
StepIdentityZod
|
|
788
821
|
])
|
|
789
822
|
},
|
|
@@ -794,10 +827,10 @@ var XyoViewerRpcSchemas = {
|
|
|
794
827
|
},
|
|
795
828
|
xyoViewer_networkStakeStepRewardRandomizer: {
|
|
796
829
|
params: {
|
|
797
|
-
to:
|
|
830
|
+
to: z24.tuple([
|
|
798
831
|
StepIdentityZod
|
|
799
832
|
]),
|
|
800
|
-
from:
|
|
833
|
+
from: z24.tuple([
|
|
801
834
|
StepIdentityZod
|
|
802
835
|
])
|
|
803
836
|
},
|
|
@@ -808,49 +841,49 @@ var XyoViewerRpcSchemas = {
|
|
|
808
841
|
},
|
|
809
842
|
xyoViewer_networkStakeStepRewardStakerCount: {
|
|
810
843
|
params: {
|
|
811
|
-
to:
|
|
844
|
+
to: z24.tuple([
|
|
812
845
|
StepIdentityZod
|
|
813
846
|
]),
|
|
814
|
-
from:
|
|
847
|
+
from: z24.tuple([
|
|
815
848
|
StepIdentityZod
|
|
816
849
|
])
|
|
817
850
|
},
|
|
818
851
|
result: {
|
|
819
|
-
to:
|
|
820
|
-
from:
|
|
852
|
+
to: z24.number(),
|
|
853
|
+
from: z24.number()
|
|
821
854
|
}
|
|
822
855
|
},
|
|
823
856
|
xyoViewer_networkStakeStepRewardPoolShares: {
|
|
824
857
|
params: {
|
|
825
|
-
to:
|
|
858
|
+
to: z24.tuple([
|
|
826
859
|
StepIdentityZod
|
|
827
860
|
]),
|
|
828
|
-
from:
|
|
861
|
+
from: z24.tuple([
|
|
829
862
|
StepIdentityZod
|
|
830
863
|
])
|
|
831
864
|
},
|
|
832
865
|
result: {
|
|
833
|
-
to:
|
|
834
|
-
from:
|
|
866
|
+
to: z24.record(AddressZod, BigIntToJsonZod3),
|
|
867
|
+
from: z24.record(AddressZod, JsonToBigIntZod3)
|
|
835
868
|
}
|
|
836
869
|
},
|
|
837
870
|
xyoViewer_networkStakeStepRewardForStepForPosition: {
|
|
838
871
|
params: {
|
|
839
|
-
to:
|
|
872
|
+
to: z24.tuple([
|
|
840
873
|
StepIdentityZod,
|
|
841
|
-
|
|
874
|
+
z24.number()
|
|
842
875
|
]),
|
|
843
|
-
from:
|
|
876
|
+
from: z24.tuple([
|
|
844
877
|
StepIdentityZod,
|
|
845
|
-
|
|
878
|
+
z24.number()
|
|
846
879
|
])
|
|
847
880
|
},
|
|
848
881
|
result: {
|
|
849
|
-
to:
|
|
882
|
+
to: z24.tuple([
|
|
850
883
|
BigIntToJsonZod3,
|
|
851
884
|
BigIntToJsonZod3
|
|
852
885
|
]),
|
|
853
|
-
from:
|
|
886
|
+
from: z24.tuple([
|
|
854
887
|
JsonToBigIntZod3,
|
|
855
888
|
JsonToBigIntZod3
|
|
856
889
|
])
|
|
@@ -858,27 +891,27 @@ var XyoViewerRpcSchemas = {
|
|
|
858
891
|
},
|
|
859
892
|
xyoViewer_networkStakeStepRewardForPosition: {
|
|
860
893
|
params: {
|
|
861
|
-
to:
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
894
|
+
to: z24.tuple([
|
|
895
|
+
z24.number(),
|
|
896
|
+
z24.tuple([
|
|
897
|
+
z24.number(),
|
|
898
|
+
z24.number()
|
|
866
899
|
])
|
|
867
900
|
]),
|
|
868
|
-
from:
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
901
|
+
from: z24.tuple([
|
|
902
|
+
z24.number(),
|
|
903
|
+
z24.tuple([
|
|
904
|
+
z24.number(),
|
|
905
|
+
z24.number()
|
|
873
906
|
])
|
|
874
907
|
])
|
|
875
908
|
},
|
|
876
909
|
result: {
|
|
877
|
-
to:
|
|
910
|
+
to: z24.tuple([
|
|
878
911
|
BigIntToJsonZod3,
|
|
879
912
|
BigIntToJsonZod3
|
|
880
913
|
]),
|
|
881
|
-
from:
|
|
914
|
+
from: z24.tuple([
|
|
882
915
|
JsonToBigIntZod3,
|
|
883
916
|
JsonToBigIntZod3
|
|
884
917
|
])
|
|
@@ -886,16 +919,16 @@ var XyoViewerRpcSchemas = {
|
|
|
886
919
|
},
|
|
887
920
|
xyoViewer_networkStakeStepRewardsForRange: {
|
|
888
921
|
params: {
|
|
889
|
-
to:
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
922
|
+
to: z24.tuple([
|
|
923
|
+
z24.tuple([
|
|
924
|
+
z24.number(),
|
|
925
|
+
z24.number()
|
|
893
926
|
])
|
|
894
927
|
]),
|
|
895
|
-
from:
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
928
|
+
from: z24.tuple([
|
|
929
|
+
z24.tuple([
|
|
930
|
+
z24.number(),
|
|
931
|
+
z24.number()
|
|
899
932
|
])
|
|
900
933
|
])
|
|
901
934
|
},
|
|
@@ -906,18 +939,18 @@ var XyoViewerRpcSchemas = {
|
|
|
906
939
|
},
|
|
907
940
|
xyoViewer_networkStakeStepRewardsForStepLevel: {
|
|
908
941
|
params: {
|
|
909
|
-
to:
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
942
|
+
to: z24.tuple([
|
|
943
|
+
z24.number(),
|
|
944
|
+
z24.tuple([
|
|
945
|
+
z24.number(),
|
|
946
|
+
z24.number()
|
|
914
947
|
])
|
|
915
948
|
]),
|
|
916
|
-
from:
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
949
|
+
from: z24.tuple([
|
|
950
|
+
z24.number(),
|
|
951
|
+
z24.tuple([
|
|
952
|
+
z24.number(),
|
|
953
|
+
z24.number()
|
|
921
954
|
])
|
|
922
955
|
])
|
|
923
956
|
},
|
|
@@ -928,27 +961,27 @@ var XyoViewerRpcSchemas = {
|
|
|
928
961
|
},
|
|
929
962
|
xyoViewer_networkStakeStepRewardsForPosition: {
|
|
930
963
|
params: {
|
|
931
|
-
to:
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
964
|
+
to: z24.tuple([
|
|
965
|
+
z24.number(),
|
|
966
|
+
z24.tuple([
|
|
967
|
+
z24.number(),
|
|
968
|
+
z24.number()
|
|
936
969
|
])
|
|
937
970
|
]),
|
|
938
|
-
from:
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
971
|
+
from: z24.tuple([
|
|
972
|
+
z24.number(),
|
|
973
|
+
z24.tuple([
|
|
974
|
+
z24.number(),
|
|
975
|
+
z24.number()
|
|
943
976
|
])
|
|
944
977
|
])
|
|
945
978
|
},
|
|
946
979
|
result: {
|
|
947
|
-
to:
|
|
980
|
+
to: z24.record(z24.string(), z24.tuple([
|
|
948
981
|
BigIntToJsonZod3,
|
|
949
982
|
BigIntToJsonZod3
|
|
950
983
|
])),
|
|
951
|
-
from:
|
|
984
|
+
from: z24.record(z24.string(), z24.tuple([
|
|
952
985
|
JsonToBigIntZod3,
|
|
953
986
|
JsonToBigIntZod3
|
|
954
987
|
]))
|
|
@@ -956,10 +989,10 @@ var XyoViewerRpcSchemas = {
|
|
|
956
989
|
},
|
|
957
990
|
xyoViewer_accountBalance: {
|
|
958
991
|
params: {
|
|
959
|
-
to:
|
|
992
|
+
to: z24.tuple([
|
|
960
993
|
AddressZod
|
|
961
994
|
]),
|
|
962
|
-
from:
|
|
995
|
+
from: z24.tuple([
|
|
963
996
|
AddressZod
|
|
964
997
|
])
|
|
965
998
|
},
|
|
@@ -970,22 +1003,22 @@ var XyoViewerRpcSchemas = {
|
|
|
970
1003
|
},
|
|
971
1004
|
xyoViewer_accountBalanceHistory: {
|
|
972
1005
|
params: {
|
|
973
|
-
to:
|
|
1006
|
+
to: z24.tuple([
|
|
974
1007
|
AddressZod,
|
|
975
1008
|
BlockRangeZod.optional()
|
|
976
1009
|
]),
|
|
977
|
-
from:
|
|
1010
|
+
from: z24.tuple([
|
|
978
1011
|
AddressZod,
|
|
979
1012
|
BlockRangeZod.optional()
|
|
980
1013
|
])
|
|
981
1014
|
},
|
|
982
1015
|
result: {
|
|
983
|
-
to:
|
|
1016
|
+
to: z24.array(z24.tuple([
|
|
984
1017
|
BlockBoundWitnessZod,
|
|
985
1018
|
TransactionBoundWitnessZod.nullable(),
|
|
986
1019
|
TransferZodWithStorageMeta
|
|
987
1020
|
])),
|
|
988
|
-
from:
|
|
1021
|
+
from: z24.array(z24.tuple([
|
|
989
1022
|
BlockBoundWitnessZod,
|
|
990
1023
|
TransactionBoundWitnessZod.nullable(),
|
|
991
1024
|
TransferZodWithStorageMeta
|
|
@@ -994,10 +1027,10 @@ var XyoViewerRpcSchemas = {
|
|
|
994
1027
|
},
|
|
995
1028
|
xyoViewer_transferPairBalance: {
|
|
996
1029
|
params: {
|
|
997
|
-
to:
|
|
1030
|
+
to: z24.tuple([
|
|
998
1031
|
TransferPairZod
|
|
999
1032
|
]),
|
|
1000
|
-
from:
|
|
1033
|
+
from: z24.tuple([
|
|
1001
1034
|
TransferPairZod
|
|
1002
1035
|
])
|
|
1003
1036
|
},
|
|
@@ -1008,27 +1041,27 @@ var XyoViewerRpcSchemas = {
|
|
|
1008
1041
|
},
|
|
1009
1042
|
xyoViewer_transferPairBalanceHistory: {
|
|
1010
1043
|
params: {
|
|
1011
|
-
to:
|
|
1044
|
+
to: z24.tuple([
|
|
1012
1045
|
TransferPairZod
|
|
1013
1046
|
]),
|
|
1014
|
-
from:
|
|
1047
|
+
from: z24.tuple([
|
|
1015
1048
|
TransferPairZod
|
|
1016
1049
|
])
|
|
1017
1050
|
},
|
|
1018
1051
|
result: {
|
|
1019
|
-
to:
|
|
1052
|
+
to: z24.array(z24.tuple([
|
|
1020
1053
|
BlockBoundWitnessWithStorageMetaZod,
|
|
1021
|
-
|
|
1054
|
+
z24.union([
|
|
1022
1055
|
TransactionBoundWitnessZod,
|
|
1023
|
-
|
|
1056
|
+
z24.null()
|
|
1024
1057
|
]),
|
|
1025
1058
|
PayloadZod
|
|
1026
1059
|
])),
|
|
1027
|
-
from:
|
|
1060
|
+
from: z24.array(z24.tuple([
|
|
1028
1061
|
BlockBoundWitnessWithStorageMetaZod,
|
|
1029
|
-
|
|
1062
|
+
z24.union([
|
|
1030
1063
|
TransactionBoundWitnessZod,
|
|
1031
|
-
|
|
1064
|
+
z24.null()
|
|
1032
1065
|
]),
|
|
1033
1066
|
PayloadZod
|
|
1034
1067
|
]))
|
|
@@ -1036,10 +1069,10 @@ var XyoViewerRpcSchemas = {
|
|
|
1036
1069
|
},
|
|
1037
1070
|
xyoViewer_transferBalance: {
|
|
1038
1071
|
params: {
|
|
1039
|
-
to:
|
|
1072
|
+
to: z24.tuple([
|
|
1040
1073
|
AddressZod
|
|
1041
1074
|
]),
|
|
1042
|
-
from:
|
|
1075
|
+
from: z24.tuple([
|
|
1043
1076
|
AddressZod
|
|
1044
1077
|
])
|
|
1045
1078
|
},
|
|
@@ -1050,29 +1083,29 @@ var XyoViewerRpcSchemas = {
|
|
|
1050
1083
|
},
|
|
1051
1084
|
xyoViewer_transferBalanceHistory: {
|
|
1052
1085
|
params: {
|
|
1053
|
-
to:
|
|
1086
|
+
to: z24.tuple([
|
|
1054
1087
|
AddressZod,
|
|
1055
1088
|
BlockRangeZod.optional()
|
|
1056
1089
|
]),
|
|
1057
|
-
from:
|
|
1090
|
+
from: z24.tuple([
|
|
1058
1091
|
AddressZod,
|
|
1059
1092
|
BlockRangeZod.optional()
|
|
1060
1093
|
])
|
|
1061
1094
|
},
|
|
1062
1095
|
result: {
|
|
1063
|
-
to:
|
|
1096
|
+
to: z24.array(z24.tuple([
|
|
1064
1097
|
BlockBoundWitnessWithStorageMetaZod,
|
|
1065
|
-
|
|
1098
|
+
z24.union([
|
|
1066
1099
|
TransactionBoundWitnessZod,
|
|
1067
|
-
|
|
1100
|
+
z24.null()
|
|
1068
1101
|
]),
|
|
1069
1102
|
PayloadZod
|
|
1070
1103
|
])),
|
|
1071
|
-
from:
|
|
1104
|
+
from: z24.array(z24.tuple([
|
|
1072
1105
|
BlockBoundWitnessWithStorageMetaZod,
|
|
1073
|
-
|
|
1106
|
+
z24.union([
|
|
1074
1107
|
TransactionBoundWitnessZod,
|
|
1075
|
-
|
|
1108
|
+
z24.null()
|
|
1076
1109
|
]),
|
|
1077
1110
|
PayloadZod
|
|
1078
1111
|
]))
|
|
@@ -1080,10 +1113,10 @@ var XyoViewerRpcSchemas = {
|
|
|
1080
1113
|
},
|
|
1081
1114
|
xyoViewer_blockByHash: {
|
|
1082
1115
|
params: {
|
|
1083
|
-
to:
|
|
1116
|
+
to: z24.tuple([
|
|
1084
1117
|
HashToJsonZod3
|
|
1085
1118
|
]),
|
|
1086
|
-
from:
|
|
1119
|
+
from: z24.tuple([
|
|
1087
1120
|
JsonToHashZod2
|
|
1088
1121
|
])
|
|
1089
1122
|
},
|
|
@@ -1094,11 +1127,11 @@ var XyoViewerRpcSchemas = {
|
|
|
1094
1127
|
},
|
|
1095
1128
|
xyoViewer_blockByNumber: {
|
|
1096
1129
|
params: {
|
|
1097
|
-
to:
|
|
1098
|
-
|
|
1130
|
+
to: z24.tuple([
|
|
1131
|
+
z24.number()
|
|
1099
1132
|
]),
|
|
1100
|
-
from:
|
|
1101
|
-
|
|
1133
|
+
from: z24.tuple([
|
|
1134
|
+
z24.number()
|
|
1102
1135
|
])
|
|
1103
1136
|
},
|
|
1104
1137
|
result: {
|
|
@@ -1108,24 +1141,24 @@ var XyoViewerRpcSchemas = {
|
|
|
1108
1141
|
},
|
|
1109
1142
|
xyoViewer_blocksByHash: {
|
|
1110
1143
|
params: {
|
|
1111
|
-
to:
|
|
1144
|
+
to: z24.tuple([
|
|
1112
1145
|
HashZod3,
|
|
1113
|
-
|
|
1146
|
+
z24.number().optional()
|
|
1114
1147
|
]),
|
|
1115
|
-
from:
|
|
1148
|
+
from: z24.tuple([
|
|
1116
1149
|
HashZod3,
|
|
1117
|
-
|
|
1150
|
+
z24.number().optional()
|
|
1118
1151
|
])
|
|
1119
1152
|
},
|
|
1120
1153
|
result: {
|
|
1121
|
-
to:
|
|
1122
|
-
from:
|
|
1154
|
+
to: z24.array(SignedHydratedBlockZod),
|
|
1155
|
+
from: z24.array(SignedHydratedBlockZod)
|
|
1123
1156
|
}
|
|
1124
1157
|
},
|
|
1125
1158
|
xyoViewer_chainId: {
|
|
1126
1159
|
params: {
|
|
1127
|
-
to:
|
|
1128
|
-
from:
|
|
1160
|
+
to: z24.array(z24.any()).length(0).optional(),
|
|
1161
|
+
from: z24.array(z24.any()).length(0).optional()
|
|
1129
1162
|
},
|
|
1130
1163
|
result: {
|
|
1131
1164
|
to: AddressZod,
|
|
@@ -1134,10 +1167,10 @@ var XyoViewerRpcSchemas = {
|
|
|
1134
1167
|
},
|
|
1135
1168
|
xyoViewer_chainIdAtBlock: {
|
|
1136
1169
|
params: {
|
|
1137
|
-
to:
|
|
1170
|
+
to: z24.tuple([
|
|
1138
1171
|
BlockNumberZod
|
|
1139
1172
|
]),
|
|
1140
|
-
from:
|
|
1173
|
+
from: z24.tuple([
|
|
1141
1174
|
BlockNumberZod
|
|
1142
1175
|
])
|
|
1143
1176
|
},
|
|
@@ -1148,8 +1181,8 @@ var XyoViewerRpcSchemas = {
|
|
|
1148
1181
|
},
|
|
1149
1182
|
xyoViewer_currentBlock: {
|
|
1150
1183
|
params: {
|
|
1151
|
-
to:
|
|
1152
|
-
from:
|
|
1184
|
+
to: z24.array(z24.any()).length(0).optional(),
|
|
1185
|
+
from: z24.array(z24.any()).length(0).optional()
|
|
1153
1186
|
},
|
|
1154
1187
|
result: {
|
|
1155
1188
|
to: SignedHydratedBlockZod,
|
|
@@ -1158,8 +1191,8 @@ var XyoViewerRpcSchemas = {
|
|
|
1158
1191
|
},
|
|
1159
1192
|
xyoViewer_currentBlockHash: {
|
|
1160
1193
|
params: {
|
|
1161
|
-
to:
|
|
1162
|
-
from:
|
|
1194
|
+
to: z24.array(z24.any()).length(0).optional(),
|
|
1195
|
+
from: z24.array(z24.any()).length(0).optional()
|
|
1163
1196
|
},
|
|
1164
1197
|
result: {
|
|
1165
1198
|
to: HashZod3,
|
|
@@ -1168,8 +1201,8 @@ var XyoViewerRpcSchemas = {
|
|
|
1168
1201
|
},
|
|
1169
1202
|
xyoViewer_currentBlockNumber: {
|
|
1170
1203
|
params: {
|
|
1171
|
-
to:
|
|
1172
|
-
from:
|
|
1204
|
+
to: z24.array(z24.any()).length(0).optional(),
|
|
1205
|
+
from: z24.array(z24.any()).length(0).optional()
|
|
1173
1206
|
},
|
|
1174
1207
|
result: {
|
|
1175
1208
|
to: BlockNumberZod,
|
|
@@ -1178,23 +1211,23 @@ var XyoViewerRpcSchemas = {
|
|
|
1178
1211
|
},
|
|
1179
1212
|
xyoViewer_forkHistory: {
|
|
1180
1213
|
params: {
|
|
1181
|
-
to:
|
|
1182
|
-
from:
|
|
1214
|
+
to: z24.array(z24.any()).length(0).optional(),
|
|
1215
|
+
from: z24.array(z24.any()).length(0).optional()
|
|
1183
1216
|
},
|
|
1184
1217
|
result: {
|
|
1185
|
-
to:
|
|
1186
|
-
from:
|
|
1218
|
+
to: z24.record(z24.number(), AddressZod),
|
|
1219
|
+
from: z24.record(z24.number(), AddressZod)
|
|
1187
1220
|
}
|
|
1188
1221
|
},
|
|
1189
1222
|
xyoViewer_stakeByStaker: {
|
|
1190
1223
|
params: {
|
|
1191
|
-
to:
|
|
1224
|
+
to: z24.tuple([
|
|
1192
1225
|
AddressZod,
|
|
1193
|
-
|
|
1226
|
+
z24.number()
|
|
1194
1227
|
]),
|
|
1195
|
-
from:
|
|
1228
|
+
from: z24.tuple([
|
|
1196
1229
|
AddressZod,
|
|
1197
|
-
|
|
1230
|
+
z24.number()
|
|
1198
1231
|
])
|
|
1199
1232
|
},
|
|
1200
1233
|
result: {
|
|
@@ -1204,11 +1237,11 @@ var XyoViewerRpcSchemas = {
|
|
|
1204
1237
|
},
|
|
1205
1238
|
xyoViewer_stakeById: {
|
|
1206
1239
|
params: {
|
|
1207
|
-
to:
|
|
1208
|
-
|
|
1240
|
+
to: z24.tuple([
|
|
1241
|
+
z24.number()
|
|
1209
1242
|
]),
|
|
1210
|
-
from:
|
|
1211
|
-
|
|
1243
|
+
from: z24.tuple([
|
|
1244
|
+
z24.number()
|
|
1212
1245
|
])
|
|
1213
1246
|
},
|
|
1214
1247
|
result: {
|
|
@@ -1218,55 +1251,55 @@ var XyoViewerRpcSchemas = {
|
|
|
1218
1251
|
},
|
|
1219
1252
|
xyoViewer_stakedByStaker: {
|
|
1220
1253
|
params: {
|
|
1221
|
-
to:
|
|
1254
|
+
to: z24.tuple([
|
|
1222
1255
|
AddressZod
|
|
1223
1256
|
]),
|
|
1224
|
-
from:
|
|
1257
|
+
from: z24.tuple([
|
|
1225
1258
|
AddressZod
|
|
1226
1259
|
])
|
|
1227
1260
|
},
|
|
1228
1261
|
result: {
|
|
1229
|
-
to:
|
|
1230
|
-
from:
|
|
1262
|
+
to: z24.array(AddressZod),
|
|
1263
|
+
from: z24.array(AddressZod)
|
|
1231
1264
|
}
|
|
1232
1265
|
},
|
|
1233
1266
|
xyoViewer_stakesByStaker: {
|
|
1234
1267
|
params: {
|
|
1235
|
-
to:
|
|
1268
|
+
to: z24.tuple([
|
|
1236
1269
|
AddressZod
|
|
1237
1270
|
]),
|
|
1238
|
-
from:
|
|
1271
|
+
from: z24.tuple([
|
|
1239
1272
|
AddressZod
|
|
1240
1273
|
])
|
|
1241
1274
|
},
|
|
1242
1275
|
result: {
|
|
1243
|
-
to:
|
|
1244
|
-
from:
|
|
1276
|
+
to: z24.array(StakeToJsonZod),
|
|
1277
|
+
from: z24.array(JsonToStakeZod)
|
|
1245
1278
|
}
|
|
1246
1279
|
},
|
|
1247
1280
|
xyoViewer_stakesByStaked: {
|
|
1248
1281
|
params: {
|
|
1249
|
-
to:
|
|
1282
|
+
to: z24.tuple([
|
|
1250
1283
|
AddressZod
|
|
1251
1284
|
]),
|
|
1252
|
-
from:
|
|
1285
|
+
from: z24.tuple([
|
|
1253
1286
|
AddressZod
|
|
1254
1287
|
])
|
|
1255
1288
|
},
|
|
1256
1289
|
result: {
|
|
1257
|
-
to:
|
|
1258
|
-
from:
|
|
1290
|
+
to: z24.array(StakeToJsonZod),
|
|
1291
|
+
from: z24.array(JsonToStakeZod)
|
|
1259
1292
|
}
|
|
1260
1293
|
},
|
|
1261
1294
|
xyoViewer_transactionByBlockHashAndIndex: {
|
|
1262
1295
|
params: {
|
|
1263
|
-
to:
|
|
1296
|
+
to: z24.tuple([
|
|
1264
1297
|
HashZod3,
|
|
1265
|
-
|
|
1298
|
+
z24.number()
|
|
1266
1299
|
]),
|
|
1267
|
-
from:
|
|
1300
|
+
from: z24.tuple([
|
|
1268
1301
|
HashZod3,
|
|
1269
|
-
|
|
1302
|
+
z24.number()
|
|
1270
1303
|
])
|
|
1271
1304
|
},
|
|
1272
1305
|
result: {
|
|
@@ -1276,13 +1309,13 @@ var XyoViewerRpcSchemas = {
|
|
|
1276
1309
|
},
|
|
1277
1310
|
xyoViewer_transactionByBlockNumberAndIndex: {
|
|
1278
1311
|
params: {
|
|
1279
|
-
to:
|
|
1280
|
-
|
|
1281
|
-
|
|
1312
|
+
to: z24.tuple([
|
|
1313
|
+
z24.number(),
|
|
1314
|
+
z24.number()
|
|
1282
1315
|
]),
|
|
1283
|
-
from:
|
|
1284
|
-
|
|
1285
|
-
|
|
1316
|
+
from: z24.tuple([
|
|
1317
|
+
z24.number(),
|
|
1318
|
+
z24.number()
|
|
1286
1319
|
])
|
|
1287
1320
|
},
|
|
1288
1321
|
result: {
|
|
@@ -1292,10 +1325,10 @@ var XyoViewerRpcSchemas = {
|
|
|
1292
1325
|
},
|
|
1293
1326
|
xyoViewer_transactionByHash: {
|
|
1294
1327
|
params: {
|
|
1295
|
-
to:
|
|
1328
|
+
to: z24.tuple([
|
|
1296
1329
|
HashZod3
|
|
1297
1330
|
]),
|
|
1298
|
-
from:
|
|
1331
|
+
from: z24.tuple([
|
|
1299
1332
|
HashZod3
|
|
1300
1333
|
])
|
|
1301
1334
|
},
|
|
@@ -1316,253 +1349,313 @@ var AllRpcSchemas = {
|
|
|
1316
1349
|
};
|
|
1317
1350
|
|
|
1318
1351
|
// src/types/schema/createRequestSchema.ts
|
|
1319
|
-
import * as z24 from "zod";
|
|
1320
|
-
var createRequestSchema = /* @__PURE__ */ __name((methodName, paramsSchema = z24.undefined()) => z24.object({
|
|
1321
|
-
id: z24.union([
|
|
1322
|
-
z24.string(),
|
|
1323
|
-
z24.number()
|
|
1324
|
-
]),
|
|
1325
|
-
jsonrpc: z24.literal(jsonrpc),
|
|
1326
|
-
method: z24.literal(methodName),
|
|
1327
|
-
params: paramsSchema
|
|
1328
|
-
}), "createRequestSchema");
|
|
1329
|
-
|
|
1330
|
-
// src/types/schema/createResponseSchema.ts
|
|
1331
1352
|
import * as z25 from "zod";
|
|
1332
|
-
var
|
|
1353
|
+
var createRequestSchema = /* @__PURE__ */ __name((methodName, paramsSchema = z25.undefined()) => z25.object({
|
|
1333
1354
|
id: z25.union([
|
|
1334
1355
|
z25.string(),
|
|
1335
1356
|
z25.number()
|
|
1336
1357
|
]),
|
|
1337
1358
|
jsonrpc: z25.literal(jsonrpc),
|
|
1359
|
+
method: z25.literal(methodName),
|
|
1360
|
+
params: paramsSchema
|
|
1361
|
+
}), "createRequestSchema");
|
|
1362
|
+
|
|
1363
|
+
// src/types/schema/createResponseSchema.ts
|
|
1364
|
+
import * as z26 from "zod";
|
|
1365
|
+
var createResponseSchema = /* @__PURE__ */ __name((resultSchema = z26.undefined()) => z26.object({
|
|
1366
|
+
id: z26.union([
|
|
1367
|
+
z26.string(),
|
|
1368
|
+
z26.number()
|
|
1369
|
+
]),
|
|
1370
|
+
jsonrpc: z26.literal(jsonrpc),
|
|
1338
1371
|
result: resultSchema
|
|
1339
1372
|
}), "createResponseSchema");
|
|
1340
1373
|
|
|
1374
|
+
// src/types/schema/DataLakeViewerRpcSchema.ts
|
|
1375
|
+
import { PayloadZod as PayloadZod2 } from "@xyo-network/payload-model";
|
|
1376
|
+
import * as z27 from "zod";
|
|
1377
|
+
var DataLakeViewerRpcSchemas = {
|
|
1378
|
+
dataLakeViewer_get: {
|
|
1379
|
+
params: {
|
|
1380
|
+
to: z27.tuple([
|
|
1381
|
+
HashZod2
|
|
1382
|
+
]),
|
|
1383
|
+
from: z27.tuple([
|
|
1384
|
+
HashZod2
|
|
1385
|
+
])
|
|
1386
|
+
},
|
|
1387
|
+
result: {
|
|
1388
|
+
to: z27.union([
|
|
1389
|
+
PayloadZod2,
|
|
1390
|
+
ArrayBufferToJsonZod
|
|
1391
|
+
]).optional(),
|
|
1392
|
+
from: z27.union([
|
|
1393
|
+
PayloadZod2,
|
|
1394
|
+
JsonToArrayBufferZod
|
|
1395
|
+
]).optional()
|
|
1396
|
+
}
|
|
1397
|
+
},
|
|
1398
|
+
dataLakeViewer_getMany: {
|
|
1399
|
+
params: {
|
|
1400
|
+
to: z27.tuple([
|
|
1401
|
+
z27.array(HashZod2)
|
|
1402
|
+
]),
|
|
1403
|
+
from: z27.tuple([
|
|
1404
|
+
z27.array(HashZod2)
|
|
1405
|
+
])
|
|
1406
|
+
},
|
|
1407
|
+
result: {
|
|
1408
|
+
to: z27.array(z27.union([
|
|
1409
|
+
PayloadZod2,
|
|
1410
|
+
ArrayBufferToJsonZod
|
|
1411
|
+
])),
|
|
1412
|
+
from: z27.array(z27.union([
|
|
1413
|
+
PayloadZod2,
|
|
1414
|
+
JsonToArrayBufferZod
|
|
1415
|
+
]))
|
|
1416
|
+
}
|
|
1417
|
+
},
|
|
1418
|
+
dataLakeViewer_has: {
|
|
1419
|
+
params: {
|
|
1420
|
+
to: z27.tuple([
|
|
1421
|
+
HashZod2
|
|
1422
|
+
]),
|
|
1423
|
+
from: z27.tuple([
|
|
1424
|
+
HashZod2
|
|
1425
|
+
])
|
|
1426
|
+
},
|
|
1427
|
+
result: {
|
|
1428
|
+
to: z27.boolean(),
|
|
1429
|
+
from: z27.boolean()
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
};
|
|
1433
|
+
|
|
1341
1434
|
// src/types/schema/RewardsByPositionViewerRpcSchemas.ts
|
|
1342
1435
|
import { BigIntToJsonZod as BigIntToJsonZod4, JsonToBigIntZod as JsonToBigIntZod4 } from "@xylabs/hex";
|
|
1343
1436
|
import { asAttoXL1 as asAttoXL12 } from "@xyo-network/xl1-protocol";
|
|
1344
|
-
import
|
|
1437
|
+
import z28 from "zod";
|
|
1345
1438
|
var NetworkStakingStepRewardsByPositionViewerRpcSchemas = {
|
|
1346
1439
|
networkStakingStepRewardsByPositionViewer_bonus: {
|
|
1347
1440
|
params: {
|
|
1348
|
-
from:
|
|
1441
|
+
from: z28.tuple([
|
|
1349
1442
|
RewardsRangeOptionsZod.optional()
|
|
1350
1443
|
]),
|
|
1351
|
-
to:
|
|
1444
|
+
to: z28.tuple([
|
|
1352
1445
|
RewardsRangeOptionsZod.optional()
|
|
1353
1446
|
])
|
|
1354
1447
|
},
|
|
1355
1448
|
result: {
|
|
1356
|
-
from:
|
|
1357
|
-
to:
|
|
1449
|
+
from: z28.record(z28.number(), JsonToBigIntZod4.transform((val) => asAttoXL12(val))),
|
|
1450
|
+
to: z28.record(z28.number(), BigIntToJsonZod4)
|
|
1358
1451
|
}
|
|
1359
1452
|
},
|
|
1360
1453
|
networkStakingStepRewardsByPositionViewer_claimed: {
|
|
1361
1454
|
params: {
|
|
1362
|
-
from:
|
|
1455
|
+
from: z28.tuple([
|
|
1363
1456
|
RewardsRangeOptionsZod.optional()
|
|
1364
1457
|
]),
|
|
1365
|
-
to:
|
|
1458
|
+
to: z28.tuple([
|
|
1366
1459
|
RewardsRangeOptionsZod.optional()
|
|
1367
1460
|
])
|
|
1368
1461
|
},
|
|
1369
1462
|
result: {
|
|
1370
|
-
from:
|
|
1371
|
-
to:
|
|
1463
|
+
from: z28.record(z28.number(), BigIntToJsonZod4.transform((val) => asAttoXL12(val))),
|
|
1464
|
+
to: z28.record(z28.number(), JsonToBigIntZod4)
|
|
1372
1465
|
}
|
|
1373
1466
|
},
|
|
1374
1467
|
networkStakingStepRewardsByPositionViewer_earned: {
|
|
1375
1468
|
params: {
|
|
1376
|
-
from:
|
|
1469
|
+
from: z28.tuple([
|
|
1377
1470
|
RewardsRangeOptionsZod.optional()
|
|
1378
1471
|
]),
|
|
1379
|
-
to:
|
|
1472
|
+
to: z28.tuple([
|
|
1380
1473
|
RewardsRangeOptionsZod.optional()
|
|
1381
1474
|
])
|
|
1382
1475
|
},
|
|
1383
1476
|
result: {
|
|
1384
|
-
from:
|
|
1385
|
-
to:
|
|
1477
|
+
from: z28.record(z28.number(), BigIntToJsonZod4.transform((val) => asAttoXL12(val))),
|
|
1478
|
+
to: z28.record(z28.number(), JsonToBigIntZod4)
|
|
1386
1479
|
}
|
|
1387
1480
|
},
|
|
1388
1481
|
networkStakingStepRewardsByPositionViewer_total: {
|
|
1389
1482
|
params: {
|
|
1390
|
-
from:
|
|
1483
|
+
from: z28.tuple([
|
|
1391
1484
|
RewardsRangeOptionsZod.optional()
|
|
1392
1485
|
]),
|
|
1393
|
-
to:
|
|
1486
|
+
to: z28.tuple([
|
|
1394
1487
|
RewardsRangeOptionsZod.optional()
|
|
1395
1488
|
])
|
|
1396
1489
|
},
|
|
1397
1490
|
result: {
|
|
1398
|
-
from:
|
|
1399
|
-
to:
|
|
1491
|
+
from: z28.record(z28.number(), BigIntToJsonZod4.transform((val) => asAttoXL12(val))),
|
|
1492
|
+
to: z28.record(z28.number(), JsonToBigIntZod4)
|
|
1400
1493
|
}
|
|
1401
1494
|
},
|
|
1402
1495
|
networkStakingStepRewardsByPositionViewer_unclaimed: {
|
|
1403
1496
|
params: {
|
|
1404
|
-
from:
|
|
1497
|
+
from: z28.tuple([
|
|
1405
1498
|
RewardsRangeOptionsZod.optional()
|
|
1406
1499
|
]),
|
|
1407
|
-
to:
|
|
1500
|
+
to: z28.tuple([
|
|
1408
1501
|
RewardsRangeOptionsZod.optional()
|
|
1409
1502
|
])
|
|
1410
1503
|
},
|
|
1411
1504
|
result: {
|
|
1412
|
-
from:
|
|
1413
|
-
to:
|
|
1505
|
+
from: z28.record(z28.number(), BigIntToJsonZod4.transform((val) => asAttoXL12(val))),
|
|
1506
|
+
to: z28.record(z28.number(), JsonToBigIntZod4)
|
|
1414
1507
|
}
|
|
1415
1508
|
}
|
|
1416
1509
|
};
|
|
1417
1510
|
|
|
1418
1511
|
// src/types/schema/RewardsByStakerViewerRpcSchemas.ts
|
|
1419
1512
|
import { BigIntToJsonZod as BigIntToJsonZod5, JsonToBigIntZod as JsonToBigIntZod5 } from "@xylabs/hex";
|
|
1420
|
-
import
|
|
1513
|
+
import z29 from "zod";
|
|
1421
1514
|
var NetworkStakingStepRewardsByStakerViewerRpcSchemas = {
|
|
1422
1515
|
networkStakingStepRewardsByStakerViewer_bonus: {
|
|
1423
1516
|
params: {
|
|
1424
|
-
from:
|
|
1517
|
+
from: z29.tuple([
|
|
1425
1518
|
RewardsRangeOptionsZod.optional()
|
|
1426
1519
|
]),
|
|
1427
|
-
to:
|
|
1520
|
+
to: z29.tuple([
|
|
1428
1521
|
RewardsRangeOptionsZod.optional()
|
|
1429
1522
|
])
|
|
1430
1523
|
},
|
|
1431
1524
|
result: {
|
|
1432
|
-
from:
|
|
1433
|
-
to:
|
|
1525
|
+
from: z29.record(AddressZod, BigIntToJsonZod5),
|
|
1526
|
+
to: z29.record(AddressZod, JsonToBigIntZod5)
|
|
1434
1527
|
}
|
|
1435
1528
|
},
|
|
1436
1529
|
networkStakingStepRewardsByStakerViewer_claimed: {
|
|
1437
1530
|
params: {
|
|
1438
|
-
from:
|
|
1531
|
+
from: z29.tuple([
|
|
1439
1532
|
RewardsRangeOptionsZod.optional()
|
|
1440
1533
|
]),
|
|
1441
|
-
to:
|
|
1534
|
+
to: z29.tuple([
|
|
1442
1535
|
RewardsRangeOptionsZod.optional()
|
|
1443
1536
|
])
|
|
1444
1537
|
},
|
|
1445
1538
|
result: {
|
|
1446
|
-
from:
|
|
1447
|
-
to:
|
|
1539
|
+
from: z29.record(AddressZod, BigIntToJsonZod5),
|
|
1540
|
+
to: z29.record(AddressZod, JsonToBigIntZod5)
|
|
1448
1541
|
}
|
|
1449
1542
|
},
|
|
1450
1543
|
networkStakingStepRewardsByStakerViewer_earned: {
|
|
1451
1544
|
params: {
|
|
1452
|
-
from:
|
|
1545
|
+
from: z29.tuple([
|
|
1453
1546
|
RewardsRangeOptionsZod.optional()
|
|
1454
1547
|
]),
|
|
1455
|
-
to:
|
|
1548
|
+
to: z29.tuple([
|
|
1456
1549
|
RewardsRangeOptionsZod.optional()
|
|
1457
1550
|
])
|
|
1458
1551
|
},
|
|
1459
1552
|
result: {
|
|
1460
|
-
from:
|
|
1461
|
-
to:
|
|
1553
|
+
from: z29.record(AddressZod, BigIntToJsonZod5),
|
|
1554
|
+
to: z29.record(AddressZod, JsonToBigIntZod5)
|
|
1462
1555
|
}
|
|
1463
1556
|
},
|
|
1464
1557
|
networkStakingStepRewardsByStakerViewer_total: {
|
|
1465
1558
|
params: {
|
|
1466
|
-
from:
|
|
1559
|
+
from: z29.tuple([
|
|
1467
1560
|
RewardsRangeOptionsZod.optional()
|
|
1468
1561
|
]),
|
|
1469
|
-
to:
|
|
1562
|
+
to: z29.tuple([
|
|
1470
1563
|
RewardsRangeOptionsZod.optional()
|
|
1471
1564
|
])
|
|
1472
1565
|
},
|
|
1473
1566
|
result: {
|
|
1474
|
-
from:
|
|
1475
|
-
to:
|
|
1567
|
+
from: z29.record(AddressZod, BigIntToJsonZod5),
|
|
1568
|
+
to: z29.record(AddressZod, JsonToBigIntZod5)
|
|
1476
1569
|
}
|
|
1477
1570
|
},
|
|
1478
1571
|
networkStakingStepRewardsByStakerViewer_unclaimed: {
|
|
1479
1572
|
params: {
|
|
1480
|
-
from:
|
|
1573
|
+
from: z29.tuple([
|
|
1481
1574
|
RewardsRangeOptionsZod.optional()
|
|
1482
1575
|
]),
|
|
1483
|
-
to:
|
|
1576
|
+
to: z29.tuple([
|
|
1484
1577
|
RewardsRangeOptionsZod.optional()
|
|
1485
1578
|
])
|
|
1486
1579
|
},
|
|
1487
1580
|
result: {
|
|
1488
|
-
from:
|
|
1489
|
-
to:
|
|
1581
|
+
from: z29.record(AddressZod, BigIntToJsonZod5),
|
|
1582
|
+
to: z29.record(AddressZod, JsonToBigIntZod5)
|
|
1490
1583
|
}
|
|
1491
1584
|
}
|
|
1492
1585
|
};
|
|
1493
1586
|
|
|
1494
1587
|
// src/types/schema/RewardsByStepViewerRpcSchemas.ts
|
|
1495
1588
|
import { BigIntToJsonZod as BigIntToJsonZod6, JsonToBigIntZod as JsonToBigIntZod6 } from "@xylabs/hex";
|
|
1496
|
-
import
|
|
1589
|
+
import z30 from "zod";
|
|
1497
1590
|
var NetworkStakingStepRewardsByStepViewerRpcSchemas = {
|
|
1498
1591
|
networkStakingStepRewardsByStepViewer_bonus: {
|
|
1499
1592
|
params: {
|
|
1500
|
-
from:
|
|
1593
|
+
from: z30.tuple([
|
|
1501
1594
|
RewardsRangeOptionsZod.optional()
|
|
1502
1595
|
]),
|
|
1503
|
-
to:
|
|
1596
|
+
to: z30.tuple([
|
|
1504
1597
|
RewardsRangeOptionsZod.optional()
|
|
1505
1598
|
])
|
|
1506
1599
|
},
|
|
1507
1600
|
result: {
|
|
1508
|
-
from:
|
|
1509
|
-
to:
|
|
1601
|
+
from: z30.record(AddressZod, BigIntToJsonZod6),
|
|
1602
|
+
to: z30.record(AddressZod, JsonToBigIntZod6)
|
|
1510
1603
|
}
|
|
1511
1604
|
},
|
|
1512
1605
|
networkStakingStepRewardsByStepViewer_claimed: {
|
|
1513
1606
|
params: {
|
|
1514
|
-
from:
|
|
1607
|
+
from: z30.tuple([
|
|
1515
1608
|
RewardsRangeOptionsZod.optional()
|
|
1516
1609
|
]),
|
|
1517
|
-
to:
|
|
1610
|
+
to: z30.tuple([
|
|
1518
1611
|
RewardsRangeOptionsZod.optional()
|
|
1519
1612
|
])
|
|
1520
1613
|
},
|
|
1521
1614
|
result: {
|
|
1522
|
-
from:
|
|
1523
|
-
to:
|
|
1615
|
+
from: z30.record(AddressZod, BigIntToJsonZod6),
|
|
1616
|
+
to: z30.record(AddressZod, JsonToBigIntZod6)
|
|
1524
1617
|
}
|
|
1525
1618
|
},
|
|
1526
1619
|
networkStakingStepRewardsByStepViewer_earned: {
|
|
1527
1620
|
params: {
|
|
1528
|
-
from:
|
|
1621
|
+
from: z30.tuple([
|
|
1529
1622
|
RewardsRangeOptionsZod.optional()
|
|
1530
1623
|
]),
|
|
1531
|
-
to:
|
|
1624
|
+
to: z30.tuple([
|
|
1532
1625
|
RewardsRangeOptionsZod.optional()
|
|
1533
1626
|
])
|
|
1534
1627
|
},
|
|
1535
1628
|
result: {
|
|
1536
|
-
from:
|
|
1537
|
-
to:
|
|
1629
|
+
from: z30.record(AddressZod, BigIntToJsonZod6),
|
|
1630
|
+
to: z30.record(AddressZod, JsonToBigIntZod6)
|
|
1538
1631
|
}
|
|
1539
1632
|
},
|
|
1540
1633
|
networkStakingStepRewardsByStepViewer_total: {
|
|
1541
1634
|
params: {
|
|
1542
|
-
from:
|
|
1635
|
+
from: z30.tuple([
|
|
1543
1636
|
RewardsRangeOptionsZod.optional()
|
|
1544
1637
|
]),
|
|
1545
|
-
to:
|
|
1638
|
+
to: z30.tuple([
|
|
1546
1639
|
RewardsRangeOptionsZod.optional()
|
|
1547
1640
|
])
|
|
1548
1641
|
},
|
|
1549
1642
|
result: {
|
|
1550
|
-
from:
|
|
1551
|
-
to:
|
|
1643
|
+
from: z30.record(AddressZod, BigIntToJsonZod6),
|
|
1644
|
+
to: z30.record(AddressZod, JsonToBigIntZod6)
|
|
1552
1645
|
}
|
|
1553
1646
|
},
|
|
1554
1647
|
networkStakingStepRewardsByStepViewer_unclaimed: {
|
|
1555
1648
|
params: {
|
|
1556
|
-
from:
|
|
1649
|
+
from: z30.tuple([
|
|
1557
1650
|
RewardsRangeOptionsZod.optional()
|
|
1558
1651
|
]),
|
|
1559
|
-
to:
|
|
1652
|
+
to: z30.tuple([
|
|
1560
1653
|
RewardsRangeOptionsZod.optional()
|
|
1561
1654
|
])
|
|
1562
1655
|
},
|
|
1563
1656
|
result: {
|
|
1564
|
-
from:
|
|
1565
|
-
to:
|
|
1657
|
+
from: z30.record(AddressZod, BigIntToJsonZod6),
|
|
1658
|
+
to: z30.record(AddressZod, JsonToBigIntZod6)
|
|
1566
1659
|
}
|
|
1567
1660
|
}
|
|
1568
1661
|
};
|
|
@@ -1570,14 +1663,14 @@ var NetworkStakingStepRewardsByStepViewerRpcSchemas = {
|
|
|
1570
1663
|
// src/types/schema/RewardsTotalViewerRpcSchemas.ts
|
|
1571
1664
|
import { BigIntToJsonZod as BigIntToJsonZod7, JsonToBigIntZod as JsonToBigIntZod7 } from "@xylabs/hex";
|
|
1572
1665
|
import { asAttoXL1 as asAttoXL13 } from "@xyo-network/xl1-protocol";
|
|
1573
|
-
import * as
|
|
1666
|
+
import * as z31 from "zod";
|
|
1574
1667
|
var NetworkStakingStepRewardsTotalViewerRpcSchemas = {
|
|
1575
1668
|
networkStakingStepRewardsTotalViewer_bonus: {
|
|
1576
1669
|
params: {
|
|
1577
|
-
from:
|
|
1670
|
+
from: z31.tuple([
|
|
1578
1671
|
RewardsRangeOptionsZod.optional()
|
|
1579
1672
|
]),
|
|
1580
|
-
to:
|
|
1673
|
+
to: z31.tuple([
|
|
1581
1674
|
RewardsRangeOptionsZod.optional()
|
|
1582
1675
|
])
|
|
1583
1676
|
},
|
|
@@ -1588,10 +1681,10 @@ var NetworkStakingStepRewardsTotalViewerRpcSchemas = {
|
|
|
1588
1681
|
},
|
|
1589
1682
|
networkStakingStepRewardsTotalViewer_claimed: {
|
|
1590
1683
|
params: {
|
|
1591
|
-
from:
|
|
1684
|
+
from: z31.tuple([
|
|
1592
1685
|
RewardsRangeOptionsZod.optional()
|
|
1593
1686
|
]),
|
|
1594
|
-
to:
|
|
1687
|
+
to: z31.tuple([
|
|
1595
1688
|
RewardsRangeOptionsZod.optional()
|
|
1596
1689
|
])
|
|
1597
1690
|
},
|
|
@@ -1602,10 +1695,10 @@ var NetworkStakingStepRewardsTotalViewerRpcSchemas = {
|
|
|
1602
1695
|
},
|
|
1603
1696
|
networkStakingStepRewardsTotalViewer_earned: {
|
|
1604
1697
|
params: {
|
|
1605
|
-
from:
|
|
1698
|
+
from: z31.tuple([
|
|
1606
1699
|
RewardsRangeOptionsZod.optional()
|
|
1607
1700
|
]),
|
|
1608
|
-
to:
|
|
1701
|
+
to: z31.tuple([
|
|
1609
1702
|
RewardsRangeOptionsZod.optional()
|
|
1610
1703
|
])
|
|
1611
1704
|
},
|
|
@@ -1616,10 +1709,10 @@ var NetworkStakingStepRewardsTotalViewerRpcSchemas = {
|
|
|
1616
1709
|
},
|
|
1617
1710
|
networkStakingStepRewardsTotalViewer_total: {
|
|
1618
1711
|
params: {
|
|
1619
|
-
from:
|
|
1712
|
+
from: z31.tuple([
|
|
1620
1713
|
RewardsRangeOptionsZod.optional()
|
|
1621
1714
|
]),
|
|
1622
|
-
to:
|
|
1715
|
+
to: z31.tuple([
|
|
1623
1716
|
RewardsRangeOptionsZod.optional()
|
|
1624
1717
|
])
|
|
1625
1718
|
},
|
|
@@ -1630,10 +1723,10 @@ var NetworkStakingStepRewardsTotalViewerRpcSchemas = {
|
|
|
1630
1723
|
},
|
|
1631
1724
|
networkStakingStepRewardsTotalViewer_unclaimed: {
|
|
1632
1725
|
params: {
|
|
1633
|
-
from:
|
|
1726
|
+
from: z31.tuple([
|
|
1634
1727
|
RewardsRangeOptionsZod.optional()
|
|
1635
1728
|
]),
|
|
1636
|
-
to:
|
|
1729
|
+
to: z31.tuple([
|
|
1637
1730
|
RewardsRangeOptionsZod.optional()
|
|
1638
1731
|
])
|
|
1639
1732
|
},
|
|
@@ -1694,10 +1787,6 @@ var MemoryXyoClient = class {
|
|
|
1694
1787
|
}
|
|
1695
1788
|
};
|
|
1696
1789
|
|
|
1697
|
-
// src/provider/connection/HttpRpcXyoConnection.ts
|
|
1698
|
-
import { isString as isString2 } from "@xylabs/typeof";
|
|
1699
|
-
import { isDataLakeProvider } from "@xyo-network/xl1-protocol-sdk";
|
|
1700
|
-
|
|
1701
1790
|
// src/transport/HttpRpcTransport.ts
|
|
1702
1791
|
import { AxiosJson } from "@xylabs/axios";
|
|
1703
1792
|
import { isError, isUndefinedOrNull } from "@xylabs/typeof";
|
|
@@ -1784,194 +1873,6 @@ var MemoryRpcTransport = class {
|
|
|
1784
1873
|
}
|
|
1785
1874
|
};
|
|
1786
1875
|
|
|
1787
|
-
// src/provider/datalake/AbstractXyoDataLake.ts
|
|
1788
|
-
import { ObjectHasher } from "@xyo-network/hash";
|
|
1789
|
-
import { PayloadBuilder } from "@xyo-network/payload-builder";
|
|
1790
|
-
import { isAnyPayload } from "@xyo-network/payload-model";
|
|
1791
|
-
import { isHashPayload } from "@xyo-network/xl1-protocol";
|
|
1792
|
-
var AbstractXyoDataLake = class {
|
|
1793
|
-
static {
|
|
1794
|
-
__name(this, "AbstractXyoDataLake");
|
|
1795
|
-
}
|
|
1796
|
-
async fetch(hashes, maxDepth = 10) {
|
|
1797
|
-
const results = await this.get(hashes);
|
|
1798
|
-
if (maxDepth > 0) {
|
|
1799
|
-
const hashPayloads = results.filter(isHashPayload);
|
|
1800
|
-
const otherPayloads = results.filter((item) => !isHashPayload(item));
|
|
1801
|
-
const found = await this.fetch(hashPayloads.map((item) => item.hash), maxDepth - 1);
|
|
1802
|
-
const foundHashes = await Promise.all(found.map(async (item) => isAnyPayload(item) ? await PayloadBuilder.hash(item) : ObjectHasher.hashBytes(item)));
|
|
1803
|
-
const notFound = hashPayloads.filter((item) => !foundHashes.includes(item.hash));
|
|
1804
|
-
return [
|
|
1805
|
-
...otherPayloads,
|
|
1806
|
-
...found,
|
|
1807
|
-
...notFound
|
|
1808
|
-
];
|
|
1809
|
-
}
|
|
1810
|
-
return results;
|
|
1811
|
-
}
|
|
1812
|
-
async trace(hash) {
|
|
1813
|
-
const [result] = await this.get([
|
|
1814
|
-
hash
|
|
1815
|
-
]);
|
|
1816
|
-
if (isHashPayload(result)) {
|
|
1817
|
-
const [payload, route] = await this.trace(result.hash);
|
|
1818
|
-
return [
|
|
1819
|
-
payload,
|
|
1820
|
-
[
|
|
1821
|
-
result,
|
|
1822
|
-
...route
|
|
1823
|
-
]
|
|
1824
|
-
];
|
|
1825
|
-
}
|
|
1826
|
-
return [
|
|
1827
|
-
result,
|
|
1828
|
-
[]
|
|
1829
|
-
];
|
|
1830
|
-
}
|
|
1831
|
-
};
|
|
1832
|
-
|
|
1833
|
-
// src/provider/datalake/ArchivistXyoDataLake.ts
|
|
1834
|
-
import { assertEx as assertEx2 } from "@xylabs/assert";
|
|
1835
|
-
import { isAnyPayload as isAnyPayload2 } from "@xyo-network/payload-model";
|
|
1836
|
-
var ArchivistXyoDataLake = class extends AbstractXyoDataLake {
|
|
1837
|
-
static {
|
|
1838
|
-
__name(this, "ArchivistXyoDataLake");
|
|
1839
|
-
}
|
|
1840
|
-
_archivist;
|
|
1841
|
-
constructor(archivist) {
|
|
1842
|
-
super();
|
|
1843
|
-
this._archivist = archivist;
|
|
1844
|
-
}
|
|
1845
|
-
async add(items) {
|
|
1846
|
-
const payloads = items.filter(isAnyPayload2);
|
|
1847
|
-
assertEx2(payloads.length === items.length, () => "Some items are not payloads");
|
|
1848
|
-
return await this._archivist.insert(payloads);
|
|
1849
|
-
}
|
|
1850
|
-
async get(hashes) {
|
|
1851
|
-
return await this._archivist.get(hashes);
|
|
1852
|
-
}
|
|
1853
|
-
};
|
|
1854
|
-
|
|
1855
|
-
// src/provider/datalake/HttpXyoDataLake.ts
|
|
1856
|
-
import { isArrayBuffer } from "@xylabs/arraybuffer";
|
|
1857
|
-
import { assertEx as assertEx3 } from "@xylabs/assert";
|
|
1858
|
-
import { AxiosJson as AxiosJson2 } from "@xylabs/axios";
|
|
1859
|
-
import { exists } from "@xylabs/exists";
|
|
1860
|
-
import { isDefined } from "@xylabs/typeof";
|
|
1861
|
-
import { isAnyPayload as isAnyPayload3 } from "@xyo-network/payload-model";
|
|
1862
|
-
import { isHashPayload as isHashPayload2 } from "@xyo-network/xl1-protocol";
|
|
1863
|
-
import { Axios } from "axios";
|
|
1864
|
-
var HttpXyoDataLake = class extends AbstractXyoDataLake {
|
|
1865
|
-
static {
|
|
1866
|
-
__name(this, "HttpXyoDataLake");
|
|
1867
|
-
}
|
|
1868
|
-
_axiosGet;
|
|
1869
|
-
_axiosInsertBlob;
|
|
1870
|
-
_axiosInsertJson;
|
|
1871
|
-
_endpoint;
|
|
1872
|
-
constructor(endpoint) {
|
|
1873
|
-
super();
|
|
1874
|
-
this._endpoint = endpoint;
|
|
1875
|
-
this._axiosInsertJson = new AxiosJson2({
|
|
1876
|
-
baseURL: endpoint
|
|
1877
|
-
});
|
|
1878
|
-
this._axiosInsertBlob = new Axios({
|
|
1879
|
-
baseURL: endpoint,
|
|
1880
|
-
headers: {
|
|
1881
|
-
"Content-Type": "application/octet-stream",
|
|
1882
|
-
"Accept": "application/octet-stream"
|
|
1883
|
-
}
|
|
1884
|
-
});
|
|
1885
|
-
this._axiosGet = new Axios({
|
|
1886
|
-
baseURL: endpoint,
|
|
1887
|
-
headers: {
|
|
1888
|
-
"Content-Type": "application/json",
|
|
1889
|
-
"Accept": "application/octet-stream, application/json"
|
|
1890
|
-
}
|
|
1891
|
-
});
|
|
1892
|
-
}
|
|
1893
|
-
get endpoint() {
|
|
1894
|
-
return this._endpoint;
|
|
1895
|
-
}
|
|
1896
|
-
async add(items) {
|
|
1897
|
-
const results = [];
|
|
1898
|
-
for (const item of items) {
|
|
1899
|
-
if (isAnyPayload3(item)) {
|
|
1900
|
-
const result = await this.addPayload(item);
|
|
1901
|
-
if (isAnyPayload3(result)) {
|
|
1902
|
-
results.push(result);
|
|
1903
|
-
} else if (isDefined(result)) {
|
|
1904
|
-
assertEx3(false, () => "Expected result to be a Payload");
|
|
1905
|
-
}
|
|
1906
|
-
} else if (isArrayBuffer(item)) {
|
|
1907
|
-
const result = await this.addArrayBuffer(item);
|
|
1908
|
-
if (isAnyPayload3(result)) {
|
|
1909
|
-
results.push(result);
|
|
1910
|
-
} else if (isDefined(result)) {
|
|
1911
|
-
assertEx3(false, () => "Expected result to be a Payload");
|
|
1912
|
-
}
|
|
1913
|
-
}
|
|
1914
|
-
}
|
|
1915
|
-
return results;
|
|
1916
|
-
}
|
|
1917
|
-
async get(hashes) {
|
|
1918
|
-
return (await Promise.all(hashes.map(async (hash) => {
|
|
1919
|
-
return await this.getOne(hash);
|
|
1920
|
-
}))).filter(exists);
|
|
1921
|
-
}
|
|
1922
|
-
async addArrayBuffer(item) {
|
|
1923
|
-
const result = await this._axiosInsertBlob.post("/insert", item);
|
|
1924
|
-
if (result.status < 200 || result.status >= 300) {
|
|
1925
|
-
throw new Error(`Failed to add items [${result.status}]: ${result.statusText}`);
|
|
1926
|
-
}
|
|
1927
|
-
if (!isArrayBuffer(result.data)) {
|
|
1928
|
-
throw new Error("Invalid response from server (expected a ArrayBuffer)");
|
|
1929
|
-
}
|
|
1930
|
-
return result.data;
|
|
1931
|
-
}
|
|
1932
|
-
async addPayload(item) {
|
|
1933
|
-
const result = await this._axiosInsertJson.post("/insert", item);
|
|
1934
|
-
if (result.status < 200 || result.status >= 300) {
|
|
1935
|
-
throw new Error(`Failed to add items [${result.status}]: ${result.statusText}`);
|
|
1936
|
-
}
|
|
1937
|
-
if (!Array.isArray(result.data) || result.data.length !== 1) {
|
|
1938
|
-
throw new Error("Invalid response from server (expected an Array of Payloads)");
|
|
1939
|
-
}
|
|
1940
|
-
const [response] = result.data;
|
|
1941
|
-
if (!isAnyPayload3(response)) {
|
|
1942
|
-
throw new Error("Invalid response from server (expected a Payload)");
|
|
1943
|
-
}
|
|
1944
|
-
return response;
|
|
1945
|
-
}
|
|
1946
|
-
async fetchOne(hash, maxDepth = Number.MAX_SAFE_INTEGER) {
|
|
1947
|
-
if (maxDepth <= 0) {
|
|
1948
|
-
return void 0;
|
|
1949
|
-
}
|
|
1950
|
-
const result = await this.getOne(hash);
|
|
1951
|
-
if (isHashPayload2(result)) {
|
|
1952
|
-
return await this.fetchOne(result.hash, maxDepth - 1);
|
|
1953
|
-
}
|
|
1954
|
-
return result;
|
|
1955
|
-
}
|
|
1956
|
-
getOne(hash) {
|
|
1957
|
-
return this._axiosGet.get(`/get/${hash}`).then((response) => {
|
|
1958
|
-
if (response.status < 200 || response.status >= 300) {
|
|
1959
|
-
throw new Error(`Failed to get item [${response.status}]: ${response.statusText}`);
|
|
1960
|
-
}
|
|
1961
|
-
const contentType = response.headers["content-type"];
|
|
1962
|
-
if (contentType && contentType.includes("application/json")) {
|
|
1963
|
-
const parsed = JSON.parse(response.data);
|
|
1964
|
-
if (!isAnyPayload3(parsed)) {
|
|
1965
|
-
throw new Error("Invalid response from server (expected a Payload)");
|
|
1966
|
-
}
|
|
1967
|
-
return parsed;
|
|
1968
|
-
} else {
|
|
1969
|
-
throw new Error(`Unexpected content type: ${contentType}`);
|
|
1970
|
-
}
|
|
1971
|
-
});
|
|
1972
|
-
}
|
|
1973
|
-
};
|
|
1974
|
-
|
|
1975
1876
|
// src/provider/runner/JsonRpcXyoRunner.ts
|
|
1976
1877
|
var JsonRpcXyoRunner = class {
|
|
1977
1878
|
static {
|
|
@@ -1990,7 +1891,7 @@ var JsonRpcXyoRunner = class {
|
|
|
1990
1891
|
|
|
1991
1892
|
// src/provider/runner/MemoryXyoRunner.ts
|
|
1992
1893
|
import { MemoryArchivist } from "@xyo-network/archivist-memory";
|
|
1993
|
-
import { PayloadBuilder
|
|
1894
|
+
import { PayloadBuilder } from "@xyo-network/payload-builder";
|
|
1994
1895
|
import { flattenHydratedTransaction } from "@xyo-network/xl1-protocol-sdk";
|
|
1995
1896
|
var MemoryXyoRunner = class {
|
|
1996
1897
|
static {
|
|
@@ -2000,7 +1901,7 @@ var MemoryXyoRunner = class {
|
|
|
2000
1901
|
async broadcastTransaction(transaction) {
|
|
2001
1902
|
const archivist = await this.getArchivist();
|
|
2002
1903
|
await archivist.insert(flattenHydratedTransaction(transaction));
|
|
2003
|
-
return await
|
|
1904
|
+
return await PayloadBuilder.hash(transaction[0]);
|
|
2004
1905
|
}
|
|
2005
1906
|
async getArchivist() {
|
|
2006
1907
|
if (!this._archivist) {
|
|
@@ -2013,9 +1914,9 @@ var MemoryXyoRunner = class {
|
|
|
2013
1914
|
};
|
|
2014
1915
|
|
|
2015
1916
|
// src/provider/runner/NodeXyoRunner.ts
|
|
2016
|
-
import { assertEx as
|
|
1917
|
+
import { assertEx as assertEx2 } from "@xylabs/assert";
|
|
2017
1918
|
import { asArchivistInstance } from "@xyo-network/archivist-model";
|
|
2018
|
-
import { PayloadBuilder as
|
|
1919
|
+
import { PayloadBuilder as PayloadBuilder2 } from "@xyo-network/payload-builder";
|
|
2019
1920
|
import { PayloadBundleSchema } from "@xyo-network/payload-model";
|
|
2020
1921
|
import { flattenHydratedTransaction as flattenHydratedTransaction2 } from "@xyo-network/xl1-protocol-sdk";
|
|
2021
1922
|
var NodeXyoRunner = class {
|
|
@@ -2032,7 +1933,7 @@ var NodeXyoRunner = class {
|
|
|
2032
1933
|
async broadcastTransaction(transaction) {
|
|
2033
1934
|
const flattened = flattenHydratedTransaction2(transaction);
|
|
2034
1935
|
const pendingArchivist = await this.getPendingArchivist();
|
|
2035
|
-
const txHash = await
|
|
1936
|
+
const txHash = await PayloadBuilder2.hash(transaction[0]);
|
|
2036
1937
|
const payloadBundle = {
|
|
2037
1938
|
schema: PayloadBundleSchema,
|
|
2038
1939
|
payloads: flattened,
|
|
@@ -2045,12 +1946,12 @@ var NodeXyoRunner = class {
|
|
|
2045
1946
|
}
|
|
2046
1947
|
getArchivist = /* @__PURE__ */ __name(async (identifier) => {
|
|
2047
1948
|
const archivist = await this.node.resolve(identifier);
|
|
2048
|
-
return
|
|
1949
|
+
return assertEx2(asArchivistInstance(archivist), () => `Error: Could not resolve ${identifier} to an archivist instance`);
|
|
2049
1950
|
}, "getArchivist");
|
|
2050
1951
|
getPendingArchivist = /* @__PURE__ */ __name(async () => {
|
|
2051
1952
|
if (this._pendingArchivist) return this._pendingArchivist;
|
|
2052
1953
|
this._pendingArchivist = await this.getArchivist(this.pendingArchivistPath);
|
|
2053
|
-
return
|
|
1954
|
+
return assertEx2(this._pendingArchivist, () => `Error: Could not resolve pending archivist at ${this.pendingArchivistPath}`);
|
|
2054
1955
|
}, "getPendingArchivist");
|
|
2055
1956
|
};
|
|
2056
1957
|
|
|
@@ -2065,155 +1966,6 @@ var JsonRpcViewer = class {
|
|
|
2065
1966
|
}
|
|
2066
1967
|
};
|
|
2067
1968
|
|
|
2068
|
-
// src/provider/viewer/JsonRpcNetworkStakingStepRewardsByPositionViewer/JsonRpcNetworkStakingStepRewardsByPositionViewerMethods.ts
|
|
2069
|
-
var JsonRpcNetworkStakingStepRewardsByPositionViewerMethods = class extends JsonRpcViewer {
|
|
2070
|
-
static {
|
|
2071
|
-
__name(this, "JsonRpcNetworkStakingStepRewardsByPositionViewerMethods");
|
|
2072
|
-
}
|
|
2073
|
-
async bonus(options) {
|
|
2074
|
-
return await this.transport.sendRequest("networkStakingStepRewardsByPositionViewer_bonus", [
|
|
2075
|
-
options
|
|
2076
|
-
]);
|
|
2077
|
-
}
|
|
2078
|
-
async claimed(options) {
|
|
2079
|
-
return await this.transport.sendRequest("networkStakingStepRewardsByPositionViewer_claimed", [
|
|
2080
|
-
options
|
|
2081
|
-
]);
|
|
2082
|
-
}
|
|
2083
|
-
async earned(options) {
|
|
2084
|
-
return await this.transport.sendRequest("networkStakingStepRewardsByPositionViewer_earned", [
|
|
2085
|
-
options
|
|
2086
|
-
]);
|
|
2087
|
-
}
|
|
2088
|
-
async total(options) {
|
|
2089
|
-
return await this.transport.sendRequest("networkStakingStepRewardsByPositionViewer_total", [
|
|
2090
|
-
options
|
|
2091
|
-
]);
|
|
2092
|
-
}
|
|
2093
|
-
async unclaimed(options) {
|
|
2094
|
-
return await this.transport.sendRequest("networkStakingStepRewardsByPositionViewer_unclaimed", [
|
|
2095
|
-
options
|
|
2096
|
-
]);
|
|
2097
|
-
}
|
|
2098
|
-
};
|
|
2099
|
-
|
|
2100
|
-
// src/provider/viewer/JsonRpcNetworkStakingStepRewardsByPositionViewer/JsonRpcNetworkStakingStepRewardsByPositionViewer.ts
|
|
2101
|
-
var JsonRpcNetworkStakingStepRewardsByPositionViewer = class extends JsonRpcNetworkStakingStepRewardsByPositionViewerMethods {
|
|
2102
|
-
static {
|
|
2103
|
-
__name(this, "JsonRpcNetworkStakingStepRewardsByPositionViewer");
|
|
2104
|
-
}
|
|
2105
|
-
};
|
|
2106
|
-
|
|
2107
|
-
// src/provider/viewer/JsonRpcNetworkStakingStepRewardsByStakerViewer/JsonRpcNetworkStakingStepRewardsByStakerViewerMethods.ts
|
|
2108
|
-
var JsonRpcNetworkStakingStepRewardsByStakerViewerMethods = class extends JsonRpcViewer {
|
|
2109
|
-
static {
|
|
2110
|
-
__name(this, "JsonRpcNetworkStakingStepRewardsByStakerViewerMethods");
|
|
2111
|
-
}
|
|
2112
|
-
async bonus(options) {
|
|
2113
|
-
return await this.transport.sendRequest("networkStakingStepRewardsByStakerViewer_bonus", [
|
|
2114
|
-
options
|
|
2115
|
-
]);
|
|
2116
|
-
}
|
|
2117
|
-
async claimed(options) {
|
|
2118
|
-
return await this.transport.sendRequest("networkStakingStepRewardsByStakerViewer_claimed", [
|
|
2119
|
-
options
|
|
2120
|
-
]);
|
|
2121
|
-
}
|
|
2122
|
-
async earned(options) {
|
|
2123
|
-
return await this.transport.sendRequest("networkStakingStepRewardsByStakerViewer_earned", [
|
|
2124
|
-
options
|
|
2125
|
-
]);
|
|
2126
|
-
}
|
|
2127
|
-
async total(options) {
|
|
2128
|
-
return await this.transport.sendRequest("networkStakingStepRewardsByStakerViewer_total", [
|
|
2129
|
-
options
|
|
2130
|
-
]);
|
|
2131
|
-
}
|
|
2132
|
-
async unclaimed(options) {
|
|
2133
|
-
return await this.transport.sendRequest("networkStakingStepRewardsByStakerViewer_unclaimed", [
|
|
2134
|
-
options
|
|
2135
|
-
]);
|
|
2136
|
-
}
|
|
2137
|
-
};
|
|
2138
|
-
|
|
2139
|
-
// src/provider/viewer/JsonRpcNetworkStakingStepRewardsByStepViewer/JsonRpcNetworkStakingStepRewardsByStepViewerMethods.ts
|
|
2140
|
-
var JsonRpcNetworkStakingStepRewardsByStepViewerMethods = class extends JsonRpcViewer {
|
|
2141
|
-
static {
|
|
2142
|
-
__name(this, "JsonRpcNetworkStakingStepRewardsByStepViewerMethods");
|
|
2143
|
-
}
|
|
2144
|
-
async bonus(options) {
|
|
2145
|
-
return await this.transport.sendRequest("networkStakingStepRewardsByStepViewer_bonus", [
|
|
2146
|
-
options
|
|
2147
|
-
]);
|
|
2148
|
-
}
|
|
2149
|
-
async claimed(options) {
|
|
2150
|
-
return await this.transport.sendRequest("networkStakingStepRewardsByStepViewer_claimed", [
|
|
2151
|
-
options
|
|
2152
|
-
]);
|
|
2153
|
-
}
|
|
2154
|
-
async earned(options) {
|
|
2155
|
-
return await this.transport.sendRequest("networkStakingStepRewardsByStepViewer_earned", [
|
|
2156
|
-
options
|
|
2157
|
-
]);
|
|
2158
|
-
}
|
|
2159
|
-
async total(options) {
|
|
2160
|
-
return await this.transport.sendRequest("networkStakingStepRewardsByStepViewer_total", [
|
|
2161
|
-
options
|
|
2162
|
-
]);
|
|
2163
|
-
}
|
|
2164
|
-
async unclaimed(options) {
|
|
2165
|
-
return await this.transport.sendRequest("networkStakingStepRewardsByStepViewer_unclaimed", [
|
|
2166
|
-
options
|
|
2167
|
-
]);
|
|
2168
|
-
}
|
|
2169
|
-
};
|
|
2170
|
-
|
|
2171
|
-
// src/provider/viewer/JsonRpcNetworkStakingStepRewardsByStepViewer/JsonRpcNetworkStakingStepRewardsByStepViewer.ts
|
|
2172
|
-
var JsonRpcNetworkStakingStepRewardsByStepViewer = class extends JsonRpcNetworkStakingStepRewardsByStepViewerMethods {
|
|
2173
|
-
static {
|
|
2174
|
-
__name(this, "JsonRpcNetworkStakingStepRewardsByStepViewer");
|
|
2175
|
-
}
|
|
2176
|
-
};
|
|
2177
|
-
|
|
2178
|
-
// src/provider/viewer/JsonRpcNetworkStakingStepRewardsTotalViewer/JsonRpcNetworkStakingStepRewardsTotalViewerMethods.ts
|
|
2179
|
-
var JsonRpcNetworkStakingStepRewardsTotalViewerMethods = class extends JsonRpcViewer {
|
|
2180
|
-
static {
|
|
2181
|
-
__name(this, "JsonRpcNetworkStakingStepRewardsTotalViewerMethods");
|
|
2182
|
-
}
|
|
2183
|
-
async bonus(options) {
|
|
2184
|
-
return await this.transport.sendRequest("networkStakingStepRewardsTotalViewer_bonus", [
|
|
2185
|
-
options
|
|
2186
|
-
]);
|
|
2187
|
-
}
|
|
2188
|
-
async claimed(options) {
|
|
2189
|
-
return await this.transport.sendRequest("networkStakingStepRewardsTotalViewer_claimed", [
|
|
2190
|
-
options
|
|
2191
|
-
]);
|
|
2192
|
-
}
|
|
2193
|
-
async earned(options) {
|
|
2194
|
-
return await this.transport.sendRequest("networkStakingStepRewardsTotalViewer_earned", [
|
|
2195
|
-
options
|
|
2196
|
-
]);
|
|
2197
|
-
}
|
|
2198
|
-
async total(options) {
|
|
2199
|
-
return await this.transport.sendRequest("networkStakingStepRewardsTotalViewer_total", [
|
|
2200
|
-
options
|
|
2201
|
-
]);
|
|
2202
|
-
}
|
|
2203
|
-
async unclaimed(options) {
|
|
2204
|
-
return await this.transport.sendRequest("networkStakingStepRewardsTotalViewer_unclaimed", [
|
|
2205
|
-
options
|
|
2206
|
-
]);
|
|
2207
|
-
}
|
|
2208
|
-
};
|
|
2209
|
-
|
|
2210
|
-
// src/provider/viewer/JsonRpcNetworkStakingStepRewardsTotalViewer/JsonRpcNetworkStakingStepRewardsTotalViewer.ts
|
|
2211
|
-
var JsonRpcNetworkStakingStepRewardsTotalViewer = class extends JsonRpcNetworkStakingStepRewardsTotalViewerMethods {
|
|
2212
|
-
static {
|
|
2213
|
-
__name(this, "JsonRpcNetworkStakingStepRewardsTotalViewer");
|
|
2214
|
-
}
|
|
2215
|
-
};
|
|
2216
|
-
|
|
2217
1969
|
// src/provider/viewer/JsonRpcNetworkStakingStepRewardsViewer/JsonRpcNetworkStakingStepRewardsViewerMethods.ts
|
|
2218
1970
|
var JsonRpcNetworkStakingStepRewardsViewerMethods = class extends JsonRpcViewer {
|
|
2219
1971
|
static {
|
|
@@ -2226,28 +1978,22 @@ var JsonRpcNetworkStakingStepRewardsViewer = class extends JsonRpcNetworkStaking
|
|
|
2226
1978
|
static {
|
|
2227
1979
|
__name(this, "JsonRpcNetworkStakingStepRewardsViewer");
|
|
2228
1980
|
}
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
_step;
|
|
2232
|
-
_total;
|
|
2233
|
-
constructor(transport) {
|
|
1981
|
+
providers;
|
|
1982
|
+
constructor(transport, providers) {
|
|
2234
1983
|
super(transport);
|
|
2235
|
-
this.
|
|
2236
|
-
this._staker = new JsonRpcNetworkStakingStepRewardsByStakerViewerMethods(transport);
|
|
2237
|
-
this._step = new JsonRpcNetworkStakingStepRewardsByStepViewer(transport);
|
|
2238
|
-
this._total = new JsonRpcNetworkStakingStepRewardsTotalViewer(transport);
|
|
1984
|
+
this.providers = providers ?? {};
|
|
2239
1985
|
}
|
|
2240
1986
|
get position() {
|
|
2241
|
-
return this.
|
|
1987
|
+
return this.providers.position;
|
|
2242
1988
|
}
|
|
2243
1989
|
get staker() {
|
|
2244
|
-
return this.
|
|
1990
|
+
return this.providers.staker;
|
|
2245
1991
|
}
|
|
2246
1992
|
get step() {
|
|
2247
|
-
return this.
|
|
1993
|
+
return this.providers.step;
|
|
2248
1994
|
}
|
|
2249
1995
|
get total() {
|
|
2250
|
-
return this.
|
|
1996
|
+
return this.providers.total;
|
|
2251
1997
|
}
|
|
2252
1998
|
};
|
|
2253
1999
|
|
|
@@ -2279,20 +2025,20 @@ var JsonRpcNetworkStakeViewer = class extends JsonRpcNetworkStakeViewerMethods {
|
|
|
2279
2025
|
};
|
|
2280
2026
|
|
|
2281
2027
|
// src/provider/viewer/JsonRpcXyoViewer.ts
|
|
2282
|
-
import { isDefined
|
|
2028
|
+
import { isDefined } from "@xylabs/typeof";
|
|
2283
2029
|
import { asAttoXL1 as asAttoXL14, asHydratedBlock } from "@xyo-network/xl1-protocol";
|
|
2284
2030
|
var JsonRpcXyoViewer = class {
|
|
2285
2031
|
static {
|
|
2286
2032
|
__name(this, "JsonRpcXyoViewer");
|
|
2287
2033
|
}
|
|
2288
|
-
|
|
2034
|
+
providers;
|
|
2289
2035
|
transport;
|
|
2290
|
-
constructor(transport,
|
|
2036
|
+
constructor(transport, providers) {
|
|
2291
2037
|
this.transport = transport;
|
|
2292
|
-
this.
|
|
2038
|
+
this.providers = providers;
|
|
2293
2039
|
}
|
|
2294
2040
|
get networkStakeViewer() {
|
|
2295
|
-
return this.
|
|
2041
|
+
return this.providers?.networkStakeViewer;
|
|
2296
2042
|
}
|
|
2297
2043
|
async accountBalance(address) {
|
|
2298
2044
|
return asAttoXL14(await this.transport.sendRequest("xyoViewer_accountBalance", [
|
|
@@ -2300,7 +2046,7 @@ var JsonRpcXyoViewer = class {
|
|
|
2300
2046
|
]));
|
|
2301
2047
|
}
|
|
2302
2048
|
async accountBalanceHistory(address, range) {
|
|
2303
|
-
return await this.transport.sendRequest("xyoViewer_accountBalanceHistory",
|
|
2049
|
+
return await this.transport.sendRequest("xyoViewer_accountBalanceHistory", isDefined(range) ? [
|
|
2304
2050
|
address,
|
|
2305
2051
|
range
|
|
2306
2052
|
] : [
|
|
@@ -2550,8 +2296,10 @@ var HttpRpcXyoConnection = class extends XyoBaseConnection {
|
|
|
2550
2296
|
});
|
|
2551
2297
|
const runner = new JsonRpcXyoRunner(transport);
|
|
2552
2298
|
const networkStakeViewer = new JsonRpcNetworkStakeViewer(transport);
|
|
2553
|
-
const viewer = new JsonRpcXyoViewer(transport,
|
|
2554
|
-
|
|
2299
|
+
const viewer = new JsonRpcXyoViewer(transport, {
|
|
2300
|
+
networkStakeViewer
|
|
2301
|
+
});
|
|
2302
|
+
const storage = storageParam;
|
|
2555
2303
|
super({
|
|
2556
2304
|
runner,
|
|
2557
2305
|
viewer,
|
|
@@ -2560,10 +2308,36 @@ var HttpRpcXyoConnection = class extends XyoBaseConnection {
|
|
|
2560
2308
|
}
|
|
2561
2309
|
};
|
|
2562
2310
|
|
|
2311
|
+
// src/provider/datalake/JsonRpcDataLakeViewerMethods.ts
|
|
2312
|
+
var JsonRpcDataLakeViewerMethods = class extends JsonRpcViewer {
|
|
2313
|
+
static {
|
|
2314
|
+
__name(this, "JsonRpcDataLakeViewerMethods");
|
|
2315
|
+
}
|
|
2316
|
+
get(id) {
|
|
2317
|
+
throw new Error("Method not implemented.");
|
|
2318
|
+
}
|
|
2319
|
+
getMany(id) {
|
|
2320
|
+
throw new Error("Method not implemented.");
|
|
2321
|
+
}
|
|
2322
|
+
has(id) {
|
|
2323
|
+
throw new Error("Method not implemented.");
|
|
2324
|
+
}
|
|
2325
|
+
};
|
|
2326
|
+
|
|
2327
|
+
// src/provider/datalake/JsonRpcDataLakeViewer.ts
|
|
2328
|
+
var JsonRpcDataLakeViewer = class extends JsonRpcDataLakeViewerMethods {
|
|
2329
|
+
static {
|
|
2330
|
+
__name(this, "JsonRpcDataLakeViewer");
|
|
2331
|
+
}
|
|
2332
|
+
constructor(transport) {
|
|
2333
|
+
super(transport);
|
|
2334
|
+
}
|
|
2335
|
+
};
|
|
2336
|
+
|
|
2563
2337
|
// src/provider/gateway/Abstract.ts
|
|
2564
|
-
import { assertEx as
|
|
2565
|
-
import { isDefined as
|
|
2566
|
-
import { PayloadBuilder as
|
|
2338
|
+
import { assertEx as assertEx3 } from "@xylabs/assert";
|
|
2339
|
+
import { isDefined as isDefined2 } from "@xylabs/typeof";
|
|
2340
|
+
import { PayloadBuilder as PayloadBuilder3 } from "@xyo-network/payload-builder";
|
|
2567
2341
|
import { buildUnsignedTransaction } from "@xyo-network/xl1-protocol-sdk";
|
|
2568
2342
|
var AbstractXyoGateway = class {
|
|
2569
2343
|
static {
|
|
@@ -2571,14 +2345,14 @@ var AbstractXyoGateway = class {
|
|
|
2571
2345
|
}
|
|
2572
2346
|
async addPayloadsToChain(onChain, offChain, options) {
|
|
2573
2347
|
const connection = await this.connection();
|
|
2574
|
-
const viewer =
|
|
2348
|
+
const viewer = assertEx3(connection.viewer, () => "No viewer available on connection");
|
|
2575
2349
|
const signer = await this.signer();
|
|
2576
2350
|
const { nbf, exp, chain, fees } = options ?? {};
|
|
2577
|
-
const resolvedChainId =
|
|
2578
|
-
const resolvedNbf =
|
|
2579
|
-
const resolvedExp =
|
|
2351
|
+
const resolvedChainId = isDefined2(chain) ? chain : await viewer.chainId();
|
|
2352
|
+
const resolvedNbf = isDefined2(nbf) ? nbf : await viewer?.currentBlockNumber();
|
|
2353
|
+
const resolvedExp = isDefined2(exp) ? exp : resolvedNbf + 10;
|
|
2580
2354
|
const tx = await buildUnsignedTransaction(resolvedChainId, onChain, offChain, resolvedNbf, resolvedExp, await signer.address(), fees);
|
|
2581
|
-
const runner =
|
|
2355
|
+
const runner = assertEx3(connection.runner, () => "No runner available on connection");
|
|
2582
2356
|
const signedTx = await signer.signTransaction(tx);
|
|
2583
2357
|
const hash = await runner.broadcastTransaction(signedTx);
|
|
2584
2358
|
return [
|
|
@@ -2589,11 +2363,11 @@ var AbstractXyoGateway = class {
|
|
|
2589
2363
|
async addTransactionToChain(tx) {
|
|
2590
2364
|
const connection = await this.connection();
|
|
2591
2365
|
const signer = await this.signer();
|
|
2592
|
-
const runner =
|
|
2366
|
+
const runner = assertEx3(connection.runner, () => "No runner available on connection");
|
|
2593
2367
|
const signedTx = await signer.signTransaction(tx);
|
|
2594
2368
|
return await runner.broadcastTransaction([
|
|
2595
|
-
await
|
|
2596
|
-
await
|
|
2369
|
+
await PayloadBuilder3.addStorageMeta(signedTx[0]),
|
|
2370
|
+
await PayloadBuilder3.addStorageMeta(signedTx[1])
|
|
2597
2371
|
]);
|
|
2598
2372
|
}
|
|
2599
2373
|
};
|
|
@@ -2691,7 +2465,7 @@ var MemoryXyoNetwork = class {
|
|
|
2691
2465
|
};
|
|
2692
2466
|
|
|
2693
2467
|
// src/provider/permissions/MemoryXyoPermissions.ts
|
|
2694
|
-
import { assertEx as
|
|
2468
|
+
import { assertEx as assertEx4 } from "@xylabs/assert";
|
|
2695
2469
|
var MemoryXyoPermissions = class {
|
|
2696
2470
|
static {
|
|
2697
2471
|
__name(this, "MemoryXyoPermissions");
|
|
@@ -2703,7 +2477,7 @@ var MemoryXyoPermissions = class {
|
|
|
2703
2477
|
this.invoker = store.invoker;
|
|
2704
2478
|
}
|
|
2705
2479
|
get store() {
|
|
2706
|
-
return
|
|
2480
|
+
return assertEx4(this._store, () => "Store must be defined to get permissions");
|
|
2707
2481
|
}
|
|
2708
2482
|
async getPermissions() {
|
|
2709
2483
|
return await this.store.getPermissions();
|
|
@@ -2784,7 +2558,7 @@ var RpcXyoPermissions = class {
|
|
|
2784
2558
|
};
|
|
2785
2559
|
|
|
2786
2560
|
// src/provider/permissions/store/MemoryPermissions.ts
|
|
2787
|
-
import { assertEx as
|
|
2561
|
+
import { assertEx as assertEx5 } from "@xylabs/assert";
|
|
2788
2562
|
var MemoryPermissionsStore = class {
|
|
2789
2563
|
static {
|
|
2790
2564
|
__name(this, "MemoryPermissionsStore");
|
|
@@ -2795,7 +2569,7 @@ var MemoryPermissionsStore = class {
|
|
|
2795
2569
|
this._invoker = invoker;
|
|
2796
2570
|
}
|
|
2797
2571
|
get invoker() {
|
|
2798
|
-
return
|
|
2572
|
+
return assertEx5(this._invoker, () => "Invoker must be defined to get permissions");
|
|
2799
2573
|
}
|
|
2800
2574
|
async getPermissions() {
|
|
2801
2575
|
await Promise.resolve();
|
|
@@ -2854,7 +2628,6 @@ var MemoryXyoSigner = class {
|
|
|
2854
2628
|
}
|
|
2855
2629
|
};
|
|
2856
2630
|
export {
|
|
2857
|
-
AbstractXyoDataLake,
|
|
2858
2631
|
AbstractXyoGateway,
|
|
2859
2632
|
AddressZod,
|
|
2860
2633
|
AllRpcSchemas,
|
|
@@ -2864,7 +2637,7 @@ export {
|
|
|
2864
2637
|
AnySignedBoundWitnessWithStorageMetaZod,
|
|
2865
2638
|
AnySignedBoundWitnessZod,
|
|
2866
2639
|
AnyUnsignedBoundWitnessZod,
|
|
2867
|
-
|
|
2640
|
+
ArrayBufferToJsonZod,
|
|
2868
2641
|
AttoToJsonZod,
|
|
2869
2642
|
AttoZod,
|
|
2870
2643
|
BlockBoundWitnessWithStorageMetaZod,
|
|
@@ -2879,23 +2652,27 @@ export {
|
|
|
2879
2652
|
CaveatTypesZod,
|
|
2880
2653
|
CaveatsZod,
|
|
2881
2654
|
ChainZod,
|
|
2655
|
+
DataLakeViewerRpcSchemas,
|
|
2882
2656
|
HashZod2 as HashZod,
|
|
2883
2657
|
HexZod2 as HexZod,
|
|
2884
2658
|
HttpRpcTransport,
|
|
2885
2659
|
HttpRpcXyoConnection,
|
|
2886
|
-
HttpXyoDataLake,
|
|
2887
2660
|
HydratedBlockWithStorageMetaZod,
|
|
2888
2661
|
HydratedBlockZod,
|
|
2889
2662
|
HydratedTransactionZod,
|
|
2890
2663
|
InvokerPermissionZod,
|
|
2891
2664
|
JsonObjectZod,
|
|
2665
|
+
JsonRpcDataLakeViewer,
|
|
2666
|
+
JsonRpcDataLakeViewerMethods,
|
|
2892
2667
|
JsonRpcErrorCodes,
|
|
2893
2668
|
JsonRpcNetworkStakeViewer,
|
|
2894
2669
|
JsonRpcNetworkStakeViewerMethods,
|
|
2895
2670
|
JsonRpcNetworkStakingStepRewardsViewer,
|
|
2896
2671
|
JsonRpcNetworkStakingStepRewardsViewerMethods,
|
|
2672
|
+
JsonRpcViewer,
|
|
2897
2673
|
JsonRpcXyoRunner,
|
|
2898
2674
|
JsonRpcXyoViewer,
|
|
2675
|
+
JsonToArrayBufferZod,
|
|
2899
2676
|
JsonToAttoZod,
|
|
2900
2677
|
JsonToSignedHydratedTransactionZod,
|
|
2901
2678
|
JsonToStakeZod,
|