@xyo-network/xl1-rpc 1.15.1 → 1.15.3
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/README.md +11897 -1213
- package/dist/neutral/engine/index-node.d.ts +2 -2
- package/dist/neutral/engine/index-node.d.ts.map +1 -1
- package/dist/neutral/engine/index.d.ts +2 -1
- package/dist/neutral/engine/index.d.ts.map +1 -1
- package/dist/neutral/engine/rpcEngineFromConnection.d.ts +4 -0
- package/dist/neutral/engine/rpcEngineFromConnection.d.ts.map +1 -0
- package/dist/neutral/engine/rpcMethodHandlersFromConnection.d.ts +4 -0
- package/dist/neutral/engine/rpcMethodHandlersFromConnection.d.ts.map +1 -0
- package/dist/neutral/engine/rpcMethodHandlersFromPermissions.d.ts +4 -0
- package/dist/neutral/engine/rpcMethodHandlersFromPermissions.d.ts.map +1 -0
- package/dist/neutral/engine/rpcMethodHandlersFromViewer.d.ts.map +1 -1
- package/dist/neutral/index.mjs +894 -437
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/provider/client/MemoryXyoClient.d.ts +2 -2
- package/dist/neutral/provider/client/MemoryXyoClient.d.ts.map +1 -1
- package/dist/neutral/provider/client/index.d.ts +0 -1
- package/dist/neutral/provider/client/index.d.ts.map +1 -1
- package/dist/neutral/provider/index.d.ts +1 -0
- package/dist/neutral/provider/index.d.ts.map +1 -1
- package/dist/neutral/provider/permissions/MemoryXyoPermissions.d.ts +17 -0
- package/dist/neutral/provider/permissions/MemoryXyoPermissions.d.ts.map +1 -0
- package/dist/neutral/provider/permissions/RpcXyoPermissions.d.ts +11 -0
- package/dist/neutral/provider/permissions/RpcXyoPermissions.d.ts.map +1 -0
- package/dist/neutral/provider/permissions/index.d.ts +4 -0
- package/dist/neutral/provider/permissions/index.d.ts.map +1 -0
- package/dist/neutral/provider/permissions/spec/MemoryXyoPermissions.spec.d.ts +2 -0
- package/dist/neutral/provider/permissions/spec/MemoryXyoPermissions.spec.d.ts.map +1 -0
- package/dist/neutral/provider/permissions/store/MemoryPermissions.d.ts +16 -0
- package/dist/neutral/provider/permissions/store/MemoryPermissions.d.ts.map +1 -0
- package/dist/neutral/provider/permissions/store/PermissionsStore.d.ts +12 -0
- package/dist/neutral/provider/permissions/store/PermissionsStore.d.ts.map +1 -0
- package/dist/neutral/provider/permissions/store/index.d.ts +3 -0
- package/dist/neutral/provider/permissions/store/index.d.ts.map +1 -0
- package/dist/neutral/provider/signer/JsonRpcXyoSigner.d.ts +3 -2
- package/dist/neutral/provider/signer/JsonRpcXyoSigner.d.ts.map +1 -1
- package/dist/neutral/provider/signer/MemoryXyoSigner.d.ts +2 -2
- package/dist/neutral/provider/signer/MemoryXyoSigner.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/JsonRpcXyoViewer.d.ts +26 -9
- package/dist/neutral/provider/viewer/JsonRpcXyoViewer.d.ts.map +1 -1
- package/dist/neutral/transport/post-message/index.d.ts +0 -1
- package/dist/neutral/transport/post-message/index.d.ts.map +1 -1
- package/dist/neutral/types/ErrorCodes.d.ts.map +1 -1
- package/dist/neutral/types/XyoPermissions.d.ts +7 -0
- package/dist/neutral/types/XyoPermissions.d.ts.map +1 -0
- package/dist/neutral/types/index.d.ts +1 -2
- package/dist/neutral/types/index.d.ts.map +1 -1
- package/dist/neutral/types/schema/AllRpcSchemas.d.ts +914 -80
- package/dist/neutral/types/schema/AllRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/XyoPermissionsRpcSchemas.d.ts +74 -0
- package/dist/neutral/types/schema/XyoPermissionsRpcSchemas.d.ts.map +1 -0
- package/dist/neutral/types/schema/XyoProviderRpcSchemas.d.ts +4 -4
- package/dist/neutral/types/schema/XyoRunnerRpcSchemas.d.ts +4 -4
- package/dist/neutral/types/schema/XyoSignerRpcSchemas.d.ts +19 -19
- package/dist/neutral/types/schema/XyoSignerRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/XyoViewerRpcSchemas.d.ts +828 -64
- package/dist/neutral/types/schema/XyoViewerRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/common/BlockBoundWitness.d.ts +4 -4
- package/dist/neutral/types/schema/common/Chain.d.ts +2 -2
- package/dist/neutral/types/schema/common/Chain.d.ts.map +1 -1
- package/dist/neutral/types/schema/common/HydratedBlock.d.ts +5 -5
- package/dist/neutral/types/schema/common/HydratedTransaction.d.ts +14 -14
- package/dist/neutral/types/schema/common/Permission.d.ts +53 -0
- package/dist/neutral/types/schema/common/Permission.d.ts.map +1 -0
- package/dist/neutral/types/schema/common/Stake.d.ts +11 -5
- package/dist/neutral/types/schema/common/Stake.d.ts.map +1 -1
- package/dist/neutral/types/schema/common/StepContext.d.ts +6 -0
- package/dist/neutral/types/schema/common/StepContext.d.ts.map +1 -0
- package/dist/neutral/types/schema/common/TransactionBoundWitness.d.ts +4 -4
- package/dist/neutral/types/schema/common/Transfer.d.ts +33 -0
- package/dist/neutral/types/schema/common/Transfer.d.ts.map +1 -0
- package/dist/neutral/types/schema/common/index.d.ts +3 -0
- package/dist/neutral/types/schema/common/index.d.ts.map +1 -1
- package/dist/neutral/types/schema/index.d.ts +1 -1
- package/dist/neutral/types/schema/index.d.ts.map +1 -1
- package/dist/node/engine/index-node.d.ts +2 -2
- package/dist/node/engine/index-node.d.ts.map +1 -1
- package/dist/node/engine/index.d.ts +2 -1
- package/dist/node/engine/index.d.ts.map +1 -1
- package/dist/node/engine/rpcEngineFromConnection.d.ts +4 -0
- package/dist/node/engine/rpcEngineFromConnection.d.ts.map +1 -0
- package/dist/node/engine/rpcMethodHandlersFromConnection.d.ts +4 -0
- package/dist/node/engine/rpcMethodHandlersFromConnection.d.ts.map +1 -0
- package/dist/node/engine/rpcMethodHandlersFromPermissions.d.ts +4 -0
- package/dist/node/engine/rpcMethodHandlersFromPermissions.d.ts.map +1 -0
- package/dist/node/engine/rpcMethodHandlersFromViewer.d.ts.map +1 -1
- package/dist/node/index-node.mjs +900 -443
- package/dist/node/index-node.mjs.map +1 -1
- package/dist/node/provider/client/MemoryXyoClient.d.ts +2 -2
- package/dist/node/provider/client/MemoryXyoClient.d.ts.map +1 -1
- package/dist/node/provider/client/index.d.ts +0 -1
- package/dist/node/provider/client/index.d.ts.map +1 -1
- package/dist/node/provider/index.d.ts +1 -0
- package/dist/node/provider/index.d.ts.map +1 -1
- package/dist/node/provider/permissions/MemoryXyoPermissions.d.ts +17 -0
- package/dist/node/provider/permissions/MemoryXyoPermissions.d.ts.map +1 -0
- package/dist/node/provider/permissions/RpcXyoPermissions.d.ts +11 -0
- package/dist/node/provider/permissions/RpcXyoPermissions.d.ts.map +1 -0
- package/dist/node/provider/permissions/index.d.ts +4 -0
- package/dist/node/provider/permissions/index.d.ts.map +1 -0
- package/dist/node/provider/permissions/spec/MemoryXyoPermissions.spec.d.ts +2 -0
- package/dist/node/provider/permissions/spec/MemoryXyoPermissions.spec.d.ts.map +1 -0
- package/dist/node/provider/permissions/store/MemoryPermissions.d.ts +16 -0
- package/dist/node/provider/permissions/store/MemoryPermissions.d.ts.map +1 -0
- package/dist/node/provider/permissions/store/PermissionsStore.d.ts +12 -0
- package/dist/node/provider/permissions/store/PermissionsStore.d.ts.map +1 -0
- package/dist/node/provider/permissions/store/index.d.ts +3 -0
- package/dist/node/provider/permissions/store/index.d.ts.map +1 -0
- package/dist/node/provider/signer/JsonRpcXyoSigner.d.ts +3 -2
- package/dist/node/provider/signer/JsonRpcXyoSigner.d.ts.map +1 -1
- package/dist/node/provider/signer/MemoryXyoSigner.d.ts +2 -2
- package/dist/node/provider/signer/MemoryXyoSigner.d.ts.map +1 -1
- package/dist/node/provider/viewer/JsonRpcXyoViewer.d.ts +26 -9
- package/dist/node/provider/viewer/JsonRpcXyoViewer.d.ts.map +1 -1
- package/dist/node/transport/post-message/index.d.ts +0 -1
- package/dist/node/transport/post-message/index.d.ts.map +1 -1
- package/dist/node/types/ErrorCodes.d.ts.map +1 -1
- package/dist/node/types/XyoPermissions.d.ts +7 -0
- package/dist/node/types/XyoPermissions.d.ts.map +1 -0
- package/dist/node/types/index.d.ts +1 -2
- package/dist/node/types/index.d.ts.map +1 -1
- package/dist/node/types/schema/AllRpcSchemas.d.ts +914 -80
- package/dist/node/types/schema/AllRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/XyoPermissionsRpcSchemas.d.ts +74 -0
- package/dist/node/types/schema/XyoPermissionsRpcSchemas.d.ts.map +1 -0
- package/dist/node/types/schema/XyoProviderRpcSchemas.d.ts +4 -4
- package/dist/node/types/schema/XyoRunnerRpcSchemas.d.ts +4 -4
- package/dist/node/types/schema/XyoSignerRpcSchemas.d.ts +19 -19
- package/dist/node/types/schema/XyoSignerRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/XyoViewerRpcSchemas.d.ts +828 -64
- package/dist/node/types/schema/XyoViewerRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/common/BlockBoundWitness.d.ts +4 -4
- package/dist/node/types/schema/common/Chain.d.ts +2 -2
- package/dist/node/types/schema/common/Chain.d.ts.map +1 -1
- package/dist/node/types/schema/common/HydratedBlock.d.ts +5 -5
- package/dist/node/types/schema/common/HydratedTransaction.d.ts +14 -14
- package/dist/node/types/schema/common/Permission.d.ts +53 -0
- package/dist/node/types/schema/common/Permission.d.ts.map +1 -0
- package/dist/node/types/schema/common/Stake.d.ts +11 -5
- package/dist/node/types/schema/common/Stake.d.ts.map +1 -1
- package/dist/node/types/schema/common/StepContext.d.ts +6 -0
- package/dist/node/types/schema/common/StepContext.d.ts.map +1 -0
- package/dist/node/types/schema/common/TransactionBoundWitness.d.ts +4 -4
- package/dist/node/types/schema/common/Transfer.d.ts +33 -0
- package/dist/node/types/schema/common/Transfer.d.ts.map +1 -0
- package/dist/node/types/schema/common/index.d.ts +3 -0
- package/dist/node/types/schema/common/index.d.ts.map +1 -1
- package/dist/node/types/schema/index.d.ts +1 -1
- package/dist/node/types/schema/index.d.ts.map +1 -1
- package/package.json +36 -36
- package/src/engine/index-node.ts +2 -2
- package/src/engine/index.ts +2 -1
- package/src/engine/{rpcEngineFromProvider.ts → rpcEngineFromConnection.ts} +3 -3
- package/src/engine/{rpcMethodHandlersFromProvider.ts → rpcMethodHandlersFromConnection.ts} +3 -3
- package/src/engine/rpcMethodHandlersFromPermissions.ts +11 -0
- package/src/engine/rpcMethodHandlersFromViewer.ts +19 -1
- package/src/provider/client/MemoryXyoClient.ts +2 -1
- package/src/provider/client/index.ts +0 -1
- package/src/provider/client/spec/MemoryXyoClient.spec.ts +17 -31
- package/src/provider/index.ts +1 -0
- package/src/provider/permissions/MemoryXyoPermissions.ts +82 -0
- package/src/provider/permissions/RpcXyoPermissions.ts +30 -0
- package/src/provider/permissions/index.ts +3 -0
- package/src/provider/permissions/spec/MemoryXyoPermissions.spec.ts +93 -0
- package/src/provider/permissions/store/MemoryPermissions.ts +32 -0
- package/src/provider/permissions/store/PermissionsStore.ts +15 -0
- package/src/provider/permissions/store/index.ts +2 -0
- package/src/provider/signer/JsonRpcXyoSigner.ts +3 -2
- package/src/provider/signer/MemoryXyoSigner.ts +2 -2
- package/src/provider/signer/spec/RpcEngineXyoSigner.spec.ts +5 -5
- package/src/provider/viewer/JsonRpcXyoViewer.ts +105 -30
- package/src/transport/post-message/index.ts +0 -1
- package/src/types/ErrorCodes.ts +1 -0
- package/src/types/XyoPermissions.ts +13 -0
- package/src/types/index.ts +1 -2
- package/src/types/schema/AllRpcSchemas.ts +2 -0
- package/src/types/schema/XyoPermissionsRpcSchemas.ts +40 -0
- package/src/types/schema/XyoSignerRpcSchemas.ts +1 -1
- package/src/types/schema/XyoViewerRpcSchemas.ts +261 -15
- package/src/types/schema/common/Chain.ts +2 -2
- package/src/types/schema/common/Permission.ts +23 -0
- package/src/types/schema/common/Stake.ts +3 -3
- package/src/types/schema/common/StepContext.ts +6 -0
- package/src/types/schema/common/Transfer.ts +14 -0
- package/src/types/schema/common/index.ts +3 -0
- package/src/types/schema/index.ts +1 -1
- package/dist/neutral/engine/rpcEngineFromProvider.d.ts +0 -4
- package/dist/neutral/engine/rpcEngineFromProvider.d.ts.map +0 -1
- package/dist/neutral/engine/rpcMethodHandlersFromProvider.d.ts +0 -4
- package/dist/neutral/engine/rpcMethodHandlersFromProvider.d.ts.map +0 -1
- package/dist/neutral/provider/client/PermissionsStore/MemoryPermissionsStore.d.ts +0 -11
- package/dist/neutral/provider/client/PermissionsStore/MemoryPermissionsStore.d.ts.map +0 -1
- package/dist/neutral/provider/client/PermissionsStore/PermissionsStore.d.ts +0 -8
- package/dist/neutral/provider/client/PermissionsStore/PermissionsStore.d.ts.map +0 -1
- package/dist/neutral/provider/client/PermissionsStore/getPermissionsStoreFromTransport.d.ts +0 -5
- package/dist/neutral/provider/client/PermissionsStore/getPermissionsStoreFromTransport.d.ts.map +0 -1
- package/dist/neutral/provider/client/PermissionsStore/index.d.ts +0 -4
- package/dist/neutral/provider/client/PermissionsStore/index.d.ts.map +0 -1
- package/dist/neutral/provider/client/PermissionsStore/spec/MemoryPermissionsStore.spec.d.ts +0 -2
- package/dist/neutral/provider/client/PermissionsStore/spec/MemoryPermissionsStore.spec.d.ts.map +0 -1
- package/dist/neutral/transport/post-message/LegacyPostMessageRpcTransport.d.ts +0 -15
- package/dist/neutral/transport/post-message/LegacyPostMessageRpcTransport.d.ts.map +0 -1
- package/dist/neutral/types/XyoGatewayRpc.d.ts +0 -8
- package/dist/neutral/types/XyoGatewayRpc.d.ts.map +0 -1
- package/dist/neutral/types/schema/XyoGatewayRpcSchemas.d.ts +0 -437
- package/dist/neutral/types/schema/XyoGatewayRpcSchemas.d.ts.map +0 -1
- package/dist/node/engine/rpcEngineFromProvider.d.ts +0 -4
- package/dist/node/engine/rpcEngineFromProvider.d.ts.map +0 -1
- package/dist/node/engine/rpcMethodHandlersFromProvider.d.ts +0 -4
- package/dist/node/engine/rpcMethodHandlersFromProvider.d.ts.map +0 -1
- package/dist/node/provider/client/PermissionsStore/MemoryPermissionsStore.d.ts +0 -11
- package/dist/node/provider/client/PermissionsStore/MemoryPermissionsStore.d.ts.map +0 -1
- package/dist/node/provider/client/PermissionsStore/PermissionsStore.d.ts +0 -8
- package/dist/node/provider/client/PermissionsStore/PermissionsStore.d.ts.map +0 -1
- package/dist/node/provider/client/PermissionsStore/getPermissionsStoreFromTransport.d.ts +0 -5
- package/dist/node/provider/client/PermissionsStore/getPermissionsStoreFromTransport.d.ts.map +0 -1
- package/dist/node/provider/client/PermissionsStore/index.d.ts +0 -4
- package/dist/node/provider/client/PermissionsStore/index.d.ts.map +0 -1
- package/dist/node/provider/client/PermissionsStore/spec/MemoryPermissionsStore.spec.d.ts +0 -2
- package/dist/node/provider/client/PermissionsStore/spec/MemoryPermissionsStore.spec.d.ts.map +0 -1
- package/dist/node/transport/post-message/LegacyPostMessageRpcTransport.d.ts +0 -15
- package/dist/node/transport/post-message/LegacyPostMessageRpcTransport.d.ts.map +0 -1
- package/dist/node/types/XyoGatewayRpc.d.ts +0 -8
- package/dist/node/types/XyoGatewayRpc.d.ts.map +0 -1
- package/dist/node/types/schema/XyoGatewayRpcSchemas.d.ts +0 -437
- package/dist/node/types/schema/XyoGatewayRpcSchemas.d.ts.map +0 -1
- package/src/provider/client/PermissionsStore/MemoryPermissionsStore.ts +0 -33
- package/src/provider/client/PermissionsStore/PermissionsStore.ts +0 -8
- package/src/provider/client/PermissionsStore/getPermissionsStoreFromTransport.ts +0 -12
- package/src/provider/client/PermissionsStore/index.ts +0 -3
- package/src/provider/client/PermissionsStore/spec/MemoryPermissionsStore.spec.ts +0 -78
- package/src/transport/post-message/LegacyPostMessageRpcTransport.ts +0 -120
- package/src/types/XyoGatewayRpc.ts +0 -15
- package/src/types/schema/XyoGatewayRpcSchemas.ts +0 -108
|
@@ -1,437 +0,0 @@
|
|
|
1
|
-
import type { Chain } from '@xyo-network/xl1-protocol';
|
|
2
|
-
import * as z from 'zod';
|
|
3
|
-
export declare const ChainConnectionZod: z.ZodObject<{
|
|
4
|
-
chainId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Chain, Chain>]>>;
|
|
5
|
-
name: z.ZodString;
|
|
6
|
-
url: z.ZodString;
|
|
7
|
-
}, z.core.$strip>;
|
|
8
|
-
export declare const CaveatTypesZod: z.ZodEnum<{
|
|
9
|
-
chain: "chain";
|
|
10
|
-
expiration: "expiration";
|
|
11
|
-
filteredResponse: "filteredResponse";
|
|
12
|
-
rateLimit: "rateLimit";
|
|
13
|
-
}>;
|
|
14
|
-
export declare const CaveatsZod: z.ZodObject<{
|
|
15
|
-
type: z.ZodEnum<{
|
|
16
|
-
chain: "chain";
|
|
17
|
-
expiration: "expiration";
|
|
18
|
-
filteredResponse: "filteredResponse";
|
|
19
|
-
rateLimit: "rateLimit";
|
|
20
|
-
}>;
|
|
21
|
-
value: z.ZodUnknown;
|
|
22
|
-
}, z.core.$strip>;
|
|
23
|
-
export declare const PermissionZod: z.ZodObject<{
|
|
24
|
-
capability: z.ZodString;
|
|
25
|
-
caveats: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
26
|
-
type: z.ZodEnum<{
|
|
27
|
-
chain: "chain";
|
|
28
|
-
expiration: "expiration";
|
|
29
|
-
filteredResponse: "filteredResponse";
|
|
30
|
-
rateLimit: "rateLimit";
|
|
31
|
-
}>;
|
|
32
|
-
value: z.ZodUnknown;
|
|
33
|
-
}, z.core.$strip>>>;
|
|
34
|
-
invoker: z.ZodString;
|
|
35
|
-
}, z.core.$strip>;
|
|
36
|
-
export declare const InvokerPermissionZod: z.ZodObject<{
|
|
37
|
-
capability: z.ZodString;
|
|
38
|
-
caveats: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
39
|
-
type: z.ZodEnum<{
|
|
40
|
-
chain: "chain";
|
|
41
|
-
expiration: "expiration";
|
|
42
|
-
filteredResponse: "filteredResponse";
|
|
43
|
-
rateLimit: "rateLimit";
|
|
44
|
-
}>;
|
|
45
|
-
value: z.ZodUnknown;
|
|
46
|
-
}, z.core.$strip>>>;
|
|
47
|
-
invoker: z.ZodString;
|
|
48
|
-
date: z.ZodOptional<z.ZodNumber>;
|
|
49
|
-
}, z.core.$strip>;
|
|
50
|
-
export type ChainConnection = z.infer<typeof ChainConnectionZod>;
|
|
51
|
-
export declare const XyoGatewayRpcSchemas: {
|
|
52
|
-
xyoGateway_submitTransaction: {
|
|
53
|
-
params: {
|
|
54
|
-
from: z.ZodArray<z.ZodTuple<[z.ZodObject<{
|
|
55
|
-
schema: z.ZodLiteral<"network.xyo.boundwitness">;
|
|
56
|
-
addresses: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
57
|
-
readonly __hex: true;
|
|
58
|
-
}>, {
|
|
59
|
-
readonly __address: true;
|
|
60
|
-
}>, string>>>;
|
|
61
|
-
payload_hashes: z.ZodArray<z.ZodType<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
62
|
-
readonly __hex: true;
|
|
63
|
-
}>, {
|
|
64
|
-
readonly __hash: true;
|
|
65
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
66
|
-
readonly __hex: true;
|
|
67
|
-
}>, {
|
|
68
|
-
readonly __hash: true;
|
|
69
|
-
}>, unknown>>>;
|
|
70
|
-
payload_schemas: z.ZodArray<z.ZodString>;
|
|
71
|
-
previous_hashes: z.ZodArray<z.ZodNullable<z.ZodType<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
72
|
-
readonly __hex: true;
|
|
73
|
-
}>, {
|
|
74
|
-
readonly __hash: true;
|
|
75
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
76
|
-
readonly __hex: true;
|
|
77
|
-
}>, {
|
|
78
|
-
readonly __hash: true;
|
|
79
|
-
}>, unknown>>>>;
|
|
80
|
-
$destination: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
81
|
-
readonly __hex: true;
|
|
82
|
-
}>, {
|
|
83
|
-
readonly __address: true;
|
|
84
|
-
}>, string>>>;
|
|
85
|
-
$sourceQuery: z.ZodOptional<z.ZodType<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
86
|
-
readonly __hex: true;
|
|
87
|
-
}>, {
|
|
88
|
-
readonly __hash: true;
|
|
89
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
90
|
-
readonly __hex: true;
|
|
91
|
-
}>, {
|
|
92
|
-
readonly __hash: true;
|
|
93
|
-
}>, unknown>>>;
|
|
94
|
-
$signatures: z.ZodArray<z.ZodUnion<readonly [z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
95
|
-
readonly __hex: true;
|
|
96
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
97
|
-
readonly __hex: true;
|
|
98
|
-
}>, unknown>>, z.ZodNull]>>;
|
|
99
|
-
_hash: z.ZodOptional<z.ZodPipe<z.ZodType<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
100
|
-
readonly __hex: true;
|
|
101
|
-
}>, {
|
|
102
|
-
readonly __hash: true;
|
|
103
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
104
|
-
readonly __hex: true;
|
|
105
|
-
}>, {
|
|
106
|
-
readonly __hash: true;
|
|
107
|
-
}>, unknown>>, z.ZodTransform<string, import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
108
|
-
readonly __hex: true;
|
|
109
|
-
}>, {
|
|
110
|
-
readonly __hash: true;
|
|
111
|
-
}>>>>;
|
|
112
|
-
_dataHash: z.ZodOptional<z.ZodPipe<z.ZodType<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
113
|
-
readonly __hex: true;
|
|
114
|
-
}>, {
|
|
115
|
-
readonly __hash: true;
|
|
116
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
117
|
-
readonly __hex: true;
|
|
118
|
-
}>, {
|
|
119
|
-
readonly __hash: true;
|
|
120
|
-
}>, unknown>>, z.ZodTransform<string, import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
121
|
-
readonly __hex: true;
|
|
122
|
-
}>, {
|
|
123
|
-
readonly __hash: true;
|
|
124
|
-
}>>>>;
|
|
125
|
-
_sequence: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
126
|
-
nbf: z.ZodNumber;
|
|
127
|
-
exp: z.ZodNumber;
|
|
128
|
-
fees: z.ZodObject<{
|
|
129
|
-
base: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
130
|
-
readonly __hex: true;
|
|
131
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
132
|
-
readonly __hex: true;
|
|
133
|
-
}>, unknown>>;
|
|
134
|
-
gasLimit: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
135
|
-
readonly __hex: true;
|
|
136
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
137
|
-
readonly __hex: true;
|
|
138
|
-
}>, unknown>>;
|
|
139
|
-
gasPrice: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
140
|
-
readonly __hex: true;
|
|
141
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
142
|
-
readonly __hex: true;
|
|
143
|
-
}>, unknown>>;
|
|
144
|
-
priority: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
145
|
-
readonly __hex: true;
|
|
146
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
147
|
-
readonly __hex: true;
|
|
148
|
-
}>, unknown>>;
|
|
149
|
-
}, z.core.$strip>;
|
|
150
|
-
chain: z.ZodPipe<z.ZodString, z.ZodTransform<Chain, string>>;
|
|
151
|
-
from: z.ZodPipe<z.ZodString, z.ZodTransform<Chain, string>>;
|
|
152
|
-
script: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
153
|
-
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
154
|
-
schema: z.ZodString;
|
|
155
|
-
}, z.core.$catchall<z.ZodAny>>>], null>>;
|
|
156
|
-
to: z.ZodArray<z.ZodTuple<[z.ZodObject<{
|
|
157
|
-
schema: z.ZodLiteral<"network.xyo.boundwitness">;
|
|
158
|
-
addresses: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
159
|
-
readonly __hex: true;
|
|
160
|
-
}>, {
|
|
161
|
-
readonly __address: true;
|
|
162
|
-
}>, string>>>;
|
|
163
|
-
payload_hashes: z.ZodArray<z.ZodType<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
164
|
-
readonly __hex: true;
|
|
165
|
-
}>, {
|
|
166
|
-
readonly __hash: true;
|
|
167
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
168
|
-
readonly __hex: true;
|
|
169
|
-
}>, {
|
|
170
|
-
readonly __hash: true;
|
|
171
|
-
}>, unknown>>>;
|
|
172
|
-
payload_schemas: z.ZodArray<z.ZodString>;
|
|
173
|
-
previous_hashes: z.ZodArray<z.ZodNullable<z.ZodType<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
174
|
-
readonly __hex: true;
|
|
175
|
-
}>, {
|
|
176
|
-
readonly __hash: true;
|
|
177
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
178
|
-
readonly __hex: true;
|
|
179
|
-
}>, {
|
|
180
|
-
readonly __hash: true;
|
|
181
|
-
}>, unknown>>>>;
|
|
182
|
-
$destination: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
183
|
-
readonly __hex: true;
|
|
184
|
-
}>, {
|
|
185
|
-
readonly __address: true;
|
|
186
|
-
}>, string>>>;
|
|
187
|
-
$sourceQuery: z.ZodOptional<z.ZodType<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
188
|
-
readonly __hex: true;
|
|
189
|
-
}>, {
|
|
190
|
-
readonly __hash: true;
|
|
191
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
192
|
-
readonly __hex: true;
|
|
193
|
-
}>, {
|
|
194
|
-
readonly __hash: true;
|
|
195
|
-
}>, unknown>>>;
|
|
196
|
-
$signatures: z.ZodArray<z.ZodUnion<readonly [z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
197
|
-
readonly __hex: true;
|
|
198
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
199
|
-
readonly __hex: true;
|
|
200
|
-
}>, unknown>>, z.ZodNull]>>;
|
|
201
|
-
_hash: z.ZodOptional<z.ZodPipe<z.ZodType<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
202
|
-
readonly __hex: true;
|
|
203
|
-
}>, {
|
|
204
|
-
readonly __hash: true;
|
|
205
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
206
|
-
readonly __hex: true;
|
|
207
|
-
}>, {
|
|
208
|
-
readonly __hash: true;
|
|
209
|
-
}>, unknown>>, z.ZodTransform<string, import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
210
|
-
readonly __hex: true;
|
|
211
|
-
}>, {
|
|
212
|
-
readonly __hash: true;
|
|
213
|
-
}>>>>;
|
|
214
|
-
_dataHash: z.ZodOptional<z.ZodPipe<z.ZodType<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
215
|
-
readonly __hex: true;
|
|
216
|
-
}>, {
|
|
217
|
-
readonly __hash: true;
|
|
218
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
219
|
-
readonly __hex: true;
|
|
220
|
-
}>, {
|
|
221
|
-
readonly __hash: true;
|
|
222
|
-
}>, unknown>>, z.ZodTransform<string, import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
223
|
-
readonly __hex: true;
|
|
224
|
-
}>, {
|
|
225
|
-
readonly __hash: true;
|
|
226
|
-
}>>>>;
|
|
227
|
-
_sequence: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
228
|
-
nbf: z.ZodNumber;
|
|
229
|
-
exp: z.ZodNumber;
|
|
230
|
-
fees: z.ZodObject<{
|
|
231
|
-
base: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
232
|
-
readonly __hex: true;
|
|
233
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
234
|
-
readonly __hex: true;
|
|
235
|
-
}>, unknown>>;
|
|
236
|
-
gasLimit: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
237
|
-
readonly __hex: true;
|
|
238
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
239
|
-
readonly __hex: true;
|
|
240
|
-
}>, unknown>>;
|
|
241
|
-
gasPrice: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
242
|
-
readonly __hex: true;
|
|
243
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
244
|
-
readonly __hex: true;
|
|
245
|
-
}>, unknown>>;
|
|
246
|
-
priority: z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
247
|
-
readonly __hex: true;
|
|
248
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
249
|
-
readonly __hex: true;
|
|
250
|
-
}>, unknown>>;
|
|
251
|
-
}, z.core.$strip>;
|
|
252
|
-
chain: z.ZodPipe<z.ZodString, z.ZodTransform<Chain, string>>;
|
|
253
|
-
from: z.ZodPipe<z.ZodString, z.ZodTransform<Chain, string>>;
|
|
254
|
-
script: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
255
|
-
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
256
|
-
schema: z.ZodString;
|
|
257
|
-
}, z.core.$catchall<z.ZodAny>>>], null>>;
|
|
258
|
-
};
|
|
259
|
-
result: {
|
|
260
|
-
from: z.ZodObject<{
|
|
261
|
-
schema: z.ZodLiteral<"network.xyo.boundwitness">;
|
|
262
|
-
addresses: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
263
|
-
readonly __hex: true;
|
|
264
|
-
}>, {
|
|
265
|
-
readonly __address: true;
|
|
266
|
-
}>, string>>>;
|
|
267
|
-
payload_hashes: z.ZodArray<z.ZodType<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
268
|
-
readonly __hex: true;
|
|
269
|
-
}>, {
|
|
270
|
-
readonly __hash: true;
|
|
271
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
272
|
-
readonly __hex: true;
|
|
273
|
-
}>, {
|
|
274
|
-
readonly __hash: true;
|
|
275
|
-
}>, unknown>>>;
|
|
276
|
-
payload_schemas: z.ZodArray<z.ZodString>;
|
|
277
|
-
previous_hashes: z.ZodArray<z.ZodNullable<z.ZodType<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
278
|
-
readonly __hex: true;
|
|
279
|
-
}>, {
|
|
280
|
-
readonly __hash: true;
|
|
281
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
282
|
-
readonly __hex: true;
|
|
283
|
-
}>, {
|
|
284
|
-
readonly __hash: true;
|
|
285
|
-
}>, unknown>>>>;
|
|
286
|
-
$destination: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
287
|
-
readonly __hex: true;
|
|
288
|
-
}>, {
|
|
289
|
-
readonly __address: true;
|
|
290
|
-
}>, string>>>;
|
|
291
|
-
$sourceQuery: z.ZodOptional<z.ZodType<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
292
|
-
readonly __hex: true;
|
|
293
|
-
}>, {
|
|
294
|
-
readonly __hash: true;
|
|
295
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
296
|
-
readonly __hex: true;
|
|
297
|
-
}>, {
|
|
298
|
-
readonly __hash: true;
|
|
299
|
-
}>, unknown>>>;
|
|
300
|
-
$signatures: z.ZodArray<z.ZodUnion<readonly [z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
301
|
-
readonly __hex: true;
|
|
302
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
303
|
-
readonly __hex: true;
|
|
304
|
-
}>, unknown>>, z.ZodNull]>>;
|
|
305
|
-
_hash: z.ZodOptional<z.ZodPipe<z.ZodType<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
306
|
-
readonly __hex: true;
|
|
307
|
-
}>, {
|
|
308
|
-
readonly __hash: true;
|
|
309
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
310
|
-
readonly __hex: true;
|
|
311
|
-
}>, {
|
|
312
|
-
readonly __hash: true;
|
|
313
|
-
}>, unknown>>, z.ZodTransform<string, import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
314
|
-
readonly __hex: true;
|
|
315
|
-
}>, {
|
|
316
|
-
readonly __hash: true;
|
|
317
|
-
}>>>>;
|
|
318
|
-
_dataHash: z.ZodOptional<z.ZodPipe<z.ZodType<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
319
|
-
readonly __hex: true;
|
|
320
|
-
}>, {
|
|
321
|
-
readonly __hash: true;
|
|
322
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
323
|
-
readonly __hex: true;
|
|
324
|
-
}>, {
|
|
325
|
-
readonly __hash: true;
|
|
326
|
-
}>, unknown>>, z.ZodTransform<string, import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
327
|
-
readonly __hex: true;
|
|
328
|
-
}>, {
|
|
329
|
-
readonly __hash: true;
|
|
330
|
-
}>>>>;
|
|
331
|
-
_sequence: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
332
|
-
block: z.ZodNumber;
|
|
333
|
-
chain: z.ZodPipe<z.ZodString, z.ZodTransform<Chain, string>>;
|
|
334
|
-
previous: z.ZodNullable<z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
335
|
-
readonly __hex: true;
|
|
336
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
337
|
-
readonly __hex: true;
|
|
338
|
-
}>, unknown>>>;
|
|
339
|
-
protocol: z.ZodOptional<z.ZodNumber>;
|
|
340
|
-
step_hashes: z.ZodOptional<z.ZodArray<z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
341
|
-
readonly __hex: true;
|
|
342
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
343
|
-
readonly __hex: true;
|
|
344
|
-
}>, unknown>>>>;
|
|
345
|
-
$epoch: z.ZodNumber;
|
|
346
|
-
}, z.core.$strip>;
|
|
347
|
-
to: z.ZodObject<{
|
|
348
|
-
schema: z.ZodLiteral<"network.xyo.boundwitness">;
|
|
349
|
-
addresses: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
350
|
-
readonly __hex: true;
|
|
351
|
-
}>, {
|
|
352
|
-
readonly __address: true;
|
|
353
|
-
}>, string>>>;
|
|
354
|
-
payload_hashes: z.ZodArray<z.ZodType<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
355
|
-
readonly __hex: true;
|
|
356
|
-
}>, {
|
|
357
|
-
readonly __hash: true;
|
|
358
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
359
|
-
readonly __hex: true;
|
|
360
|
-
}>, {
|
|
361
|
-
readonly __hash: true;
|
|
362
|
-
}>, unknown>>>;
|
|
363
|
-
payload_schemas: z.ZodArray<z.ZodString>;
|
|
364
|
-
previous_hashes: z.ZodArray<z.ZodNullable<z.ZodType<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
365
|
-
readonly __hex: true;
|
|
366
|
-
}>, {
|
|
367
|
-
readonly __hash: true;
|
|
368
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
369
|
-
readonly __hex: true;
|
|
370
|
-
}>, {
|
|
371
|
-
readonly __hash: true;
|
|
372
|
-
}>, unknown>>>>;
|
|
373
|
-
$destination: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
374
|
-
readonly __hex: true;
|
|
375
|
-
}>, {
|
|
376
|
-
readonly __address: true;
|
|
377
|
-
}>, string>>>;
|
|
378
|
-
$sourceQuery: z.ZodOptional<z.ZodType<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
379
|
-
readonly __hex: true;
|
|
380
|
-
}>, {
|
|
381
|
-
readonly __hash: true;
|
|
382
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
383
|
-
readonly __hex: true;
|
|
384
|
-
}>, {
|
|
385
|
-
readonly __hash: true;
|
|
386
|
-
}>, unknown>>>;
|
|
387
|
-
$signatures: z.ZodArray<z.ZodUnion<readonly [z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
388
|
-
readonly __hex: true;
|
|
389
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
390
|
-
readonly __hex: true;
|
|
391
|
-
}>, unknown>>, z.ZodNull]>>;
|
|
392
|
-
_hash: z.ZodOptional<z.ZodPipe<z.ZodType<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
393
|
-
readonly __hex: true;
|
|
394
|
-
}>, {
|
|
395
|
-
readonly __hash: true;
|
|
396
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
397
|
-
readonly __hex: true;
|
|
398
|
-
}>, {
|
|
399
|
-
readonly __hash: true;
|
|
400
|
-
}>, unknown>>, z.ZodTransform<string, import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
401
|
-
readonly __hex: true;
|
|
402
|
-
}>, {
|
|
403
|
-
readonly __hash: true;
|
|
404
|
-
}>>>>;
|
|
405
|
-
_dataHash: z.ZodOptional<z.ZodPipe<z.ZodType<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
406
|
-
readonly __hex: true;
|
|
407
|
-
}>, {
|
|
408
|
-
readonly __hash: true;
|
|
409
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
410
|
-
readonly __hex: true;
|
|
411
|
-
}>, {
|
|
412
|
-
readonly __hash: true;
|
|
413
|
-
}>, unknown>>, z.ZodTransform<string, import("@xylabs/typeof").Brand<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
414
|
-
readonly __hex: true;
|
|
415
|
-
}>, {
|
|
416
|
-
readonly __hash: true;
|
|
417
|
-
}>>>>;
|
|
418
|
-
_sequence: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
419
|
-
block: z.ZodNumber;
|
|
420
|
-
chain: z.ZodPipe<z.ZodString, z.ZodTransform<Chain, string>>;
|
|
421
|
-
previous: z.ZodNullable<z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
422
|
-
readonly __hex: true;
|
|
423
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
424
|
-
readonly __hex: true;
|
|
425
|
-
}>, unknown>>>;
|
|
426
|
-
protocol: z.ZodOptional<z.ZodNumber>;
|
|
427
|
-
step_hashes: z.ZodOptional<z.ZodArray<z.ZodType<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
428
|
-
readonly __hex: true;
|
|
429
|
-
}>, unknown, z.core.$ZodTypeInternals<import("@xylabs/typeof").Brand<Lowercase<string>, {
|
|
430
|
-
readonly __hex: true;
|
|
431
|
-
}>, unknown>>>>;
|
|
432
|
-
$epoch: z.ZodNumber;
|
|
433
|
-
}, z.core.$strip>;
|
|
434
|
-
};
|
|
435
|
-
};
|
|
436
|
-
};
|
|
437
|
-
//# sourceMappingURL=XyoGatewayRpcSchemas.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"XyoGatewayRpcSchemas.d.ts","sourceRoot":"","sources":["../../../../src/types/schema/XyoGatewayRpcSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAMxB,eAAO,MAAM,kBAAkB;;;;iBAI7B,CAAA;AAEF,eAAO,MAAM,cAAc;;;;;EAAmE,CAAA;AAE9F,eAAO,MAAM,UAAU;;;;;;;;iBAGrB,CAAA;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;iBAIxB,CAAA;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;iBAAwD,CAAA;AAEzF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAEhE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6EgB,CAAA"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { Promisable } from '@xylabs/promise'
|
|
2
|
-
import type { InvokerPermission, Permission } from '@xyo-network/xl1-protocol'
|
|
3
|
-
|
|
4
|
-
import type { PermissionsStore } from './PermissionsStore.ts'
|
|
5
|
-
|
|
6
|
-
export class MemoryPermissionsStore implements PermissionsStore {
|
|
7
|
-
private readonly _store: Map<string, InvokerPermission> = new Map()
|
|
8
|
-
|
|
9
|
-
getPermissions(): Promisable<InvokerPermission[]> {
|
|
10
|
-
return [...this._store.values()]
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
requestPermissions(permissions: Permission[]): Promisable<boolean> {
|
|
14
|
-
const now = Date.now()
|
|
15
|
-
for (const perm of permissions) {
|
|
16
|
-
const key = this.getKey(perm)
|
|
17
|
-
this._store.set(key, { ...perm, date: now })
|
|
18
|
-
}
|
|
19
|
-
return true
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
revokePermissions(permissions: Permission[]): Promisable<boolean> {
|
|
23
|
-
for (const perm of permissions) {
|
|
24
|
-
const key = this.getKey(perm)
|
|
25
|
-
this._store.delete(key)
|
|
26
|
-
}
|
|
27
|
-
return true
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
private getKey(permission: Permission): string {
|
|
31
|
-
return `${permission.invoker}::${permission.capability}`
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Promisable } from '@xylabs/promise'
|
|
2
|
-
import type { InvokerPermission, Permission } from '@xyo-network/xl1-protocol'
|
|
3
|
-
|
|
4
|
-
export interface PermissionsStore {
|
|
5
|
-
getPermissions(): Promisable<InvokerPermission[]>
|
|
6
|
-
requestPermissions(permissions: Permission[]): Promisable<boolean>
|
|
7
|
-
revokePermissions(permissions: Permission[]): Promisable<boolean>
|
|
8
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type RpcTransport } from '../../../transport/index.ts'
|
|
2
|
-
import type { XyoGatewayRpcSchemas } from '../../../types/index.ts'
|
|
3
|
-
import type { PermissionsStore } from './PermissionsStore.ts'
|
|
4
|
-
|
|
5
|
-
export const getPermissionsStoreFromTransport = (_transport: RpcTransport<typeof XyoGatewayRpcSchemas>): PermissionsStore => {
|
|
6
|
-
throw new Error('Not implemented')
|
|
7
|
-
// return {
|
|
8
|
-
// getPermissions: () => transport.sendRequest('xyoGateway_getPermissions'),
|
|
9
|
-
// requestPermissions: (permissions: Permission[]) => transport.sendRequest('xyoGateway_requestPermissions', permissions),
|
|
10
|
-
// revokePermissions: (permissions: Permission[]) => transport.sendRequest('xyoGateway_revokePermissions', permissions),
|
|
11
|
-
// }
|
|
12
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import type { Permission } from '@xyo-network/xl1-protocol'
|
|
2
|
-
import {
|
|
3
|
-
beforeEach, describe, expect, it,
|
|
4
|
-
} from 'vitest'
|
|
5
|
-
|
|
6
|
-
import { MemoryPermissionsStore } from '../MemoryPermissionsStore.ts'
|
|
7
|
-
|
|
8
|
-
describe('MemoryPermissionsStore', () => {
|
|
9
|
-
const invoker = 'https://example.com'
|
|
10
|
-
const capability = 'xyoViewer_chainId'
|
|
11
|
-
let store: MemoryPermissionsStore
|
|
12
|
-
const basePermission: Permission = { capability, invoker }
|
|
13
|
-
|
|
14
|
-
beforeEach(() => {
|
|
15
|
-
store = new MemoryPermissionsStore()
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
it('returns an empty list initially', async () => {
|
|
19
|
-
const permissions = await store.getPermissions()
|
|
20
|
-
expect(permissions).toEqual([])
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
it('adds and retrieves a permission', async () => {
|
|
24
|
-
const result = await store.requestPermissions([basePermission])
|
|
25
|
-
expect(result).toBe(true)
|
|
26
|
-
|
|
27
|
-
const permissions = await store.getPermissions()
|
|
28
|
-
expect(permissions.length).toBe(1)
|
|
29
|
-
expect(permissions[0].capability).toBe(basePermission.capability)
|
|
30
|
-
expect(permissions[0].invoker).toBe(basePermission.invoker)
|
|
31
|
-
expect(typeof permissions[0].date).toBe('number')
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
it('replaces an existing permission with the same key', async () => {
|
|
35
|
-
const original = { ...basePermission }
|
|
36
|
-
const updated = { ...basePermission }
|
|
37
|
-
|
|
38
|
-
await store.requestPermissions([original])
|
|
39
|
-
const originalDate = (await store.getPermissions())[0].date
|
|
40
|
-
|
|
41
|
-
await new Promise(r => setTimeout(r, 5)) // ensure timestamp difference
|
|
42
|
-
await store.requestPermissions([updated])
|
|
43
|
-
const updatedDate = (await store.getPermissions())[0].date
|
|
44
|
-
|
|
45
|
-
expect(updatedDate).toBeGreaterThan(originalDate!)
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
it('revokes a previously granted permission', async () => {
|
|
49
|
-
await store.requestPermissions([basePermission])
|
|
50
|
-
expect((await store.getPermissions()).length).toBe(1)
|
|
51
|
-
|
|
52
|
-
const result = await store.revokePermissions([basePermission])
|
|
53
|
-
expect(result).toBe(true)
|
|
54
|
-
|
|
55
|
-
const permissions = await store.getPermissions()
|
|
56
|
-
expect(permissions).toEqual([])
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
it('revoking a non-existent permission does nothing and returns true', async () => {
|
|
60
|
-
const result = await store.revokePermissions([basePermission])
|
|
61
|
-
expect(result).toBe(true)
|
|
62
|
-
expect(await store.getPermissions()).toEqual([])
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
it('can handle multiple permissions from different invokers', async () => {
|
|
66
|
-
const perms: Permission[] = [
|
|
67
|
-
{ invoker: 'https://a.com', capability: 'xyo_1' },
|
|
68
|
-
{ invoker: 'https://b.com', capability: 'xyo_2' },
|
|
69
|
-
{ invoker: 'https://a.com', capability: 'xyo_3' },
|
|
70
|
-
]
|
|
71
|
-
|
|
72
|
-
await store.requestPermissions(perms)
|
|
73
|
-
const results = await store.getPermissions()
|
|
74
|
-
|
|
75
|
-
expect(results.length).toBe(3)
|
|
76
|
-
expect(results.map(p => p.capability).toSorted((a, b) => a.localeCompare(b))).toEqual(['xyo_1', 'xyo_2', 'xyo_3'])
|
|
77
|
-
})
|
|
78
|
-
})
|