Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ucanto/server

Package Overview
Dependencies
Maintainers
3
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ucanto/server - npm Package Compare versions

Comparing version 7.0.1 to 7.0.2

8

dist/src/handler.d.ts

@@ -1,8 +0,8 @@

export function provide<A extends API.Ability, R extends API.URI<`${string}:`>, C extends API.Caveats, Result extends API.Result<{}, {}>>(capability: API.CapabilityParser<API.Match<API.ParsedCapability<A, R, C>, API.UnknownMatch>>, handler: (input: API.ProviderInput<API.ParsedCapability<A, R, C>>) => API.Await<Result>): API.ServiceMethod<API.Capability<A, R, C>, Result["ok"] & {}, Result["error"] & {}>;
export function provideAdvanced<A extends API.Ability, R extends API.URI<`${string}:`>, C extends API.Caveats, O extends {}, X extends {}>({ capability, handler, audience }: {
export function provide<A extends API.Ability, R extends API.URI<`${string}:`>, C extends API.Caveats, O extends {}, X extends API.Failure, Result extends API.Result<O, X>>(capability: API.CapabilityParser<API.Match<API.ParsedCapability<A, R, C>, API.UnknownMatch>>, handler: (input: API.ProviderInput<API.ParsedCapability<A, R, C>>) => API.Await<Result>): API.ServiceMethod<API.Capability<A, R, C>, O & Result["ok"], X & Result["error"]>;
export function provideAdvanced<A extends API.Ability, R extends API.URI<`${string}:`>, C extends API.Caveats, O extends {}, X extends API.Failure, Result extends API.Result<O, X>>({ capability, handler, audience }: {
audience?: API.Reader<`did:${string}:${string}`, any, API.Failure> | undefined;
capability: API.CapabilityParser<API.Match<API.ParsedCapability<A, R, C>, API.UnknownMatch>>;
handler: (input: API.ProviderInput<API.ParsedCapability<A, R, C>>) => API.Await<API.Result<O, X>>;
}): API.ServiceMethod<API.Capability<A, R, C>, O, X>;
handler: (input: API.ProviderInput<API.ParsedCapability<A, R, C>>) => API.Await<Result>;
}): API.ServiceMethod<API.Capability<A, R, C>, O & Result["ok"], X & Result["error"]>;
import * as API from "./api.js";
//# sourceMappingURL=handler.d.ts.map
{
"name": "@ucanto/server",
"description": "UCAN RPC Server",
"version": "7.0.1",
"version": "7.0.2",
"types": "./dist/src/lib.d.ts",

@@ -6,0 +6,0 @@ "main": "./src/lib.js",

@@ -13,6 +13,8 @@ import * as API from './api.js'

* @template {API.Caveats} C
* @template {API.Result<{}, {}>} Result
* @template {{}} O
* @template {API.Failure} X
* @template {API.Result<O, X>} Result
* @param {API.CapabilityParser<API.Match<API.ParsedCapability<A, R, C>>>} capability
* @param {(input:API.ProviderInput<API.ParsedCapability<A, R, C>>) => API.Await<Result>} handler
* @returns {API.ServiceMethod<API.Capability<A, R, C>, Result['ok'] & {}, Result['error'] & {}>}
* @returns {API.ServiceMethod<API.Capability<A, R, C>, O & Result['ok'], X & Result['error']>}
*/

@@ -35,8 +37,9 @@

* @template {{}} O
* @template {{}} X
* @template {API.Failure} X
* @template {API.Result<O, X>} Result
* @param {object} input
* @param {API.Reader<API.DID>} [input.audience]
* @param {API.CapabilityParser<API.Match<API.ParsedCapability<A, R, C>>>} input.capability
* @param {(input:API.ProviderInput<API.ParsedCapability<A, R, C>>) => API.Await<API.Result<O, X>>} input.handler
* @returns {API.ServiceMethod<API.Capability<A, R, C>, O, X>}
* @param {(input:API.ProviderInput<API.ParsedCapability<A, R, C>>) => API.Await<Result>} input.handler
* @returns {API.ServiceMethod<API.Capability<A, R, C>, O & Result['ok'], X & Result['error']>}
*/

@@ -43,0 +46,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc