@ucanto/server
Advanced tools
Comparing version 8.0.2 to 9.0.0
@@ -61,2 +61,3 @@ export { fail }; | ||
resolve?: ((proof: API.UCANLink<API.Capabilities, API.MulticodecCode<number, string>, API.SigAlg>) => API.Await<API.Result<API.Delegation<API.Capabilities>, API.UnavailableProof>>) | undefined; | ||
validateAuthorization: (proofs: API.Authorization<API.ParsedCapability<API.Ability, API.URI, {}>>) => API.Await<API.Result<API.Unit, API.Revoked>>; | ||
id: API.Signer<`did:${string}:${string}`, API.SigAlg>; | ||
@@ -68,2 +69,3 @@ principal: API.PrincipalParser; | ||
catch: (err: API.HandlerExecutionError) => void; | ||
validateAuthorization: (proofs: API.Authorization<API.ParsedCapability<API.Ability, API.URI, {}>>) => API.Await<API.Result<API.Unit, API.Revoked>>; | ||
get id(): API.Signer<`did:${string}:${string}`, API.SigAlg>; | ||
@@ -70,0 +72,0 @@ /** |
{ | ||
"name": "@ucanto/server", | ||
"description": "UCAN RPC Server", | ||
"version": "8.0.2", | ||
"version": "9.0.0", | ||
"types": "./dist/src/lib.d.ts", | ||
@@ -6,0 +6,0 @@ "main": "./src/lib.js", |
@@ -66,2 +66,3 @@ import * as API from './api.js' | ||
}) | ||
if (authorization.error) { | ||
@@ -68,0 +69,0 @@ return authorization |
@@ -20,3 +20,6 @@ import * as API from '@ucanto/interface' | ||
*/ | ||
export const create = options => new Server(options) | ||
export const create = options => { | ||
const server = new Server(options) | ||
return server | ||
} | ||
@@ -37,2 +40,5 @@ /** | ||
this.catch = fail || (() => {}) | ||
this.validateAuthorization = this.context.validateAuthorization.bind( | ||
this.context | ||
) | ||
} | ||
@@ -39,0 +45,0 @@ get id() { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26641
725