forked from minio/minio
-
Notifications
You must be signed in to change notification settings - Fork 5
FS3 Function Design
Charles Cao edited this page May 19, 2021
·
2 revisions
- Swan API sort eligible miners
- Miner list
- Miner Price
- Choose Miner/miners to backup
- Miner select box
- Set price
- Bind Wallet
- Deal sending process
- swan client
$> mc list miners <region>
- folder/file to car
$> mc car generate <folder/file>
- config deal send parameter
config file or env @chi TBD
- Sending out deals
Before sending out the deals, user need to have a wallet setup locally and pay for the deal. User can either running a local lotus node or ask a 3rd party payment gateway for payment.
$> mc send <folder/file> <miner_id>
Init the setup
$> export MINIO_ACCESS_KEY=fs3
$> export MINIO_SECRET_KEY=fs3torage
$> export fil_wallet=f12bxpqyyc...7hffregtypiifjq
# add the host to our mc config
$> mc config host add fs3 http://127.0.0.1:9000 minio miniostorage
# create a bucket called testbucket
$> mc mb fs3/testbucket
# copy a local file called file.txt inside of testbucket
$> mc cp file.txt fs3/testbucket
# Generate car for uploading
$> mc car generate <folder/file>
# send file.txt as a deal to filecoin miner id f019104
$> mc send fs3/testbucket/file.txt f019104
# get the cid of the object in the bucket on filecoin
$> curl "http://localhost:8889/info?bucket=testbucket&object=file.txt"