Module: @web3-storage/access
Namespaces
Classes
Functions
connection
▸ connection<Service
, T
>(options?
): ConnectionView
<Service
>
Creates a Ucanto connection for the w3access API
Usage:
import { connection } from '@web3-storage/access/agent'
Type parameters
Name | Type | Description |
---|---|---|
Service | extends Service | |
T | extends `did:${string}:${string}` | DID method |
Parameters
Name | Type | Description |
---|---|---|
options? | Object | |
options.channel | undefined | Channel <Service > | Ucanto channel to use |
options.fetch | undefined | (input : URL | RequestInfo , init? : RequestInit ) => Promise <Response > | Fetch implementation to use |
options.principal | undefined | Principal <T > | w3access API Principal |
options.url | undefined | URL | w3access API URL |
Returns
ConnectionView
<Service
>