@web3-storage/capabilities
Advanced tools
Comparing version 3.2.0 to 4.0.0
@@ -1,2 +0,4 @@ | ||
export const StorageProvider: import("@ucanto/validator/src/lib.js").LiteralSchema<"did:web:web3.storage:providers:w3up-alpha", unknown>; | ||
export const Provider: import("@ucanto/validator/src/schema.js").Schema<`did:web:${string}` & `did:${string}` & import("@ucanto/interface").Phantom<{ | ||
protocol: "did:"; | ||
}>, any>; | ||
export const AccountDID: import("@ucanto/validator/src/schema.js").Schema<`did:mailto:${string}` & `did:${string}` & import("@ucanto/interface").Phantom<{ | ||
@@ -11,3 +13,5 @@ protocol: "did:"; | ||
}>, import("@ucanto/validator/src/lib.js").InferStruct<{ | ||
provider: import("@ucanto/validator/src/lib.js").LiteralSchema<"did:web:web3.storage:providers:w3up-alpha", unknown>; | ||
provider: import("@ucanto/validator/src/schema.js").Schema<`did:web:${string}` & `did:${string}` & import("@ucanto/interface").Phantom<{ | ||
protocol: "did:"; | ||
}>, any>; | ||
consumer: import("@ucanto/validator/src/schema.js").Schema<`did:key:${string}` & `did:${string}` & import("@ucanto/interface").Phantom<{ | ||
@@ -14,0 +18,0 @@ protocol: "did:"; |
@@ -31,2 +31,7 @@ import type { TupleToUnion } from 'type-fest'; | ||
} | ||
export interface AccessConfirmSuccess { | ||
delegations: Record<string, Ucanto.ByteView<Ucanto.Delegation>>; | ||
} | ||
export interface AccessConfirmFailure extends Ucanto.Failure { | ||
} | ||
export type AccessDelegate = InferInvokedCapability<typeof AccessCaps.delegate>; | ||
@@ -33,0 +38,0 @@ export type AccessDelegateSuccess = unknown; |
{ | ||
"name": "@web3-storage/capabilities", | ||
"version": "3.2.0", | ||
"version": "4.0.0", | ||
"description": "Capabilities provided by web3.storage", | ||
@@ -57,7 +57,7 @@ "homepage": "https://github.com/web3-storage/w3protocol/tree/main/packages/capabilities", | ||
"dependencies": { | ||
"@ucanto/core": "^5.1.0", | ||
"@ucanto/interface": "^6.0.0", | ||
"@ucanto/core": "^5.2.0", | ||
"@ucanto/interface": "^6.2.0", | ||
"@ucanto/principal": "^5.1.0", | ||
"@ucanto/transport": "^5.1.0", | ||
"@ucanto/validator": "^6.0.0" | ||
"@ucanto/transport": "^5.1.1", | ||
"@ucanto/validator": "^6.1.0" | ||
}, | ||
@@ -64,0 +64,0 @@ "devDependencies": { |
@@ -11,8 +11,7 @@ /** | ||
*/ | ||
import { capability, DID, literal, struct } from '@ucanto/validator' | ||
import { capability, DID, struct } from '@ucanto/validator' | ||
import { equalWith, fail, equal } from './utils.js' | ||
export const StorageProvider = literal( | ||
'did:web:web3.storage:providers:w3up-alpha' | ||
) | ||
// e.g. did:web:web3.storage or did:web:staging.web3.storage | ||
export const Provider = DID.match({ method: 'web' }) | ||
@@ -28,3 +27,3 @@ export const AccountDID = DID.match({ method: 'mailto' }) | ||
nb: struct({ | ||
provider: StorageProvider, | ||
provider: Provider, | ||
consumer: DID.match({ method: 'key' }), | ||
@@ -31,0 +30,0 @@ }), |
@@ -39,2 +39,7 @@ import type { TupleToUnion } from 'type-fest' | ||
export interface AccessConfirmSuccess { | ||
delegations: Record<string, Ucanto.ByteView<Ucanto.Delegation>> | ||
} | ||
export interface AccessConfirmFailure extends Ucanto.Failure {} | ||
export type AccessDelegate = InferInvokedCapability<typeof AccessCaps.delegate> | ||
@@ -41,0 +46,0 @@ export type AccessDelegateSuccess = unknown |
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
69289
1461
Updated@ucanto/core@^5.2.0
Updated@ucanto/interface@^6.2.0
Updated@ucanto/transport@^5.1.1
Updated@ucanto/validator@^6.1.0