iso-ucan 0.4.2 → 0.5.0
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/src/capability.d.ts +0 -3
- package/dist/src/capability.d.ts.map +1 -1
- package/dist/src/delegation.d.ts +4 -1
- package/dist/src/delegation.d.ts.map +1 -1
- package/dist/src/invocation.d.ts.map +1 -1
- package/dist/src/rpc/client.d.ts +24 -0
- package/dist/src/rpc/client.d.ts.map +1 -0
- package/dist/src/rpc/command.d.ts +19 -0
- package/dist/src/rpc/command.d.ts.map +1 -0
- package/dist/src/rpc/index.d.ts +5 -0
- package/dist/src/rpc/index.d.ts.map +1 -0
- package/dist/src/rpc/receipt.d.ts +114 -0
- package/dist/src/rpc/receipt.d.ts.map +1 -0
- package/dist/src/rpc/server.d.ts +18 -0
- package/dist/src/rpc/server.d.ts.map +1 -0
- package/dist/src/rpc/types.d.ts +112 -0
- package/dist/src/rpc/types.d.ts.map +1 -0
- package/dist/src/store.d.ts +4 -2
- package/dist/src/store.d.ts.map +1 -1
- package/dist/src/types.d.ts +15 -3
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils.d.ts +4 -2
- package/dist/src/utils.d.ts.map +1 -1
- package/package.json +13 -20
- package/readme.md +130 -0
- package/src/capability.js +1 -6
- package/src/delegation.js +15 -13
- package/src/invocation.js +7 -4
- package/src/rpc/client.js +85 -0
- package/src/rpc/command.js +28 -0
- package/src/rpc/index.js +10 -0
- package/src/rpc/receipt.js +136 -0
- package/src/rpc/server.js +155 -0
- package/src/rpc/types.js +9 -0
- package/src/rpc/types.ts +153 -0
- package/src/store.js +41 -16
- package/src/types.ts +15 -6
- package/src/utils.js +20 -15
- package/dist/src/client.d.ts +0 -41
- package/dist/src/client.d.ts.map +0 -1
- package/dist/src/server.d.ts +0 -38
- package/dist/src/server.d.ts.map +0 -1
- package/src/client.js +0 -52
- package/src/server.js +0 -47
package/dist/src/capability.d.ts
CHANGED
|
@@ -19,9 +19,6 @@ export class Capability<Schema extends StandardSchemaV1, Cmd extends string = st
|
|
|
19
19
|
constructor(options: CapabilityOptions<Schema, Cmd>);
|
|
20
20
|
schema: Schema;
|
|
21
21
|
cmd: Cmd;
|
|
22
|
-
isRevoked: import("./types.js").IsRevoked | undefined;
|
|
23
|
-
didResolver: import("did-resolver").Resolver | undefined;
|
|
24
|
-
verifierResolver: import("iso-signatures/verifiers/resolver.js").Resolver;
|
|
25
22
|
/**
|
|
26
23
|
* @param {StandardSchemaV1.InferInput<Schema>} args
|
|
27
24
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../src/capability.js"],"names":[],"mappings":"AAKA;;;GAGG;AAEH;;;GAGG;AACH,wBAHgC,MAAM,SAAzB,gBAAkB,EACR,GAAG,SAAb,MAAQ;
|
|
1
|
+
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../src/capability.js"],"names":[],"mappings":"AAKA;;;GAGG;AAEH;;;GAGG;AACH,wBAHgC,MAAM,SAAzB,gBAAkB,EACR,GAAG,SAAb,MAAQ;IAWnB;;;;OAIG;IACH,6BAJa,gBAAkB,gBAClB,MAAQ,oBACV,kBAAkB,QAAM,EAAE,KAAG,CAAC,+BAIxC;IAfD;;OAEG;IACH,qBAFW,kBAAkB,MAAM,EAAE,GAAG,CAAC,EAKxC;IAFC,eAA4B;IAC5B,SAAsB;IAYxB;;OAEG;IACH,eAFW,4BAA4B,MAAM,CAAC,yCAK7C;IAED;;;;;OAKG;IACH,gBAHW,OAAO,YAAY,EAAE,uBAAuB,CAAC,MAAM,CAAC,GAClD,OAAO,CAAC,UAAU,CAAC,CA0B/B;IAED;;;;;OAKG;IACH,kBAHW,0BAA0B,MAAM,CAAC,GAC/B,OAAO,CAAC,UAAU,CAAC,CAM/B;CACF;sCA7EkC,uBAAuB;2BAH/B,iBAAiB;+CAImB,YAAY;2BALhD,iBAAiB;uCAKmB,YAAY"}
|
package/dist/src/delegation.d.ts
CHANGED
|
@@ -18,8 +18,11 @@ export class Delegation {
|
|
|
18
18
|
* Create a delegation from a base64 encoded string
|
|
19
19
|
*
|
|
20
20
|
* @param {string} token
|
|
21
|
+
* @param { {now?: number}} [options]
|
|
21
22
|
*/
|
|
22
|
-
static fromString(token: string
|
|
23
|
+
static fromString(token: string, options?: {
|
|
24
|
+
now?: number;
|
|
25
|
+
}): Promise<Delegation>;
|
|
23
26
|
/**
|
|
24
27
|
*
|
|
25
28
|
* @template {StandardSchemaV1} Schema
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegation.d.ts","sourceRoot":"","sources":["../../src/delegation.js"],"names":[],"mappings":"AAgBA;;;GAGG;AAEH;;GAEG;AACH;IA0CE;;;;;;OAMG;IACH,qBAFW,OAAO,YAAY,EAAE,qBAAqB,uBAuBpD;IAED
|
|
1
|
+
{"version":3,"file":"delegation.d.ts","sourceRoot":"","sources":["../../src/delegation.js"],"names":[],"mappings":"AAgBA;;;GAGG;AAEH;;GAEG;AACH;IA0CE;;;;;;OAMG;IACH,qBAFW,OAAO,YAAY,EAAE,qBAAqB,uBAuBpD;IAED;;;;;OAKG;IACH,yBAHW,MAAM,YACL;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAC,uBAiBzB;IAED;;;;OAIG;IACH,cAHgC,MAAM,SAAzB,gBAAkB,WACpB,kBAAkB,MAAM,CAAC,uBA6CnC;IA3HD;;;;;OAKG;IACH,sBAJW,OAAO,YAAY,EAAE,eAAe,CAAC,KAAK,CAAC,SAC3C,UAAU,OACV,GAAG,EAgBb;IAvCD,qBAAqB;IACrB,KADW,MAAM,CACd;IACH,kBAAkB;IAClB,KADW,GAAG,CACX;IACH,yBAAyB;IACzB,KADW,GAAG,GAAG,IAAI,CAClB;IACH,qBAAqB;IACrB,KADW,MAAM,CACd;IACH,qBAAqB;IACrB,KADW,MAAM,CACd;IACH,iCAAiC;IACjC,KADW,MAAM,GAAG,SAAS,CAC1B;IACH,yBAAyB;IACzB,OADW,UAAU,CAChB;IACL,kDAAkD;IAClD,MADW,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAC1C;IACJ,4BAA4B;IAC5B,KADW,MAAM,GAAG,IAAI,CACrB;IASD,sDAAwB;IACxB,mCAAkB;IAClB,8DAAc;IAoHhB;;;;;;OAMG;IACH,kBAFW,yBAAyB,oBAanC;IAED,mBAEC;IAED;;;;;;;;;;;;;;;;;;;;;MAuBC;CACF;4BAxMwH,YAAY;yBAAZ,YAAY;4BAAZ,YAAY;yBAC/G,cAAc;+CADqF,YAAY;sCAAZ,YAAY;uCAAZ,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invocation.d.ts","sourceRoot":"","sources":["../../src/invocation.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"invocation.d.ts","sourceRoot":"","sources":["../../src/invocation.js"],"names":[],"mappings":"AAqLA;;;;GAIG;AACH,sCAHW,OAAO,YAAY,EAAE,iBAAiB,UACtC,UAAU,EAAE,WA6DtB;AAtOD;;;GAGG;AAEH;;GAEG;AACH;IA0BE;;;OAGG;IACH,qBAFW,OAAO,YAAY,EAAE,qBAAqB,uBAgDpD;IAED;;OAEG;IACH,uBAFW,OAAO,YAAY,EAAE,iBAAiB,uBA0DhD;IA9HD;;;;;;OAMG;IACH,sBALW,OAAO,YAAY,EAAE,eAAe,CAAC,KAAK,CAAC,SAC3C,UAAU,OACV,GAAG,eACH,UAAU,EAAE,EAQtB;IAvBD;;OAEG;IACH,aAFU,UAAU,EAAE,CAEX;IAEX;;OAEG;IACH,KAFU,GAAG,CAEV;IAUD,sDAAwB;IACxB,gDAA+B;IAC/B,mCAAkB;CAqHrB;gCAjJ4B,iBAAiB;yBACxB,cAAc"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import {
|
|
3
|
+
* CommandsRecord,
|
|
4
|
+
* DefineClientOptions,
|
|
5
|
+
* CommandClient,
|
|
6
|
+
* } from './types.js'
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Define a type-safe client from a record of commands.
|
|
10
|
+
*
|
|
11
|
+
* The returned client exposes a `request(cmd, args)` method whose `cmd`
|
|
12
|
+
* parameter is constrained to the union of `cmd` values declared by
|
|
13
|
+
* `commands`, and whose `args` parameter is typed accordingly.
|
|
14
|
+
*
|
|
15
|
+
* @template {CommandsRecord} Commands
|
|
16
|
+
* @param {Commands} commands
|
|
17
|
+
* @param {DefineClientOptions} options
|
|
18
|
+
* @returns {CommandClient<Commands>}
|
|
19
|
+
*/
|
|
20
|
+
export function defineClient<Commands extends CommandsRecord>(commands: Commands, options: DefineClientOptions): CommandClient<Commands>;
|
|
21
|
+
import type { CommandsRecord } from './types.js';
|
|
22
|
+
import type { DefineClientOptions } from './types.js';
|
|
23
|
+
import type { CommandClient } from './types.js';
|
|
24
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/rpc/client.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH;;;;;;;;;;;GAWG;AACH,6BAL8B,QAAQ,SAAzB,cAAgB,YAClB,QAAQ,WACR,mBAAmB,GACjB,cAAc,QAAQ,CAAC,CAgEnC;oCA7ES,YAAY;yCAAZ,YAAY;mCAAZ,YAAY"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import {
|
|
3
|
+
* CommandOptions,
|
|
4
|
+
* CommandOutput,
|
|
5
|
+
* } from './types.js'
|
|
6
|
+
* @import {StandardSchemaV1} from '@standard-schema/spec'
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @template {StandardSchemaV1} Args
|
|
10
|
+
* @template {string} Cmd
|
|
11
|
+
* @template {StandardSchemaV1} ReceiptSchema
|
|
12
|
+
* @param {CommandOptions<Args, Cmd, ReceiptSchema>} options
|
|
13
|
+
* @returns {CommandOutput<Args, Cmd, ReceiptSchema>}
|
|
14
|
+
*/
|
|
15
|
+
export function defineCommand<Args extends StandardSchemaV1, Cmd extends string, ReceiptSchema extends StandardSchemaV1>(options: CommandOptions<Args, Cmd, ReceiptSchema>): CommandOutput<Args, Cmd, ReceiptSchema>;
|
|
16
|
+
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
17
|
+
import type { CommandOptions } from './types.js';
|
|
18
|
+
import type { CommandOutput } from './types.js';
|
|
19
|
+
//# sourceMappingURL=command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/rpc/command.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH;;;;;;GAMG;AACH,8BANgC,IAAI,SAAvB,gBAAkB,EACT,GAAG,SAAZ,MAAQ,EACW,aAAa,SAAhC,gBAAkB,WACpB,eAAe,IAAI,EAAE,GAAG,EAAE,aAAa,CAAC,GACtC,cAAc,IAAI,EAAE,GAAG,EAAE,aAAa,CAAC,CAYnD;sCApBkC,uBAAuB;oCADhD,YAAY;mCAAZ,YAAY"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { defineClient } from "./client.js";
|
|
2
|
+
export { defineCommand } from "./command.js";
|
|
3
|
+
export { defineServer } from "./server.js";
|
|
4
|
+
export { cidSchema, receipt, receiptError, receiptResult, receiptServerError } from "./receipt.js";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rpc/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema for a successful receipt: `{ cid, result }`.
|
|
3
|
+
*
|
|
4
|
+
* @template {zType.ZodType} ResultSchema
|
|
5
|
+
* @param {ResultSchema} result Schema for the `result` payload.
|
|
6
|
+
* @returns {zType.ZodObject<{ cid: typeof cidSchema, result: ResultSchema }>}
|
|
7
|
+
*/
|
|
8
|
+
export function receiptResult<ResultSchema extends z.ZodType>(result: ResultSchema): z.ZodObject<{
|
|
9
|
+
cid: typeof cidSchema;
|
|
10
|
+
result: ResultSchema;
|
|
11
|
+
}>;
|
|
12
|
+
/**
|
|
13
|
+
* Schema for an error receipt: `{ cid, error: { code, message, data } }`.
|
|
14
|
+
*
|
|
15
|
+
* `code` and `message` are encoded as Zod literals so each error variant is
|
|
16
|
+
* distinguishable in the resulting union.
|
|
17
|
+
*
|
|
18
|
+
* @template {string} Code
|
|
19
|
+
* @template {string} Message
|
|
20
|
+
* @template {zType.ZodType} DataSchema
|
|
21
|
+
* @param {Code} code
|
|
22
|
+
* @param {Message} message
|
|
23
|
+
* @param {DataSchema} data Schema for the structured error `data` payload.
|
|
24
|
+
* @returns {zType.ZodObject<{
|
|
25
|
+
* cid: typeof cidSchema,
|
|
26
|
+
* error: zType.ZodObject<{
|
|
27
|
+
* code: zType.ZodLiteral<Code>,
|
|
28
|
+
* message: zType.ZodLiteral<Message>,
|
|
29
|
+
* data: DataSchema,
|
|
30
|
+
* }>,
|
|
31
|
+
* }>}
|
|
32
|
+
*/
|
|
33
|
+
export function receiptError<Code extends string, Message extends string, DataSchema extends z.ZodType>(code: Code, message: Message, data: DataSchema): z.ZodObject<{
|
|
34
|
+
cid: typeof cidSchema;
|
|
35
|
+
error: z.ZodObject<{
|
|
36
|
+
code: z.ZodLiteral<Code>;
|
|
37
|
+
message: z.ZodLiteral<Message>;
|
|
38
|
+
data: DataSchema;
|
|
39
|
+
}>;
|
|
40
|
+
}>;
|
|
41
|
+
/**
|
|
42
|
+
* @typedef {zType.infer<typeof receiptServerError>} ReceiptServerError
|
|
43
|
+
*/
|
|
44
|
+
/**
|
|
45
|
+
* Combine one {@link receiptResult} schema and zero or more
|
|
46
|
+
* {@link receiptError} schemas into a single discriminated receipt schema.
|
|
47
|
+
*
|
|
48
|
+
* The {@link receiptServerError} schema is always appended as the last
|
|
49
|
+
* variant of the union so every command receipt accepts a server-emitted
|
|
50
|
+
* internal error in addition to its declared result/error variants.
|
|
51
|
+
*
|
|
52
|
+
* The resulting schema validates one of:
|
|
53
|
+
* - `{ cid, result }`
|
|
54
|
+
* - `{ cid, error: { code, message, data } }` (one of the declared command errors)
|
|
55
|
+
* - `{ error: { code, message, cid?, data? } }` (a generic server error)
|
|
56
|
+
*
|
|
57
|
+
* Consumers discriminate via `'result' in receipt` / `'error' in receipt`,
|
|
58
|
+
* and within the error branch via the `code` field.
|
|
59
|
+
*
|
|
60
|
+
* @template {zType.ZodType} Result
|
|
61
|
+
* @template {zType.ZodType} Error
|
|
62
|
+
* @param {Result} result
|
|
63
|
+
* @param {...Error} errors
|
|
64
|
+
* @returns {zType.ZodUnion<readonly [Result, ...Error[], typeof receiptServerError]>}
|
|
65
|
+
*/
|
|
66
|
+
export function receipt<Result extends z.ZodType, Error extends z.ZodType>(result: Result, ...errors: Error[]): z.ZodUnion<readonly [Result, ...Error[], typeof receiptServerError]>;
|
|
67
|
+
/**
|
|
68
|
+
* @import {z as zType} from 'zod/v4'
|
|
69
|
+
*/
|
|
70
|
+
/**
|
|
71
|
+
* Schema for an Invocation CID.
|
|
72
|
+
*
|
|
73
|
+
* Accepts a {@link CID} instance (server-side construction), a CID string,
|
|
74
|
+
* or the dag-json `{ "/": "<cid>" }` form (which is what `CID.toJSON()`
|
|
75
|
+
* produces when serialized through `JSON.stringify`) and normalizes to a
|
|
76
|
+
* {@link CID}.
|
|
77
|
+
*/
|
|
78
|
+
export const cidSchema: z.ZodUnion<readonly [z.ZodCustom<CID<unknown, number, number, import("multiformats").Version>, CID<unknown, number, number, import("multiformats").Version>>, z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodObject<{
|
|
79
|
+
'/': z.ZodString;
|
|
80
|
+
}, z.core.$strip>, z.ZodTransform<string, {
|
|
81
|
+
'/': string;
|
|
82
|
+
}>>]>, z.ZodTransform<CID<any, number, number, import("multiformats").Version>, string>>]>;
|
|
83
|
+
/**
|
|
84
|
+
* Generic schema for server-emitted internal errors.
|
|
85
|
+
*
|
|
86
|
+
* Unlike {@link receiptError} (which is part of the per-command receipt
|
|
87
|
+
* schema with literal `code`/`message`), this schema is emitted by the
|
|
88
|
+
* server for any error that happens outside of normal handler execution
|
|
89
|
+
* (invalid invocation, command not found, args validation failure, handler
|
|
90
|
+
* threw, etc.).
|
|
91
|
+
*
|
|
92
|
+
* `cid` is optional because some errors happen before the invocation can
|
|
93
|
+
* be decoded.
|
|
94
|
+
*
|
|
95
|
+
* Automatically included as a variant in every command receipt produced by
|
|
96
|
+
* {@link receipt}, so the client always knows how to validate and discriminate
|
|
97
|
+
* a server error from a normal receipt.
|
|
98
|
+
*/
|
|
99
|
+
export const receiptServerError: z.ZodObject<{
|
|
100
|
+
error: z.ZodObject<{
|
|
101
|
+
code: z.ZodLiteral<"SERVER_ERROR">;
|
|
102
|
+
message: z.ZodString;
|
|
103
|
+
cid: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<CID<unknown, number, number, import("multiformats").Version>, CID<unknown, number, number, import("multiformats").Version>>, z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodObject<{
|
|
104
|
+
'/': z.ZodString;
|
|
105
|
+
}, z.core.$strip>, z.ZodTransform<string, {
|
|
106
|
+
'/': string;
|
|
107
|
+
}>>]>, z.ZodTransform<CID<any, number, number, import("multiformats").Version>, string>>]>>;
|
|
108
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
export type ReceiptServerError = z.core.output<typeof receiptServerError>;
|
|
112
|
+
import { z } from 'zod/v4';
|
|
113
|
+
import { CID } from 'multiformats/cid';
|
|
114
|
+
//# sourceMappingURL=receipt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receipt.d.ts","sourceRoot":"","sources":["../../../src/rpc/receipt.js"],"names":[],"mappings":"AAkCA;;;;;;GAMG;AACH,8BAJ6B,YAAY,SAA5B,SAAe,UACjB,YAAY,GACV,YAAgB;IAAE,GAAG,EAAE,OAAO,SAAS,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAE,CAAC,CAO5E;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,6BAfsB,IAAI,SAAb,MAAQ,EACC,OAAO,SAAhB,MAAQ,EACQ,UAAU,SAA1B,SAAe,QACjB,IAAI,WACJ,OAAO,QACP,UAAU,GACR,YAAgB;IACxB,GAAG,EAAE,OAAO,SAAS,CAAC;IACtB,KAAK,EAAE,YAAgB;QACrB,IAAI,EAAE,aAAiB,IAAI,CAAC,CAAC;QAC7B,OAAO,EAAE,aAAiB,OAAO,CAAC,CAAC;QACnC,IAAI,EAAE,UAAU,CAAC;KAClB,CAAC,CAAC;CACJ,CAAC,CAWJ;AA2BD;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAN6B,MAAM,SAAtB,SAAe,EACC,KAAK,SAArB,SAAe,UACjB,MAAM,aACH,KAAK,EAAA,GACN,WAAe,SAAS,CAAC,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,OAAO,kBAAkB,CAAC,CAAC,CAMpF;AApID;;GAEG;AAEH;;;;;;;GAOG;AACH;;;;2FAiBE;AAgDF;;;;;;;;;;;;;;;GAeG;AACH;;;;;;;;;;;kBAOE;iCAGW,cAAY,OAAO,kBAAkB,CAAC;kBAzGjC,QAAQ;oBADN,kBAAkB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Define a type-safe server from a record of commands.
|
|
3
|
+
*
|
|
4
|
+
* The returned function accepts a standard `Request`, decodes its body as a
|
|
5
|
+
* UCAN {@link Invocation}, validates the args against the matching command's
|
|
6
|
+
* schema, and dispatches to the corresponding handler in `options.handlers`.
|
|
7
|
+
* The handler's return value is serialized to JSON.
|
|
8
|
+
*
|
|
9
|
+
* @template {CommandsRecord} Commands
|
|
10
|
+
* @param {Commands} commands
|
|
11
|
+
* @param {DefineServerOptions<Commands>} options
|
|
12
|
+
* @returns {ServerRequestHandler}
|
|
13
|
+
*/
|
|
14
|
+
export function defineServer<Commands extends CommandsRecord>(commands: Commands, options: DefineServerOptions<Commands>): ServerRequestHandler;
|
|
15
|
+
import type { CommandsRecord } from './types.js';
|
|
16
|
+
import type { DefineServerOptions } from './types.js';
|
|
17
|
+
import type { ServerRequestHandler } from './types.js';
|
|
18
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/rpc/server.js"],"names":[],"mappings":"AAkDA;;;;;;;;;;;;GAYG;AACH,6BAL8B,QAAQ,SAAzB,cAAgB,YAClB,QAAQ,WACR,oBAAoB,QAAQ,CAAC,GAC3B,oBAAoB,CA6FhC;oCAlJS,YAAY;yCAAZ,YAAY;0CAAZ,YAAY"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
2
|
+
import type { ISigner } from 'iso-signatures/types';
|
|
3
|
+
import type { Capability } from '../capability.js';
|
|
4
|
+
import type { Invocation } from '../invocation.js';
|
|
5
|
+
import type { Store } from '../store.js';
|
|
6
|
+
import type { ClientOptions, Promisable, VerifierResolver } from '../types.js';
|
|
7
|
+
export interface CommandOptions<Args extends StandardSchemaV1, Cmd extends string = string, ReceiptSchema extends StandardSchemaV1 = StandardSchemaV1> {
|
|
8
|
+
cmd: Cmd;
|
|
9
|
+
args: Args;
|
|
10
|
+
receipt: ReceiptSchema;
|
|
11
|
+
}
|
|
12
|
+
export interface CommandOutput<Args extends StandardSchemaV1, Cmd extends string = string, ReceiptSchema extends StandardSchemaV1 = StandardSchemaV1> {
|
|
13
|
+
capability: Capability<Args, Cmd>;
|
|
14
|
+
receipt: ReceiptSchema;
|
|
15
|
+
}
|
|
16
|
+
export type AnyCommand = CommandOutput<StandardSchemaV1, string, StandardSchemaV1>;
|
|
17
|
+
export type CommandsRecord = Record<string, AnyCommand>;
|
|
18
|
+
/**
|
|
19
|
+
* Union of `{cmd, args, receipt}` shapes derived from a commands record.
|
|
20
|
+
* Used to discriminate `request` calls by `cmd`.
|
|
21
|
+
*
|
|
22
|
+
* `args` is the schema's input type (what the caller provides) and `receipt`
|
|
23
|
+
* is the schema's output type (what the caller receives back).
|
|
24
|
+
*/
|
|
25
|
+
export type CommandUnion<Commands extends CommandsRecord> = {
|
|
26
|
+
[K in keyof Commands]: Commands[K] extends CommandOutput<infer Args, infer Cmd, infer ReceiptSchema> ? {
|
|
27
|
+
cmd: Cmd;
|
|
28
|
+
args: StandardSchemaV1.InferInput<Args>;
|
|
29
|
+
receipt: StandardSchemaV1.InferOutput<ReceiptSchema>;
|
|
30
|
+
} : never;
|
|
31
|
+
}[keyof Commands];
|
|
32
|
+
/**
|
|
33
|
+
* Server-side counterpart to {@link CommandUnion}: `args` is the schema's
|
|
34
|
+
* output (validated value passed to the handler) and `receipt` is the
|
|
35
|
+
* schema's input — the full receipt object, including `cid`, that the
|
|
36
|
+
* handler is responsible for constructing (typically using `invocation.cid`).
|
|
37
|
+
*/
|
|
38
|
+
export type ServerCommandUnion<Commands extends CommandsRecord> = {
|
|
39
|
+
[K in keyof Commands]: Commands[K] extends CommandOutput<infer Args, infer Cmd, infer ReceiptSchema> ? {
|
|
40
|
+
cmd: Cmd;
|
|
41
|
+
args: StandardSchemaV1.InferOutput<Args>;
|
|
42
|
+
receipt: StandardSchemaV1.InferInput<ReceiptSchema>;
|
|
43
|
+
} : never;
|
|
44
|
+
}[keyof Commands];
|
|
45
|
+
/**
|
|
46
|
+
* Options for {@link defineClient}.
|
|
47
|
+
*
|
|
48
|
+
* Same as {@link ClientOptions} but the `capabilities` are derived from the
|
|
49
|
+
* commands record passed as the first argument.
|
|
50
|
+
*/
|
|
51
|
+
export type DefineClientOptions = Omit<ClientOptions, 'capabilities'>;
|
|
52
|
+
/**
|
|
53
|
+
* Options for {@link CommandClient.request}.
|
|
54
|
+
*/
|
|
55
|
+
export type RequestOptions<Commands extends CommandsRecord, Cmd extends CommandUnion<Commands>['cmd'] = CommandUnion<Commands>['cmd']> = {
|
|
56
|
+
cmd: Cmd;
|
|
57
|
+
args: Extract<CommandUnion<Commands>, {
|
|
58
|
+
cmd: Cmd;
|
|
59
|
+
}>['args'];
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Type-safe client built from a record of commands.
|
|
63
|
+
*/
|
|
64
|
+
export interface CommandClient<Commands extends CommandsRecord> {
|
|
65
|
+
request<Cmd extends CommandUnion<Commands>['cmd']>(options: RequestOptions<Commands, Cmd>): Promise<Extract<CommandUnion<Commands>, {
|
|
66
|
+
cmd: Cmd;
|
|
67
|
+
}>['receipt']>;
|
|
68
|
+
invoke<Cmd extends CommandUnion<Commands>['cmd']>(options: RequestOptions<Commands, Cmd>): Promise<Invocation>;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Options passed to a server handler.
|
|
72
|
+
*
|
|
73
|
+
* `args` is the validated/decoded args from the command's schema.
|
|
74
|
+
*/
|
|
75
|
+
export interface ServerHandlerOptions<Args> {
|
|
76
|
+
args: Args;
|
|
77
|
+
invocation: Invocation;
|
|
78
|
+
signer: ISigner;
|
|
79
|
+
store: Store;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Map of server handlers keyed by `cmd`, derived from a commands record.
|
|
83
|
+
*
|
|
84
|
+
* Each handler receives args typed as the command's args schema output and
|
|
85
|
+
* must return a value matching the command's receipt schema input.
|
|
86
|
+
*/
|
|
87
|
+
export type ServerHandlers<Commands extends CommandsRecord> = {
|
|
88
|
+
[Cmd in ServerCommandUnion<Commands>['cmd']]: (options: ServerHandlerOptions<Extract<ServerCommandUnion<Commands>, {
|
|
89
|
+
cmd: Cmd;
|
|
90
|
+
}>['args']>) => Promisable<Extract<ServerCommandUnion<Commands>, {
|
|
91
|
+
cmd: Cmd;
|
|
92
|
+
}>['receipt']>;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Options for {@link defineServer}.
|
|
96
|
+
*/
|
|
97
|
+
export interface DefineServerOptions<Commands extends CommandsRecord> {
|
|
98
|
+
handlers: ServerHandlers<Commands>;
|
|
99
|
+
/**
|
|
100
|
+
* The server's signer. Used as the audience when decoding the incoming
|
|
101
|
+
* invocation and passed through to handlers as `signer` so they can issue
|
|
102
|
+
* receipts or further invocations.
|
|
103
|
+
*/
|
|
104
|
+
signer: ISigner;
|
|
105
|
+
store: Store;
|
|
106
|
+
verifierResolver: VerifierResolver;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Handler for an incoming HTTP request, returned by {@link defineServer}.
|
|
110
|
+
*/
|
|
111
|
+
export type ServerRequestHandler = (request: Request) => Promise<Response>;
|
|
112
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/rpc/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAE9E,MAAM,WAAW,cAAc,CAC7B,IAAI,SAAS,gBAAgB,EAC7B,GAAG,SAAS,MAAM,GAAG,MAAM,EAC3B,aAAa,SAAS,gBAAgB,GAAG,gBAAgB;IAEzD,GAAG,EA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AS,cAAc,IAAI;KAC3D,GAAG,IAAI,kBAAkB,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,GAAG,CAC5C,OAAO,EAAE,oBAAoB,CAC3B,OAAO,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE;QAAE,GAAG,EAAE,GAAG,CAAA;KAAE,CAAC,CAAC,MAAM,CAAC,CAC5D,KACE,UAAU,CACb,OAAO,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE;QAAE,GAAG,EAAE,GAAG,CAAA;KAAE,CAAC,CAAC,SAAS,CAAC,CAC/D;CACF,CAAA;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB,CAAC,QAAQ,SAAS,cAAc;IAClE,QAAQ,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAA;IAClC;;;;OAIG;IACH,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,KAAK,CAAA;IACZ,gBAAgB,EAAE,gBAAgB,CAAA;CACnC;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA"}
|
package/dist/src/store.d.ts
CHANGED
|
@@ -33,8 +33,10 @@ export class Store {
|
|
|
33
33
|
*/
|
|
34
34
|
proofs(options: Omit<import("./types.js").StoreProofsOptions, "args">): AsyncGenerator<Delegation, void, unknown>;
|
|
35
35
|
/**
|
|
36
|
-
* Resolve
|
|
37
|
-
*
|
|
36
|
+
* Resolve the first such chain found (depth-first), ordered from root to leaf.
|
|
37
|
+
*
|
|
38
|
+
* Cycles are detected via a per-path visited set of delegation CIDs so that
|
|
39
|
+
* self-delegations or other loops can be skipped without recursing forever.
|
|
38
40
|
*
|
|
39
41
|
* @param {import('./types.js').StoreProofsOptions} options
|
|
40
42
|
* @returns {Promise<Delegation[]>}
|
package/dist/src/store.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/store.js"],"names":[],"mappings":"AAaA;;GAEG;AACH;IAOE;;OAEG;IACH,oBAFW,MAAM,EAQhB;IAfD,qBAAqB;IACrB,QADW,MAAM,CACX;IAEN,iBAAiB;IACjB,IADW,EAAE,CACX;IAoCF;;OAEG;IACH,iBAFW,UAAU,EAAE,iBAMtB;IAED;;;;OAIG;IACH,SAFW,MAAM,mCAUhB;IAED;;;;OAIG;IACH,kBAFW,GAAG,uBAQb;IAED;;;;OAIG;IACH,gBAFW,IAAI,CAAC,OAAO,YAAY,EAAE,kBAAkB,EAAE,MAAM,CAAC,6CA8B/D;IAED
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/store.js"],"names":[],"mappings":"AAaA;;GAEG;AACH;IAOE;;OAEG;IACH,oBAFW,MAAM,EAQhB;IAfD,qBAAqB;IACrB,QADW,MAAM,CACX;IAEN,iBAAiB;IACjB,IADW,EAAE,CACX;IAoCF;;OAEG;IACH,iBAFW,UAAU,EAAE,iBAMtB;IAED;;;;OAIG;IACH,SAFW,MAAM,mCAUhB;IAED;;;;OAIG;IACH,kBAFW,GAAG,uBAQb;IAED;;;;OAIG;IACH,gBAFW,IAAI,CAAC,OAAO,YAAY,EAAE,kBAAkB,EAAE,MAAM,CAAC,6CA8B/D;IAED;;;;;;;;OAQG;IACH,+BAHW,OAAO,YAAY,EAAE,kBAAkB,GACrC,OAAO,CAAC,UAAU,EAAE,CAAC,CAKjC;;CAwDF;4BA9LwB,QAAQ;mBANd,QAAQ;2BAEA,iBAAiB;yBAKtB,cAAc"}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import type { Policy } from './types/policy';
|
|
|
12
12
|
export type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
13
13
|
export type { DID, DIDURL, DIDURLObject } from 'iso-did/types';
|
|
14
14
|
export type { ISigner } from 'iso-signatures/types';
|
|
15
|
+
export * from './rpc/types';
|
|
15
16
|
export * from './types/envelope';
|
|
16
17
|
export * from './types/policy';
|
|
17
18
|
export * from './types/varsig';
|
|
@@ -52,11 +53,21 @@ export interface DelegationOptions<Schema extends StandardSchemaV1> {
|
|
|
52
53
|
nonce?: Uint8Array;
|
|
53
54
|
cmd: string;
|
|
54
55
|
meta?: CborObject;
|
|
56
|
+
/**
|
|
57
|
+
* The current time in seconds. Mostly used for testing.
|
|
58
|
+
* @default Math.floor(Date.now() / 1000)
|
|
59
|
+
*/
|
|
60
|
+
now?: number;
|
|
55
61
|
}
|
|
56
62
|
export interface DelegationValidateOptions {
|
|
57
63
|
isRevoked?: IsRevoked;
|
|
58
64
|
didResolver?: DidResolver;
|
|
59
65
|
verifierResolver: VerifierResolver;
|
|
66
|
+
/**
|
|
67
|
+
* The current time in seconds. Mostly used for testing.
|
|
68
|
+
* @default Math.floor(Date.now() / 1000)
|
|
69
|
+
*/
|
|
70
|
+
now?: number;
|
|
60
71
|
}
|
|
61
72
|
export interface DelegationFromOptions extends DelegationValidateOptions {
|
|
62
73
|
bytes: Uint8Array;
|
|
@@ -97,7 +108,7 @@ export interface InvocationOptions extends DelegationValidateOptions {
|
|
|
97
108
|
}
|
|
98
109
|
export interface InvocationFromOptions extends DelegationValidateOptions {
|
|
99
110
|
bytes: Uint8Array;
|
|
100
|
-
audience
|
|
111
|
+
audience?: VerifiableDID;
|
|
101
112
|
resolveProof: ResolveProof;
|
|
102
113
|
}
|
|
103
114
|
/**
|
|
@@ -106,7 +117,7 @@ export interface InvocationFromOptions extends DelegationValidateOptions {
|
|
|
106
117
|
/**
|
|
107
118
|
* Capability options
|
|
108
119
|
*/
|
|
109
|
-
export interface CapabilityOptions<Schema extends StandardSchemaV1, Cmd extends string = string>
|
|
120
|
+
export interface CapabilityOptions<Schema extends StandardSchemaV1, Cmd extends string = string> {
|
|
110
121
|
schema: Schema;
|
|
111
122
|
cmd: Cmd;
|
|
112
123
|
}
|
|
@@ -122,7 +133,7 @@ export interface CapabilityDelegateOptions<Schema extends StandardSchemaV1> exte
|
|
|
122
133
|
/**
|
|
123
134
|
* Invoke a capability
|
|
124
135
|
*/
|
|
125
|
-
export interface CapabilityInvokeOptions<Schema extends StandardSchemaV1> extends Omit<InvocationOptions, 'cmd' | 'args' | 'prf'
|
|
136
|
+
export interface CapabilityInvokeOptions<Schema extends StandardSchemaV1> extends Omit<InvocationOptions, 'cmd' | 'args' | 'prf'> {
|
|
126
137
|
args: StandardSchemaV1.InferOutput<Schema>;
|
|
127
138
|
/**
|
|
128
139
|
* Store to resolve proofs from
|
|
@@ -203,5 +214,6 @@ export type ClientOptions = {
|
|
|
203
214
|
audience: DIDURLObject;
|
|
204
215
|
store: Store;
|
|
205
216
|
capabilities: Capability<StandardSchemaV1, string>[];
|
|
217
|
+
verifierResolver: VerifierResolver;
|
|
206
218
|
};
|
|
207
219
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,KAAK,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,SAAS,CAAA;AACvD,OAAO,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAA;AACpE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAA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gB,CAAC,GACtC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,GAClB,WAAW,CAAC,GAAG,EAAE,OAAO,CAAC,GACzB,KAAK,GACP,KAAK,GACP,KAAK;CACV,CAAA;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,OAAO,CAAA;IACf,UAAU,EAAE,UAAU,CAAA;IACtB,KAAK,EAAE,KAAK,CAAA;CACb;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,CACtB,MAAM,SAAS,aAAa,CAC1B,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC,CAAC,CACnE,IACC;IACF,OAAO,CAAC,GAAG,SAAS,MAAM,CAAC,KAAK,CAAC,EAC/B,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,GAAG,CAAA;KAAE,CAAC,CAAC,IAAI,CAAC,GACxC,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,GAAG,CAAA;KAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAA;CACjD,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,OAAO,CAAA;IACf,QAAQ,EAAE,YAAY,CAAA;IACtB,KAAK,EAAE,KAAK,CAAA;IACZ,YAAY,EAAE,UAAU,CAAC,gBAAgB,EAAE,MAAM,CAAC,EAAE,CAAA;IACpD,gBAAgB,EAAE,gBAAgB,CAAA;CACnC,CAAA"}
|
package/dist/src/utils.d.ts
CHANGED
|
@@ -28,14 +28,16 @@ export function isSigAndDidCompatible(did: import("iso-did/types").VerifiableDID
|
|
|
28
28
|
* Validate the expiration of a UCAN
|
|
29
29
|
*
|
|
30
30
|
* @param {number | null} exp
|
|
31
|
+
* @param {number} [now]
|
|
31
32
|
*/
|
|
32
|
-
export function assertExpiration(exp: number | null): void;
|
|
33
|
+
export function assertExpiration(exp: number | null, now?: number): void;
|
|
33
34
|
/**
|
|
34
35
|
* Validate the not before time of a UCAN
|
|
35
36
|
*
|
|
36
37
|
* @param {number} [nbf]
|
|
38
|
+
* @param {number} [now]
|
|
37
39
|
*/
|
|
38
|
-
export function assertNotBefore(nbf?: number): void;
|
|
40
|
+
export function assertNotBefore(nbf?: number, now?: number): void;
|
|
39
41
|
/**
|
|
40
42
|
* Validate the issuer and signature of a UCAN
|
|
41
43
|
*
|
package/dist/src/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.js"],"names":[],"mappings":"AASA;;GAEG;AAEH;;;;;GAKG;AACH,2CAHW,OAAO,YAAY,EAAE,eAAe,CAAC,WAAW,CAAC;;;EAe3D;AAED,uCAEC;AAED;;;GAGG;AACH,8BAFW,OAAO,YAAY,EAAE,eAAe,CAAC,WAAW,CAAC,iCAW3D;AAED;;;;;GAKG;AACH,2CAHW,OAAO,eAAe,EAAE,aAAa,WACrC,OAAO,sBAAsB,EAAE,aAAa,WA+BtD;AAED
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.js"],"names":[],"mappings":"AASA;;GAEG;AAEH;;;;;GAKG;AACH,2CAHW,OAAO,YAAY,EAAE,eAAe,CAAC,WAAW,CAAC;;;EAe3D;AAED,uCAEC;AAED;;;GAGG;AACH,8BAFW,OAAO,YAAY,EAAE,eAAe,CAAC,WAAW,CAAC,iCAW3D;AAED;;;;;GAKG;AACH,2CAHW,OAAO,eAAe,EAAE,aAAa,WACrC,OAAO,sBAAsB,EAAE,aAAa,WA+BtD;AAED;;;;;GAKG;AACH,sCAHW,MAAM,GAAG,IAAI,QACb,MAAM,QAchB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,QACN,MAAM,QAMhB;AAED;;;;;GAKG;AACH,qDAHW,OAAO,YAAY,EAAE,eAAe,CAAC,WAAW,CAAC,gBACjD,OAAO,SAAS,EAAE,QAAQ,gBAYpC;AAED;;;;;;GAMG;AACH,0CAJW,OAAO,YAAY,EAAE,eAAe,CAAC,WAAW,CAAC,6BACjD,OAAO,sCAAsC,EAAE,QAAQ,gBACvD,OAAO,SAAS,EAAE,QAAQ,oBAwBpC;AAED;;;;;;;;;;;;;GAaG;AACH,8CAJW,MAAM,GAEJ,IAAI,CAuChB;AAED;;;;;;;;;;;;;GAaG;AACH,mCAXW,OAAO,GAEL,IAAI,CAehB;AACD;;;;GAIG;AACH,iCAFW,OAAO,QASjB;AAED;;;;;;GAMG;AACH,iCAJW,OAAO,GAEL,IAAI,CAWhB;AAED;;;;;GAKG;AACH,sCAHW,OAAO,kBAAkB,EAAE,GAAG,gBAC9B,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC,OAAO,CAAC,iBAQxC;AAED;;;;;;GAMG;AACH,uCAHG;IAAgC,GAAG;IACV,GAAG;CAAC,iBAU/B;AAgED;;GAEG;AACH,qCAFW,OAAO,QASjB;AAED;;;;;;GAMG;AACH,gCAJW,OAAO,GACL,KAAK,IAAI,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAKjD;AAnFD,iJAeI;AACJ,4KAAyD;AAEzD,oGAGE;AAEF;;GAEG;AAEH;;GAEG;AACH,mKA4BI;AAEJ,kLAA8C;uBApCjC,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC;iCAjUP,YAAY;oBARtB,kBAAkB;oBADlB,SAAS;kBAGX,QAAQ"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iso-ucan",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"description": "Isomorphic UCAN",
|
|
6
6
|
"author": "Hugo Dias <hugomrdias@gmail.com> (hugodias.me)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -44,17 +44,13 @@
|
|
|
44
44
|
"types": "./dist/src/varsig.d.ts",
|
|
45
45
|
"default": "./src/varsig.js"
|
|
46
46
|
},
|
|
47
|
-
"./server": {
|
|
48
|
-
"types": "./dist/src/server.d.ts",
|
|
49
|
-
"default": "./src/server.js"
|
|
50
|
-
},
|
|
51
47
|
"./policy": {
|
|
52
48
|
"types": "./dist/src/policy.d.ts",
|
|
53
49
|
"default": "./src/policy.js"
|
|
54
50
|
},
|
|
55
|
-
"./
|
|
56
|
-
"types": "./dist/src/
|
|
57
|
-
"default": "./src/
|
|
51
|
+
"./rpc": {
|
|
52
|
+
"types": "./dist/src/rpc/index.d.ts",
|
|
53
|
+
"default": "./src/rpc/index.js"
|
|
58
54
|
},
|
|
59
55
|
"./types": {
|
|
60
56
|
"types": "./dist/src/types.d.ts"
|
|
@@ -82,14 +78,11 @@
|
|
|
82
78
|
"store": [
|
|
83
79
|
"dist/src/store"
|
|
84
80
|
],
|
|
85
|
-
"server": [
|
|
86
|
-
"dist/src/server"
|
|
87
|
-
],
|
|
88
81
|
"policy": [
|
|
89
82
|
"dist/src/policy"
|
|
90
83
|
],
|
|
91
|
-
"
|
|
92
|
-
"dist/src/
|
|
84
|
+
"rpc": [
|
|
85
|
+
"dist/src/rpc/index"
|
|
93
86
|
],
|
|
94
87
|
"types": [
|
|
95
88
|
"dist/src/types"
|
|
@@ -103,22 +96,22 @@
|
|
|
103
96
|
],
|
|
104
97
|
"dependencies": {
|
|
105
98
|
"@ipld/dag-cbor": "^9.2.5",
|
|
106
|
-
"@standard-schema/spec": "^1.
|
|
99
|
+
"@standard-schema/spec": "^1.1.0",
|
|
107
100
|
"@standard-schema/utils": "^0.3.0",
|
|
108
101
|
"iobuffer": "^6.0.1",
|
|
109
|
-
"iso-kv": "^3.1.
|
|
110
|
-
"iso-web": "^1.
|
|
102
|
+
"iso-kv": "^3.1.1",
|
|
103
|
+
"iso-web": "^2.1.0",
|
|
111
104
|
"it-merge": "^3.0.12",
|
|
112
105
|
"multiformats": "^13.4.1",
|
|
113
|
-
"zod": "^4.
|
|
106
|
+
"zod": "^4.3.6",
|
|
107
|
+
"iso-base": "^4.3.1",
|
|
114
108
|
"iso-did": "^2.1.1",
|
|
115
|
-
"iso-base": "^4.2.1",
|
|
116
109
|
"iso-signatures": "^0.5.1"
|
|
117
110
|
},
|
|
118
111
|
"devDependencies": {
|
|
119
|
-
"@types/node": "^
|
|
112
|
+
"@types/node": "^25.6.0",
|
|
120
113
|
"delay": "^7.0.0",
|
|
121
|
-
"playwright-test": "^14.1.
|
|
114
|
+
"playwright-test": "^14.1.13",
|
|
122
115
|
"typescript": "5.9.3"
|
|
123
116
|
},
|
|
124
117
|
"publishConfig": {
|