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