@ucanto/principal
Advanced tools
Comparing version 5.1.0 to 7.0.0
@@ -11,3 +11,3 @@ export * from "./type.js"; | ||
export function from({ id, keys }: API.SignerArchive<API.DID, typeof signatureCode>): API.EdSigner; | ||
export function or<O extends API.SignerImporter<`did:${string}:${string}`, API.UCAN.SigAlg>>(other: O): API.CompositeImporter<[{ | ||
export function or<O extends API.SignerImporter<`did:${string}:${string}`, API.Crypto.SigAlg>>(other: O): API.CompositeImporter<[{ | ||
from: ({ id, keys }: API.SignerArchive<API.DID, typeof signatureCode>) => API.EdSigner; | ||
@@ -14,0 +14,0 @@ }, O]>; |
@@ -13,3 +13,3 @@ export * from "./rsa/type.js"; | ||
export function from({ id, keys }: API.SignerArchive<API.DID, typeof signatureCode>): API.RSASigner; | ||
export function or<Other extends API.SignerImporter<`did:${string}:${string}`, API.UCAN.SigAlg>>(other: Other): API.CompositeImporter<[{ | ||
export function or<Other extends API.SignerImporter<`did:${string}:${string}`, API.Crypto.SigAlg>>(other: Other): API.CompositeImporter<[{ | ||
from: ({ id, keys }: API.SignerArchive<API.DID, typeof signatureCode>) => API.RSASigner; | ||
@@ -58,9 +58,9 @@ }, Other]>; | ||
*/ | ||
verify<T>(payload: API.ByteView<T>, signature: API.Signature<T, API.SigAlg>): API.UCAN.Await<boolean>; | ||
verify<T>(payload: API.ByteView<T>, signature: API.Signature<T, API.SigAlg>): API.Crypto.Await<boolean>; | ||
/** | ||
* @template T | ||
* @param {API.ByteView<T>} payload | ||
* @returns {Promise<API.Signature<T, typeof signatureCode>>} | ||
* @returns {Promise<API.SignatureView<T, typeof signatureCode>>} | ||
*/ | ||
sign<T_1>(payload: API.ByteView<T_1>): Promise<API.Signature<T_1, API.SigAlg>>; | ||
sign<T_1>(payload: API.ByteView<T_1>): Promise<API.SignatureView<T_1, API.SigAlg>>; | ||
} | ||
@@ -67,0 +67,0 @@ import * as DID from "@ipld/dag-ucan/did"; |
{ | ||
"name": "@ucanto/principal", | ||
"description": "ucanto principal", | ||
"version": "5.1.0", | ||
"version": "7.0.0", | ||
"keywords": [ | ||
@@ -22,7 +22,7 @@ "UCAN", | ||
"dependencies": { | ||
"@ipld/dag-ucan": "^3.2.0", | ||
"@ipld/dag-ucan": "^3.3.2", | ||
"@noble/ed25519": "^1.7.3", | ||
"multiformats": "^11.0.0", | ||
"one-webcrypto": "^1.0.3", | ||
"@ucanto/interface": "^6.0.0" | ||
"@ucanto/interface": "^7.0.0" | ||
}, | ||
@@ -29,0 +29,0 @@ "devDependencies": { |
@@ -189,3 +189,3 @@ import * as ED25519 from '@noble/ed25519' | ||
* @param {API.ByteView<T>} payload | ||
* @returns {Promise<API.Signature<T, typeof Signature.EdDSA>>} | ||
* @returns {Promise<API.SignatureView<T, typeof Signature.EdDSA>>} | ||
*/ | ||
@@ -192,0 +192,0 @@ async sign(payload) { |
@@ -316,3 +316,3 @@ import { webcrypto } from 'one-webcrypto' | ||
* @param {API.ByteView<T>} payload | ||
* @returns {Promise<API.Signature<T, typeof signatureCode>>} | ||
* @returns {Promise<API.SignatureView<T, typeof signatureCode>>} | ||
*/ | ||
@@ -319,0 +319,0 @@ async sign(payload) { |
Sorry, the diff of this file is not supported yet
71569
+ Added@ucanto/interface@7.1.0(transitive)
- Removed@ucanto/interface@6.2.0(transitive)
Updated@ipld/dag-ucan@^3.3.2
Updated@ucanto/interface@^7.0.0