feat(cli): data transfer command

add command to monitor data transfers
This commit is contained in:
hannahhoward
2020-08-18 16:26:21 -07:00
parent e47e51275a
commit f511cc188a
5 changed files with 163 additions and 1 deletions
+15
View File
@@ -2,10 +2,13 @@ package api
import (
"encoding/json"
"github.com/filecoin-project/go-address"
datatransfer "github.com/filecoin-project/go-data-transfer"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-actors/actors/abi/big"
"github.com/filecoin-project/specs-actors/actors/builtin/miner"
"github.com/ipfs/go-cid"
"github.com/libp2p/go-libp2p-core/peer"
pubsub "github.com/libp2p/go-libp2p-pubsub"
@@ -98,3 +101,15 @@ func (ms *MessageSendSpec) Get() MessageSendSpec {
return *ms
}
type DataTransferChannel struct {
TransferID datatransfer.TransferID
Status datatransfer.Status
BaseCID cid.Cid
IsInitiator bool
IsSender bool
VoucherJSON string
Message string
OtherPeer peer.ID
Transferred uint64
}