Namespace: Voucher
@web3-storage/capabilities.Voucher
Voucher Capabilities
These can be imported directly with:
import * as Account from '@web3-storage/capabilities/voucher'
References
top
Re-exports top
Variables
Identity
• Const
Identity: Schema
<URI
<"mailto:"
>, unknown
>
Verifiable identity to whom voucher is issued. Currently it is a mailto:
URL.
Defined in
packages/capabilities/src/voucher.js:29
Product
• Const
Product: Schema
<URI
<`${string}:`>, unknown
>
Products are identified by the CID of the DAG that describes them.
Defined in
packages/capabilities/src/voucher.js:23
Service
• Const
Service: Schema
<`did:${string}:${string}` & `did:${string}` & Phantom
<{}>, any
>
Services are identified using a decentralized identifier.
Defined in
packages/capabilities/src/voucher.js:34
claim
• Const
claim: TheCapabilityParser
<DerivedMatch
<{}, CapabilityMatch
<"*"
, URI
<"did:"
>, {}> | DerivedMatch
<{}, CapabilityMatch
<"*"
, URI
<"did:"
>, {}>>>>
Capability can be invoked by an agent to claim a voucher for a specific user identifier (currently email address).
The agent MAY issue claim with own DID or a DID it is delegate of. If with
is different from iss
, it is implied that the voucher is claimed for the
DID in the with
field. If with
is same as iss
it is implies that
voucher is claimed for an unspecified did
.
Defined in
packages/capabilities/src/voucher.js:64
redeem
• Const
redeem: TheCapabilityParser
<DerivedMatch
<{}, DerivedMatch
<{}, CapabilityMatch
<"*"
, URI
<"did:"
>, {}>>>>
Defined in
packages/capabilities/src/voucher.js:99
voucher
• Const
voucher: TheCapabilityParser
<DerivedMatch
<{}, CapabilityMatch
<"*"
, URI
<"did:"
>, {}>>>
Capability can only be delegated (but not invoked) allowing audience to
derived any voucher/
prefixed capability for the (memory) space identified
by did:key in the with
field.
Currently DID in the with
field will always be web3.storage DID since we
do not support other types of vouchers yet.