config
): void
Configure the IPFS client with API base URL and authentication
Name | Type | Description |
---|---|---|
config | Object | Configuration object |
config.apiBaseUrl? | string | Base URL for the IPFS API endpoints |
config.apiKey? | string | API key for authentication |
void
file
): Promise
<string
>
Uploads a file to IPFS and returns the IPFS URL
Name | Type | Description |
---|---|---|
file | File | The file to upload |
Promise
<string
>
The IPFS URL of the uploaded file
metadata
): Promise
<string
>
Uploads metadata to IPFS and returns the IPFS URL
Name | Type | Description |
---|---|---|
metadata | Record <string , unknown > | The metadata to upload |
Promise
<string
>
The IPFS URL of the uploaded metadata