Swan Tool Kits is a set of pragmatical tools to help client and miner automated the offline deal sending and importing process.
In Swan project, a client is defined as a user who sends out deals, and a miner is a Filecoin node who imports and seals the deals to Filecoin network. A general guide of lotus offline deal can be found here:
https://docs.filecoin.io/store/lotus/very-large-files
Client Tool provides the following functions:
- Generate Car files from downloaded source files.
- Generate metadata e.g. Car file URI, start epoch, etc. and save them to a metadata CSV file.
- Propose deals based on the metadata CSV file.
- Generate a final CSV file contains deal IDs and miner id for miner to import deals.
- Create tasks on Swan Platform.
git clone https://github.com/nebulaai/swan
cd swan/miner
Please check the Client Tool Guide
Miner Tool provides the following functions:
- Download Car file.
- Import Car file.
- Update deal status on Swan Platform.
git clone https://github.com/nebulaai/swan
cd swan/miner
Please check the Miner Tool Guide
The Swan APIs can be used to programmatically retrieve and analyze data.
These APIs provide access to a variety of different resources including the following:
- Authorization
- Miners
- Tasks
You can create an account on Filswan site to get the API key support.
Under "My Profile"->"Developer Settings", you can generate a set of API Keys and Access Tokens which can be used to make requests on behalf of your personal Swan account. Since these API keys and Access Tokens do not expire unless regenerated, we suggest creating environment variables or using a secure password manager.
You can get your jwt Bearer Token via the following API.
curl --location --request POST 'https://api.filswan.com/user/api_keys/jwt' \
--data-raw '{
"access_token": "my-access-token",
"apikey": "my-apikey"
}'
Once you get the token, you can use it to access Swan APIs via postman or other API tools.
Please check bellow for the APIs currently supported