Documentation Index
Fetch the complete documentation index at: https://docs.spaceport.xyz/llms.txt
Use this file to discover all available pages before exploring further.
Table of contents
IPFS Functions
IPFS Functions
▸ configureIpfs(config): void
Configure the IPFS client with API base URL and authentication
Parameters
| Name | Type | Description |
|---|
config | Object | Configuration object |
config.apiBaseUrl? | string | Base URL for the IPFS API endpoints |
config.apiKey? | string | API key for authentication |
Returns
void
uploadFileToIpfs
▸ uploadFileToIpfs(file): Promise<string>
Uploads a file to IPFS and returns the IPFS URL
Parameters
| Name | Type | Description |
|---|
file | File | The file to upload |
Returns
Promise<string>
The IPFS URL of the uploaded file
▸ uploadMetadataToIpfs(metadata): Promise<string>
Uploads metadata to IPFS and returns the IPFS URL
Parameters
| Name | Type | Description |
|---|
metadata | Record<string, unknown> | The metadata to upload |
Returns
Promise<string>
The IPFS URL of the uploaded metadata