@ucanto/server
Advanced tools
Comparing version 10.1.0 to 10.2.0
@@ -32,6 +32,7 @@ export { fail }; | ||
/** | ||
* @param {API.ServerOptions <S>} options | ||
* @param {API.ServerOptions<S>} options | ||
*/ | ||
constructor({ id, service, codec, principal, ...rest }: API.ServerOptions<S>); | ||
context: { | ||
audience?: API.Reader<`did:${string}:${string}`, unknown, API.Failure> | undefined; | ||
canIssue?: ((capability: API.ParsedCapability<API.Ability, API.URI, {}>, issuer: `did:${string}:${string}`) => boolean) | undefined; | ||
@@ -41,2 +42,3 @@ resolve?: ((proof: API.UCANLink<API.Capabilities, API.MulticodecCode<number, string>, API.SigAlg>) => API.Await<API.Result<API.Delegation<API.Capabilities>, API.UnavailableProof>>) | undefined; | ||
resolveDIDKey?: ((did: `did:${string}:${string}`) => API.Await<API.Result<`did:key:${string}`, API.DIDKeyResolutionError>>) | undefined; | ||
proofs?: API.Delegation<API.Capabilities>[] | undefined; | ||
id: API.Signer<`did:${string}:${string}`, API.SigAlg>; | ||
@@ -43,0 +45,0 @@ principal: API.PrincipalParser; |
{ | ||
"name": "@ucanto/server", | ||
"description": "UCAN RPC Server", | ||
"version": "10.1.0", | ||
"version": "10.2.0", | ||
"types": "./dist/src/lib.d.ts", | ||
@@ -23,6 +23,6 @@ "main": "./src/lib.js", | ||
"dependencies": { | ||
"@ucanto/core": "^10.2.0", | ||
"@ucanto/interface": "^10.1.0", | ||
"@ucanto/principal": "^9.0.1", | ||
"@ucanto/validator": "^9.0.2" | ||
"@ucanto/core": "^10.3.0", | ||
"@ucanto/principal": "^9.0.2", | ||
"@ucanto/interface": "^10.2.0", | ||
"@ucanto/validator": "^9.1.0" | ||
}, | ||
@@ -29,0 +29,0 @@ "devDependencies": { |
@@ -55,3 +55,3 @@ import * as API from './api.js' | ||
// any audience. | ||
const audienceSchema = audience || Schema.literal(options.id.did()) | ||
const audienceSchema = audience || options.audience || Schema.literal(options.id.did()) | ||
const result = audienceSchema.read(invocation.audience.did()) | ||
@@ -89,4 +89,3 @@ if (result.error) { | ||
super() | ||
/** @type {'InvalidAudience'} */ | ||
this.name = 'InvalidAudience' | ||
this.name = /** @type {const} */ ('InvalidAudience') | ||
this.cause = cause | ||
@@ -93,0 +92,0 @@ } |
@@ -27,3 +27,3 @@ import * as API from '@ucanto/interface' | ||
/** | ||
* @param {API.ServerOptions <S>} options | ||
* @param {API.ServerOptions<S>} options | ||
*/ | ||
@@ -30,0 +30,0 @@ constructor({ id, service, codec, principal = Verifier, ...rest }) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
29114
753
1
0
Updated@ucanto/core@^10.3.0
Updated@ucanto/interface@^10.2.0
Updated@ucanto/principal@^9.0.2
Updated@ucanto/validator@^9.1.0