Documentation ¶
Index ¶
- Constants
- type AddressAPI
- func (api *AddressAPI) Authorized(r *http.Request, args *AuthorizedArgs, response *AuthorizedResponse) error
- func (api *AddressAPI) Balance(r *http.Request, args *BalanceOfAddressArgs, ...) error
- func (api *AddressAPI) List(r *http.Request, args *EmptyArgs, response *ListAddressesResponse) error
- func (api *AddressAPI) Lock(r *http.Request, args *LockAddressArgs, response *LockAddressResponse) error
- func (api *AddressAPI) Unlock(r *http.Request, args *UnlockAddressArgs, response *UnlockAddressResponse) error
- type AuthorizedArgs
- type AuthorizedResponse
- type BalanceOfAddressArgs
- type BalanceOfAddressResponse
- type BlockAPI
- type Blockchain
- type ByAddressArgs
- type CancelFileDownloadsByContractHashArgs
- type CancelFileDownloadsByContractHashResponse
- type CancelUploadArgs
- type CancelUploadResponse
- type ChannelAPI
- func (api *ChannelAPI) CreateNodeItemsTxDataPayload(r *http.Request, args *CreateNodeItemsTxDataPayloadArgs, ...) error
- func (api *ChannelAPI) FilesFromEntryOrFolder(r *http.Request, args *FilesFromEntryOrFolderArgs, ...) error
- func (api *ChannelAPI) GetNodeItem(r *http.Request, args *GetNodeItemArgs, response *GetNodeItemResponse) error
- func (api *ChannelAPI) List(r *http.Request, args *ListArgs, response *ListResponse) error
- func (api *ChannelAPI) Search(r *http.Request, args *SearchArgs, response *SearchResponse) error
- type CheckDataQueryResponse
- type CheckDataQueryResponseArgs
- type CreateContractsFromDataQueryResponsesArgs
- type CreateContractsFromDataQueryResponsesResponse
- type CreateNodeItemsTxDataPayloadArgs
- type CreateNodeItemsTxDataPayloadResponse
- type CreateTransactionDataPayloadFromContractHashesArgs
- type CreateTransactionDataPayloadFromContractHashesResponse
- type DataQueryResponseJSON
- type DataTransferAPI
- func (api *DataTransferAPI) CancelFileDownloadsByContractHash(r *http.Request, args *CancelFileDownloadsByContractHashArgs, ...) error
- func (api *DataTransferAPI) CheckDataQueryResponse(r *http.Request, args *CheckDataQueryResponseArgs, ...) error
- func (api *DataTransferAPI) CreateContractsFromDataQueryResponses(r *http.Request, args *CreateContractsFromDataQueryResponsesArgs, ...) error
- func (api *DataTransferAPI) CreateTransactionsWithDataPayloadFromContractHashes(r *http.Request, args *CreateTransactionDataPayloadFromContractHashesArgs, ...) error
- func (api *DataTransferAPI) DownloadFile(r *http.Request, args *DownloadFileArgs, response *DownloadFileResponse) error
- func (api *DataTransferAPI) DownloadFileProgress(r *http.Request, args *DownloadFileProgressArgs, ...) error
- func (api *DataTransferAPI) GetDownloadContract(r *http.Request, args *GetDownloadContractArgs, ...) error
- func (api *DataTransferAPI) MoveDirectDownloadsToDestination(r *http.Request, args *MoveDirectDownloadsToDestinationArgs, ...) error
- func (api *DataTransferAPI) PauseFileDownload(r *http.Request, args *PauseFileDownloadArgs, ...) error
- func (api *DataTransferAPI) RebroadcastDataQueryRequest(r *http.Request, args *RebroadcastDataQueryRequestArgs, ...) error
- func (api *DataTransferAPI) RequestContractTransactionVerification(r *http.Request, args *RequestContractTransactionVerificationArgs, ...) error
- func (api *DataTransferAPI) RequestDataQueryResponseFromVerifiers(r *http.Request, args *CheckDataQueryResponseArgs, ...) error
- func (api *DataTransferAPI) RequestEncryptionDataFromVerifierAndDecrypt(r *http.Request, args *RequestEncryptionDataFromVerifierArgs, ...) error
- func (api *DataTransferAPI) SendContractToFileHosterAndVerifier(r *http.Request, args *SendContractToFileHosterAndVerifierArgs, ...) error
- func (api *DataTransferAPI) SendDataQueryRequest(r *http.Request, args *SendDataQueryRequestArgs, ...) error
- func (api *DataTransferAPI) SendFileMerkleTreeNodesToVerifier(r *http.Request, args *SendFileMerkleTreeNodesToVerifierArgs, ...) error
- func (api *DataTransferAPI) VerifierHasEncryptionMetadata(r *http.Request, args *RequestContractTransactionVerificationArgs, ...) error
- type DeleteUploadedFilesArgs
- type DeleteUploadedFilesResponse
- type DownloadContractJSON
- type DownloadFileArgs
- type DownloadFileProgressArgs
- type DownloadFileProgressResponse
- type DownloadFileResponse
- type EmptyArgs
- type FileMetadata
- type FileRanges
- type FileUploadProgresResult
- type FileUploadProgressArgs
- type FileUploadProgressRequest
- type FileUploadProgressResponse
- type FilefilegoAPI
- type FilesFromEntryOrFolderArgs
- type FilesFromEntryOrFolderResponse
- type FindProvidersArgs
- type FindProvidersResponse
- type GetByHashArgs
- type GetByNumberArgs
- type GetDiscoveredProvidersResponse
- type GetDownloadContractArgs
- type GetDownloadContractResponse
- type GetNodeItemArgs
- type GetNodeItemResponse
- type HostInfoResponse
- type JSONBlock
- type JSONBlockTransaction
- type JSONStorageProvider
- type JSONTransaction
- type ListAddressesResponse
- type ListArgs
- type ListResponse
- type ListUploadedFilesArgs
- type ListUploadedFilesResponse
- type LockAddressArgs
- type LockAddressResponse
- type MemPoolResponse
- type MoveDirectDownloadsToDestinationArgs
- type MoveDirectDownloadsToDestinationResponse
- type NetworkMessagePublisher
- type NodeItemJSON
- type PauseFileDownloadArgs
- type PauseFileDownloadResponse
- type PoolResponse
- type PublisherNodesFinder
- type RebroadcastDataQueryRequestArgs
- type RebroadcastDataQueryRequestResponse
- type ReceiptArgs
- type RequestContractTransactionVerificationArgs
- type RequestContractTransactionVerificationResponse
- type RequestEncryptionDataFromVerifierArgs
- type RequestEncryptionDataFromVerifierResponse
- type SaveUploadedFileMetadataLocallyArgs
- type SaveUploadedFileMetadataLocallyResponse
- type SearchArgs
- type SearchResponse
- type SendContractToFileHosterAndVerifierArgs
- type SendContractToFileHosterAndVerifierResponse
- type SendDataQueryRequestArgs
- type SendDataQueryRequestResponse
- type SendFileMerkleTreeNodesToVerifierArgs
- type SendFileMerkleTreeNodesToVerifierResponse
- type SendRawTransactionArgs
- type SendTransactionArgs
- type StatsResponse
- type StorageAPI
- func (api *StorageAPI) CancelUpload(r *http.Request, args *CancelUploadArgs, response *CancelUploadResponse) error
- func (api *StorageAPI) DeleteUploadedFile(r *http.Request, args *DeleteUploadedFilesArgs, ...) error
- func (api *StorageAPI) FileUploadsProgress(r *http.Request, args *FileUploadProgressArgs, ...) error
- func (api *StorageAPI) FindProviders(r *http.Request, args *FindProvidersArgs, response *FindProvidersResponse) error
- func (api *StorageAPI) FindProvidersFromPeers(r *http.Request, args *EmptyArgs, response *FindProvidersResponse) error
- func (api *StorageAPI) GetDiscoveredProviders(r *http.Request, args *EmptyArgs, response *GetDiscoveredProvidersResponse) error
- func (api *StorageAPI) ListUploadedFiles(r *http.Request, args *ListUploadedFilesArgs, ...) error
- func (api *StorageAPI) SaveUploadedFileMetadataLocally(r *http.Request, args *SaveUploadedFileMetadataLocallyArgs, ...) error
- func (api *StorageAPI) Start()
- func (api *StorageAPI) Stop()
- func (api *StorageAPI) TestSpeedWithRemotePeer(r *http.Request, args *TestSpeedWithRemotePeerArgs, ...) error
- func (api *StorageAPI) UploadFileToProvider(r *http.Request, args *UploadFileToProviderArgs, ...) error
- type TestSpeedWithRemotePeerArgs
- type TestSpeedWithRemotePeerResponse
- type TransactionAPI
- func (api *TransactionAPI) ByAddress(r *http.Request, args *ByAddressArgs, response *TransactionsResponse) error
- func (api *TransactionAPI) CreateTransaction(r *http.Request, args *SendTransactionArgs, response *TransactionResponse) error
- func (api *TransactionAPI) Pool(r *http.Request, args *EmptyArgs, response *MemPoolResponse) error
- func (api *TransactionAPI) Receipt(r *http.Request, args *ReceiptArgs, response *TransactionsResponse) error
- func (api *TransactionAPI) SendRawTransaction(r *http.Request, args *SendRawTransactionArgs, response *TransactionResponse) error
- func (api *TransactionAPI) SendTransaction(r *http.Request, args *SendTransactionArgs, response *TransactionResponse) error
- type TransactionResponse
- type TransactionsResponse
- type UnlockAddressArgs
- type UnlockAddressResponse
- type UploadFileToProviderArgs
- type UploadFileToProviderRequest
- type UploadFileToProviderResponse
- type VerifierHasEncryptionMetadataArgs
- type VerifierHasEncryptionMetadataResponse
Constants ¶
const AddressServiceNamespace = "address"
AddressServiceNamespace is the namespace for address service rpc.
const BlockServiceNamespace = "block"
BlockServiceNamespace is the namespace for block service rpc.
const ChannelServiceNamespace = "channel"
ChannelServiceNamespace is the namespace for channel service rpc.
const DataTransferServiceNamespace = "data_transfer"
DataTransferServiceNamespace is the namespace for data transfer service rpc.
const FilefilegoServiceNamespace = "filefilego"
FilefilegoServiceNamespace is the namespace for filefilego service rpc.
const StorageServiceNamespace = "storage"
StorageServiceNamespace is the namespace for storage service rpc.
const TransactionServiceNamespace = "transaction"
TransactionServiceNamespace is the namespace for transaction service rpc.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressAPI ¶
type AddressAPI struct {
// contains filtered or unexported fields
}
AddressAPI represents address service
func NewAddressAPI ¶
func NewAddressAPI(keystore keystore.KeyLockUnlockLister, bchain blockchain.Interface) (*AddressAPI, error)
NewAddressAPI creates a new address API to be served using JSONRPC.
func (*AddressAPI) Authorized ¶ added in v1.1.16
func (api *AddressAPI) Authorized(r *http.Request, args *AuthorizedArgs, response *AuthorizedResponse) error
Authorized checks if an access token is currently available.
func (*AddressAPI) Balance ¶
func (api *AddressAPI) Balance(r *http.Request, args *BalanceOfAddressArgs, response *BalanceOfAddressResponse) error
Balance of an address.
func (*AddressAPI) List ¶ added in v1.1.6
func (api *AddressAPI) List(r *http.Request, args *EmptyArgs, response *ListAddressesResponse) error
List the addresses of the node.
func (*AddressAPI) Lock ¶
func (api *AddressAPI) Lock(r *http.Request, args *LockAddressArgs, response *LockAddressResponse) error
Lock a key given an access token and the address.
func (*AddressAPI) Unlock ¶
func (api *AddressAPI) Unlock(r *http.Request, args *UnlockAddressArgs, response *UnlockAddressResponse) error
Unlock a key given an address and a passphrase.
type AuthorizedArgs ¶ added in v1.1.16
type AuthorizedArgs struct {
Token string `json:"token"`
}
AuthorizedArgs arguments required for checking authorized token.
type AuthorizedResponse ¶ added in v1.1.16
type AuthorizedResponse struct {
Authorized bool `json:"authorized"`
}
AuthorizedResponse is a result of the authorization request.
type BalanceOfAddressArgs ¶
type BalanceOfAddressArgs struct {
Address string `json:"address"`
}
BalanceOfAddressArgs arguments required for balance of an address.
type BalanceOfAddressResponse ¶
type BalanceOfAddressResponse struct { Balance string `json:"balance"` BalanceHex string `json:"balance_hex"` Nounce string `json:"nounce"` NextNounce string `json:"next_nounce"` }
BalanceOfAddressResponse represents the balance response of an address.
type BlockAPI ¶
type BlockAPI struct {
// contains filtered or unexported fields
}
BlockAPI represents the block rpc service.
func NewBlockAPI ¶
func NewBlockAPI(bchain blockchain.Interface) (*BlockAPI, error)
NewBlockAPI creates a new block API to be served using JSONRPC.
func (*BlockAPI) GetByNumber ¶
GetByNumber gets a block by number.
type Blockchain ¶
type Blockchain interface { PutMemPool(tx transaction.Transaction) error GetTransactionsFromPool() []transaction.Transaction GetAddressTransactions(address []byte, currentPage, limit int) ([]transaction.Transaction, []uint64, []int64, error) GetTransactionByHash(hash []byte) ([]transaction.Transaction, []uint64, error) }
Blockchain defines the blockchain functionality needed for this rpc service,
type ByAddressArgs ¶
type ByAddressArgs struct { Address string `json:"address"` CurrentPage int `json:"current_page"` PageSize int `json:"page_size"` }
ByAddressArgs get transactions by address arguments.
type CancelFileDownloadsByContractHashArgs ¶ added in v1.1.25
type CancelFileDownloadsByContractHashArgs struct {
ContractHash string `json:"contract_hash"`
}
CancelFileDownloadsByContractHashArgs represent args.
type CancelFileDownloadsByContractHashResponse ¶ added in v1.1.25
type CancelFileDownloadsByContractHashResponse struct {
Success bool `json:"success"`
}
CancelFileDownloadsByContractHashResponse represent response.
type CancelUploadArgs ¶ added in v1.1.26
type CancelUploadArgs struct {
Files []cancelPayload `json:"files"`
}
CancelUploadArgs args for canceling a file upload.
type CancelUploadResponse ¶ added in v1.1.26
type CancelUploadResponse struct {
Success bool `json:"success"`
}
CancelUploadResponse is the response of a canceled upload.
type ChannelAPI ¶
type ChannelAPI struct {
// contains filtered or unexported fields
}
ChannelAPI represents the channel rpc service.
func NewChannelAPI ¶
func NewChannelAPI(bchain blockchain.Interface, search search.IndexSearcher) (*ChannelAPI, error)
NewChannelAPI creates a new channel API to be served using JSONRPC.
func (*ChannelAPI) CreateNodeItemsTxDataPayload ¶ added in v1.1.7
func (api *ChannelAPI) CreateNodeItemsTxDataPayload(r *http.Request, args *CreateNodeItemsTxDataPayloadArgs, response *CreateNodeItemsTxDataPayloadResponse) error
CreateNodeItemsTxDataPayload a channel node items that returns the transaction data payload, which in turn can be used in a transaction data payload.
func (*ChannelAPI) FilesFromEntryOrFolder ¶
func (api *ChannelAPI) FilesFromEntryOrFolder(r *http.Request, args *FilesFromEntryOrFolderArgs, response *FilesFromEntryOrFolderResponse) error
FilesFromEntryOrFolder all the files of a node which is a dir or an entry recursvely.
func (*ChannelAPI) GetNodeItem ¶
func (api *ChannelAPI) GetNodeItem(r *http.Request, args *GetNodeItemArgs, response *GetNodeItemResponse) error
GetNodeItem gets a node item.
func (*ChannelAPI) List ¶
func (api *ChannelAPI) List(r *http.Request, args *ListArgs, response *ListResponse) error
List returns a list of channels.
func (*ChannelAPI) Search ¶
func (api *ChannelAPI) Search(r *http.Request, args *SearchArgs, response *SearchResponse) error
Search search in nodes.
type CheckDataQueryResponse ¶
type CheckDataQueryResponse struct {
Responses []DataQueryResponseJSON `json:"responses"`
}
CheckDataQueryResponse is a data query response payload.
type CheckDataQueryResponseArgs ¶
type CheckDataQueryResponseArgs struct {
DataQueryRequestHash string `json:"data_query_request_hash"`
}
CheckDataQueryResponseArgs is a data query response arg.
type CreateContractsFromDataQueryResponsesArgs ¶
type CreateContractsFromDataQueryResponsesArgs struct { DataQueryRequestHash string `json:"data_query_request_hash"` AllowResponseOnlyFromPeer string `json:"allow_response_only_from_peer"` }
CreateContractsFromDataQueryResponseHashArgs represents args. AllowResponseOnlyFromPeer contains a peerID which will filter the data query responses other than the given peer id.
type CreateContractsFromDataQueryResponsesResponse ¶
type CreateContractsFromDataQueryResponsesResponse struct {
ContractHashes []string `json:"contract_hashes"`
}
CreateContractsFromDataQueryResponsesResponse represents the response.
type CreateNodeItemsTxDataPayloadArgs ¶ added in v1.1.7
type CreateNodeItemsTxDataPayloadArgs struct {
Nodes []NodeItemJSON `json:"nodes"`
}
CreateNodeItemsTxDataPayloadArgs is a create channel node item request payload.
type CreateNodeItemsTxDataPayloadResponse ¶ added in v1.1.7
type CreateNodeItemsTxDataPayloadResponse struct { TransactionDataPayloadHex string `json:"transaction_data_payload_hex"` TotalFeesRequired string `json:"total_fees_required"` }
CreateNodeItemsTxDataPayloadResponse is a response which contains the transaction data payload for creating the channel node items. It contains the required fees for creating the provided node items based on their type.
type CreateTransactionDataPayloadFromContractHashesArgs ¶
type CreateTransactionDataPayloadFromContractHashesArgs struct { AccessToken string `json:"access_token"` ContractHashes []string `json:"contract_hashes"` CurrentNounce string `json:"current_nounce"` TransactionFeesToBeUsed string `json:"transaction_fees_to_be_used"` }
CreateTransactionDataPayloadFromContractHashesArgs represent the function args.
type CreateTransactionDataPayloadFromContractHashesResponse ¶
type CreateTransactionDataPayloadFromContractHashesResponse struct { TransactionDataBytesHex []string `json:"transaction_data_bytes_hex"` TotalFeesForTransactions string `json:"total_fees_for_transaction"` }
CreateTransactionDataPayloadFromContractHashesResponse represent the function response.
type DataQueryResponseJSON ¶
type DataQueryResponseJSON struct { FromPeerAddr string `json:"from_peer_addr"` FeesPerByte string `json:"fees_per_byte"` HashDataQueryRequest string `json:"hash_data_query_request"` PublicKey string `json:"public_key"` Signature string `json:"signature"` FileHashes []string `json:"file_hashes"` FileHashesSizes []uint64 `json:"file_hashes_sizes"` Timestamp int64 `json:"timestamp"` FileMerkleRootHashes []string `json:"file_merkle_root_hashes"` FileNames []string `json:"file_names"` }
DataQueryResponseJSON represents a json payload which represents a DataQueryResponse.
type DataTransferAPI ¶
type DataTransferAPI struct {
// contains filtered or unexported fields
}
DataTransferAPI represents the data transfer rpc service which includes data query and verification protocols.
func NewDataTransferAPI ¶
func NewDataTransferAPI(host host.Host, dataQueryProtocol dataquery.Interface, dataVerificationProtocol dataverification.Interface, publisherNodeFinder PublisherNodesFinder, contractStore contract.Interface, keystore keystore.KeyAuthorizer) (*DataTransferAPI, error)
NewDataTransferAPI creates a new data transfer API to be served using JSONRPC.
func (*DataTransferAPI) CancelFileDownloadsByContractHash ¶ added in v1.1.25
func (api *DataTransferAPI) CancelFileDownloadsByContractHash(r *http.Request, args *CancelFileDownloadsByContractHashArgs, response *CancelFileDownloadsByContractHashResponse) error
CancelFileDownloadsByContractHash cancels file download by contract.
func (*DataTransferAPI) CheckDataQueryResponse ¶
func (api *DataTransferAPI) CheckDataQueryResponse(r *http.Request, args *CheckDataQueryResponseArgs, response *CheckDataQueryResponse) error
CheckDataQueryResponse returns a list of data query responses.
func (*DataTransferAPI) CreateContractsFromDataQueryResponses ¶
func (api *DataTransferAPI) CreateContractsFromDataQueryResponses(r *http.Request, args *CreateContractsFromDataQueryResponsesArgs, response *CreateContractsFromDataQueryResponsesResponse) error
CreateContractsFromDataQueryResponses creates contracts from the available data query responses. If AllowResponseOnlyFromPeer is given the contract will be created for the specific storage provider. If not, then it will try to combine different contracts if missing files are across multiple storage providers. If some of the files were not found from any storage provider, it will fail.
func (*DataTransferAPI) CreateTransactionsWithDataPayloadFromContractHashes ¶
func (api *DataTransferAPI) CreateTransactionsWithDataPayloadFromContractHashes(r *http.Request, args *CreateTransactionDataPayloadFromContractHashesArgs, response *CreateTransactionDataPayloadFromContractHashesResponse) error
CreateTransactionsWithDataPayloadFromContractHashes given a list of contract hashes it creates the transactions and its data payloads.
func (*DataTransferAPI) DownloadFile ¶
func (api *DataTransferAPI) DownloadFile(r *http.Request, args *DownloadFileArgs, response *DownloadFileResponse) error
DownloadFile downloads a file from a contract.
func (*DataTransferAPI) DownloadFileProgress ¶
func (api *DataTransferAPI) DownloadFileProgress(r *http.Request, args *DownloadFileProgressArgs, response *DownloadFileProgressResponse) error
DownloadFileProgress returns the download progress of a file.
func (*DataTransferAPI) GetDownloadContract ¶
func (api *DataTransferAPI) GetDownloadContract(r *http.Request, args *GetDownloadContractArgs, response *GetDownloadContractResponse) error
GetDownloadContract returns a contract from the memmory.
func (*DataTransferAPI) MoveDirectDownloadsToDestination ¶ added in v1.1.22
func (api *DataTransferAPI) MoveDirectDownloadsToDestination(r *http.Request, args *MoveDirectDownloadsToDestinationArgs, response *MoveDirectDownloadsToDestinationResponse) error
MoveDirectDownloadsToDestination moves the downloaded files to final destination. These files were directly downloaded from a storage provider with zero fee, so no decryption needed. The contracts were local and never went out to the network. This method was written specifically for direct downloads with zero fees.
func (*DataTransferAPI) PauseFileDownload ¶ added in v1.1.9
func (api *DataTransferAPI) PauseFileDownload(r *http.Request, args *PauseFileDownloadArgs, response *PauseFileDownloadResponse) error
PauseFileDownload pauses a file download.
func (*DataTransferAPI) RebroadcastDataQueryRequest ¶ added in v1.1.16
func (api *DataTransferAPI) RebroadcastDataQueryRequest(r *http.Request, args *RebroadcastDataQueryRequestArgs, response *RebroadcastDataQueryRequestResponse) error
SendDataQueryRequest sends a data query request to the network.
func (*DataTransferAPI) RequestContractTransactionVerification ¶ added in v1.1.23
func (api *DataTransferAPI) RequestContractTransactionVerification(r *http.Request, args *RequestContractTransactionVerificationArgs, response *RequestContractTransactionVerificationResponse) error
RequestContractTransactionVerification is used by a data downloader to query storage provider and data verifier about a transaction containing a contract hash.
func (*DataTransferAPI) RequestDataQueryResponseFromVerifiers ¶
func (api *DataTransferAPI) RequestDataQueryResponseFromVerifiers(r *http.Request, args *CheckDataQueryResponseArgs, response *CheckDataQueryResponse) error
RequestDataQueryResponseFromVerifiers returns a list of data query responses by contacting the verifiers.
func (*DataTransferAPI) RequestEncryptionDataFromVerifierAndDecrypt ¶
func (api *DataTransferAPI) RequestEncryptionDataFromVerifierAndDecrypt(r *http.Request, args *RequestEncryptionDataFromVerifierArgs, response *RequestEncryptionDataFromVerifierResponse) error
RequestEncryptionDataFromVerifierAndDecrypt requires encryption data from verifier and decrypts.
func (*DataTransferAPI) SendContractToFileHosterAndVerifier ¶
func (api *DataTransferAPI) SendContractToFileHosterAndVerifier(r *http.Request, args *SendContractToFileHosterAndVerifierArgs, response *SendContractToFileHosterAndVerifierResponse) error
SendContractToFileHosterAndVerifier sends the contract to file hoster and verifier.
func (*DataTransferAPI) SendDataQueryRequest ¶
func (api *DataTransferAPI) SendDataQueryRequest(r *http.Request, args *SendDataQueryRequestArgs, response *SendDataQueryRequestResponse) error
SendDataQueryRequest sends a data query request to the network.
func (*DataTransferAPI) SendFileMerkleTreeNodesToVerifier ¶
func (api *DataTransferAPI) SendFileMerkleTreeNodesToVerifier(r *http.Request, args *SendFileMerkleTreeNodesToVerifierArgs, response *SendFileMerkleTreeNodesToVerifierResponse) error
SendFileMerkleTreeNodesToVerifier sends the merkle tree nodes of a downloaded encrypted file to verifier from the file downloader.
func (*DataTransferAPI) VerifierHasEncryptionMetadata ¶ added in v1.1.23
func (api *DataTransferAPI) VerifierHasEncryptionMetadata(r *http.Request, args *RequestContractTransactionVerificationArgs, response *RequestContractTransactionVerificationResponse) error
VerifierHasEncryptionMetadata asks the verifier if all the files encryption metadata in a contract have been transferred.
type DeleteUploadedFilesArgs ¶ added in v1.1.29
type DeleteUploadedFilesArgs struct { Key string `json:"key"` AccessToken string `json:"access_token"` }
DeleteUploadedFilesArgs args for deleting file uploads.
type DeleteUploadedFilesResponse ¶ added in v1.1.29
type DeleteUploadedFilesResponse struct {
Success bool `json:"success"`
}
DeleteUploadedFilesResponse is the response of the deletion
type DownloadContractJSON ¶
type DownloadContractJSON struct { FileHosterResponse DataQueryResponseJSON `json:"file_hoster_response"` FileRequesterNodePublicKey string `json:"file_requester_node_public_key"` FileHashesNeeded []string `json:"file_hashes_needed"` FileHashesNeededSizes []uint64 `json:"file_hashes_needed_sizes"` VerifierPublicKey string `json:"verifier_public_key"` VerifierFees string `json:"verifier_fees"` ContractHash string `json:"contract_hash"` VerifierSignature string `json:"verifier_signature"` }
DownloadContractJSON is a download contract in JSON.
type DownloadFileArgs ¶
type DownloadFileArgs struct { ContractHash string `json:"contract_hash"` FileHash string `json:"file_hash"` ReDownload bool `json:"re_download"` }
DownloadFileArgs represent args.
type DownloadFileProgressArgs ¶
type DownloadFileProgressArgs struct { ContractHash string `json:"contract_hash"` FileHash string `json:"file_hash"` }
DownloadFileProgressArgs represent args.
type DownloadFileProgressResponse ¶
type DownloadFileProgressResponse struct { Error string `json:"error"` BytesTransferred uint64 `json:"bytes_transferred"` FileConcatenation bool `json:"file_concatenation"` Paused bool `json:"paused"` }
DownloadFileProgressResponse represents the response of a download file progress. file_concatenation is true when all files have been reassembled into one file. This is useful to let client know when to send the merkle hashes of the downloaded file because there will be some delay collecting and writing all the parts in one file
type DownloadFileResponse ¶
type DownloadFileResponse struct {
Status string `json:"status"`
}
DownloadFileArgs represents a response.
type FileMetadata ¶
type FileMetadata struct { Name string `json:"name"` Hash string `json:"hash"` Size uint64 `json:"size"` Path string `json:"path"` }
FileMetadata represents a file metadata
type FileRanges ¶
type FileRanges struct {
// contains filtered or unexported fields
}
type FileUploadProgresResult ¶ added in v1.1.23
type FileUploadProgresResult struct { Progress int `json:"progress"` FileHash string `json:"file_hash"` FilePath string `json:"file_path"` Error string `json:"error"` Metadata storage.FileMetadata `json:"metadata"` }
FileUploadProgresResult is the result of uploads.
type FileUploadProgressArgs ¶ added in v1.1.16
type FileUploadProgressArgs struct {
Files []FileUploadProgressRequest `json:"files"`
}
FileUploadProgressArgs args for upload progress.
type FileUploadProgressRequest ¶ added in v1.1.23
type FileUploadProgressRequest struct { PeerID string `json:"peer_id"` FilePath string `json:"file_path"` }
FileUploadProgressRequest represents a request.
type FileUploadProgressResponse ¶ added in v1.1.16
type FileUploadProgressResponse struct {
Files []FileUploadProgresResult `json:"files"`
}
FileUploadProgressResponse is the response of the progress.
type FilefilegoAPI ¶
type FilefilegoAPI struct {
// contains filtered or unexported fields
}
FilefilegoAPI represents the filefilego rpc service.
func NewFilefilegoAPI ¶
func NewFilefilegoAPI(cfg *config.Config, node node.Interface, blockchain blockchain.Interface, host host.Host) (*FilefilegoAPI, error)
NewFilefilegoAPI creates a new filefilego API to be served using JSONRPC.
func (*FilefilegoAPI) HostInfo ¶
func (api *FilefilegoAPI) HostInfo(r *http.Request, args *EmptyArgs, response *HostInfoResponse) error
HostInfo returns the node's addresses.
func (*FilefilegoAPI) Stats ¶
func (api *FilefilegoAPI) Stats(r *http.Request, args *EmptyArgs, response *StatsResponse) error
Stats reports the stats of the node.
type FilesFromEntryOrFolderArgs ¶
type FilesFromEntryOrFolderArgs struct { NodeHash string `json:"node_hash"` CurrentPage int `json:"current_page"` PageSize int `json:"page_size"` Order string `json:"order"` }
FilesFromEntryOrFolderArgs is a request.
type FilesFromEntryOrFolderResponse ¶
type FilesFromEntryOrFolderResponse struct {
Files []FileMetadata `json:"files"`
}
FilesFromEntryOrFolderResponse is a response.
type FindProvidersArgs ¶ added in v1.1.16
type FindProvidersArgs struct {
PreferredLocation string `json:"preferred_location"`
}
FindProvidersArgs args for finding providers
type FindProvidersResponse ¶ added in v1.1.16
type FindProvidersResponse struct {
Success bool `json:"success"`
}
FindProvidersResponse the response of the finding storage providers mechanism.
type GetByHashArgs ¶
type GetByHashArgs struct {
Hash string `json:"hash"`
}
GetByHashArgs represents the args of rpc request.
type GetByNumberArgs ¶
type GetByNumberArgs struct {
Number uint64 `json:"number"`
}
GetByNumberArgs represents the args of rpc request.
type GetDiscoveredProvidersResponse ¶ added in v1.1.16
type GetDiscoveredProvidersResponse struct {
StorageProviders []JSONStorageProvider `json:"storage_providers"`
}
GetDiscoveredProvidersResponse is the response containing the discovered storage providers.
type GetDownloadContractArgs ¶
type GetDownloadContractArgs struct {
ContractHash string `json:"contract_hash"`
}
GetDownloadContractArgs represent the args.
type GetDownloadContractResponse ¶
type GetDownloadContractResponse struct {
Contract DownloadContractJSON `json:"contract"`
}
GetDownloadContractResponse represents the response.
type GetNodeItemArgs ¶
type GetNodeItemArgs struct { NodeHash string `json:"node_hash"` CurrentPage int `json:"current_page"` PageSize int `json:"page_size"` Order string `json:"order"` }
GetNodeItemArgs is a response.
type GetNodeItemResponse ¶
type GetNodeItemResponse struct { Node NodeItemJSON `json:"node"` TotalChildNodes uint64 `json:"total_child_nodes"` }
GetNodeItemResponse is a response.
type HostInfoResponse ¶
type HostInfoResponse struct { PeerID string `json:"peer_id"` Address string `json:"address"` PeerCount int `json:"peer_count"` ChannelCreationFeesFFGHex string `json:"channel_creation_fees_ffg_hex"` RemainingChannelOperationFeesMiliFFGHex string `json:"remaining_channel_operation_fees_miliffg_hex"` }
HostInfoResponse represents a response.
type JSONBlock ¶
type JSONBlock struct { Number uint64 `json:"number"` Timestamp int64 `json:"timestamp"` Data string `json:"data"` PreviousBlockHash string `json:"previous_block_hash"` Hash string `json:"hash"` Signature string `json:"signature"` MerkleHash string `json:"merkle_hash"` Transactions []JSONTransaction `json:"transactions"` }
JSONBlock represents the block response of rpc request.
type JSONBlockTransaction ¶
type JSONBlockTransaction struct { BlockNumber uint64 `json:"block_number"` Timestamp int64 `json:"timestamp"` Transaction JSONTransaction `json:"transaction"` }
JSONBlockTransaction represnts the block number and a transaction.
type JSONStorageProvider ¶ added in v1.1.16
type JSONStorageProvider struct { StorageProviderPeerAddr string `json:"storage_provider_peer_addr"` Location string `json:"location"` FeesPerByte string `json:"fees_per_byte"` PublicKey string `json:"public_key"` Hash string `json:"hash"` Signature string `json:"signature"` Country *geoip2.Country `json:"country"` UptimeSeconds int64 `json:"uptime_seconds"` StorageCapacity uint64 `json:"storage_capacity"` Platform string `json:"platform"` }
JSONStorageProvider is a json storage provider.
type JSONTransaction ¶
type JSONTransaction struct { Hash string `json:"hash"` Signature string `json:"signature"` PublicKey string `json:"public_key"` Nounce string `json:"nounce"` Data string `json:"data"` From string `json:"from"` To string `json:"to"` Value string `json:"value"` TransactionFees string `json:"transaction_fees"` Chain string `json:"chain"` }
JSONTransaction represents a json transaction.
type ListAddressesResponse ¶ added in v1.1.6
type ListAddressesResponse struct {
Addresses []string `json:"addresses"`
}
ListAddressesResponse is a key unlock response.
type ListArgs ¶
type ListArgs struct { CurrentPage int `json:"current_page"` PageSize int `json:"page_size"` Order string `json:"order"` }
ListArgs is a list args
type ListResponse ¶
type ListResponse struct { Total uint64 `json:"total"` CurrentPage int `json:"current_page"` PageSize int `json:"page_size"` Channels []NodeItemJSON `json:"channels"` }
ListResponse is a list response.
type ListUploadedFilesArgs ¶ added in v1.1.19
type ListUploadedFilesArgs struct { CurrentPage int `json:"current_page"` PageSize int `json:"page_size"` Order string `json:"order"` }
ListUploadedFilesArgs args for listing uploads.
type ListUploadedFilesResponse ¶ added in v1.1.19
type ListUploadedFilesResponse struct { Files []storage.FileMetadataWithDBKey `json:"files"` Total uint64 `json:"total"` }
ListUploadedFilesResponse the response listing uploads.
type LockAddressArgs ¶
LockAddressArgs arguments required for locking a key.
type LockAddressResponse ¶
type LockAddressResponse struct {
Success bool `json:"success"`
}
LockAddressResponse is a key unlock response.
type MemPoolResponse ¶
type MemPoolResponse struct {
TransactionHashes []string `json:"transaction_hashes"`
}
MemPoolResponse represents the mempool hashes.
type MoveDirectDownloadsToDestinationArgs ¶ added in v1.1.22
type MoveDirectDownloadsToDestinationArgs struct { ContractHash string `json:"contract_hash"` FileHashes []string `json:"file_hashes"` RestoredFilePaths []string `json:"restored_file_paths"` }
MoveDirectDownloadsToDestinationArgs represents args.
type MoveDirectDownloadsToDestinationResponse ¶ added in v1.1.22
type MoveDirectDownloadsToDestinationResponse struct {
RestoredFilePaths []string `json:"restored_file_paths"`
}
RequestEncryptionDataFromVerifierResponse represents the response.
type NetworkMessagePublisher ¶
type NetworkMessagePublisher interface {
PublishMessageToNetwork(ctx context.Context, topicName string, data []byte) error
}
NetworkMessagePublisher is a pub sub message broadcaster.
type NodeItemJSON ¶ added in v1.1.6
type NodeItemJSON struct { Name string `json:"name"` NodeHash string `json:"node_hash"` Owner string `json:"owner"` Enabled bool `json:"enabled"` NodeType int32 `json:"node_type"` Attributes []string `json:"attributes"` Admins []string `json:"admins"` Posters []string `json:"posters"` Timestamp int64 `json:"timestamp"` Description string `json:"description"` MerkleRoot string `json:"merkle_root"` FileHash string `json:"file_hash"` Size uint64 `json:"size"` ParentHash string `json:"parent_hash"` ContentType string `json:"content_type"` Nodes []NodeItemJSON `json:"nodes"` }
NodeItemJSON represents a node item json.
type PauseFileDownloadArgs ¶ added in v1.1.9
type PauseFileDownloadArgs struct { ContractHash string `json:"contract_hash"` FileHash string `json:"file_hash"` }
PauseFileDownloadArgs represent args.
type PauseFileDownloadResponse ¶ added in v1.1.9
type PauseFileDownloadResponse struct{}
PauseFileDownloadResponse represent response.
type PoolResponse ¶
type PoolResponse struct {
BlockHashes []string `json:"block_hashes"`
}
PoolResponse represents the block pool hashes.
type PublisherNodesFinder ¶
type PublisherNodesFinder interface { NetworkMessagePublisher FindPeers(ctx context.Context, peerIDs []peer.ID) []peer.AddrInfo }
PublisherNodesFinder is an interface that specifies finding nodes and publishing a message to the network functionalities.
type RebroadcastDataQueryRequestArgs ¶ added in v1.1.16
type RebroadcastDataQueryRequestArgs struct {
Hash string `json:"hash"`
}
RebroadcastDataQueryRequestArgs rebroadcasts a data query.
type RebroadcastDataQueryRequestResponse ¶ added in v1.1.16
type RebroadcastDataQueryRequestResponse struct {
Success bool `json:"success"`
}
SendDataQueryRequestResponse is a data query hash response.
type ReceiptArgs ¶
type ReceiptArgs struct {
Hash string `json:"hash"`
}
ReceiptArgs receipt arguments.
type RequestContractTransactionVerificationArgs ¶ added in v1.1.23
type RequestContractTransactionVerificationArgs struct {
ContractHash string `json:"contract_hash"`
}
RequestContractTransactionVerificationArgs represent args for RequestContractTransactionVerification.
type RequestContractTransactionVerificationResponse ¶ added in v1.1.23
type RequestContractTransactionVerificationResponse struct {
Verified bool `json:"verified"`
}
RequestContractTransactionVerificationResponse represent response of RequestContractTransactionVerification.
type RequestEncryptionDataFromVerifierArgs ¶
type RequestEncryptionDataFromVerifierArgs struct { ContractHash string `json:"contract_hash"` FileHashes []string `json:"file_hashes"` FileMerkleRootHashes []string `json:"file_merkle_root_hashes"` RestoredFilePaths []string `json:"restored_file_paths"` }
RequestEncryptionDataFromVerifierArgs represents args.
type RequestEncryptionDataFromVerifierResponse ¶
type RequestEncryptionDataFromVerifierResponse struct {
DecryptedFilePaths []string `json:"decrypted_file_paths"`
}
RequestEncryptionDataFromVerifierResponse represents the response.
type SaveUploadedFileMetadataLocallyArgs ¶ added in v1.1.21
type SaveUploadedFileMetadataLocallyArgs struct {
Files []storage.FileMetadata `json:"files"`
}
SaveUploadedFileMetadataLocallyArgs args for saving uploaded metadata.
type SaveUploadedFileMetadataLocallyResponse ¶ added in v1.1.21
type SaveUploadedFileMetadataLocallyResponse struct {
Success bool `json:"success"`
}
SaveUploadedFileMetadataLocallyResponse is the response of the saving file metadata operation.
type SearchArgs ¶
type SearchArgs struct { Query string `json:"query"` SearchType string `json:"search_type"` Size int `json:"size"` CurrentPage int `json:"current_page"` }
SearchArgs is a search args.
type SearchResponse ¶
type SearchResponse struct {
Nodes []NodeItemJSON `json:"nodes"`
}
SearchResponse is a response with the search results.
type SendContractToFileHosterAndVerifierArgs ¶
type SendContractToFileHosterAndVerifierArgs struct {
ContractHash string `json:"contract_hash"`
}
SendContractToFileHosterAndVerifierArgs represents the args.
type SendContractToFileHosterAndVerifierResponse ¶
type SendContractToFileHosterAndVerifierResponse struct {
Success bool `json:"success"`
}
SendContractToFileHosterAndVerifierResponse represents a response.
type SendDataQueryRequestArgs ¶
type SendDataQueryRequestArgs struct { // FileHashes is a list of comma-separated file hashes. FileHashes string `json:"file_hashes"` }
SendDataQueryRequestArgs is a data query request argument.
type SendDataQueryRequestResponse ¶
type SendDataQueryRequestResponse struct {
Hash string `json:"hash"`
}
SendDataQueryRequestResponse is a data query hash response.
type SendFileMerkleTreeNodesToVerifierArgs ¶
type SendFileMerkleTreeNodesToVerifierArgs struct { ContractHash string `json:"contract_hash"` FileHash string `json:"file_hash"` }
SendFileMerkleTreeNodesToVerifierArgs represents args.
type SendFileMerkleTreeNodesToVerifierResponse ¶
type SendFileMerkleTreeNodesToVerifierResponse struct {
Success bool `json:"success"`
}
SendFileMerkleTreeNodesToVerifierResponse represents a struct.
type SendRawTransactionArgs ¶
type SendRawTransactionArgs struct {
RawTransaction string `json:"raw_transaction"`
}
SendRawTransactionArgs is a raw transaction sent by clients.
type SendTransactionArgs ¶
type SendTransactionArgs struct { AccessToken string `json:"access_token"` Nounce string `json:"nounce"` Data string `json:"data"` From string `json:"from"` To string `json:"to"` Value string `json:"value"` TransactionFees string `json:"transaction_fees"` }
SendTransactionArgs represents the arguments for sending a transaction using the client keystore mechanism.
type StatsResponse ¶
type StatsResponse struct { Syncing bool `json:"syncing"` BlockchainHeight uint64 `json:"blockchain_height"` // nolint:misspell HeighestBlockNumberDiscovered uint64 `json:"heighest_block_number_discovered"` PeerCount int `json:"peer_count"` PeerID string `json:"peer_id"` StorageEnabled bool `json:"storage_enabled"` ChannelCreationFeesFFGHex string `json:"channel_creation_fees_ffg_hex"` RemainingChannelOperationFeesMiliFFGHex string `json:"remaining_channel_operation_fees_miliffg_hex"` Verifiers []verifier `json:"verifiers"` }
StatsResponse represents a syncing status
type StorageAPI ¶ added in v1.1.16
type StorageAPI struct {
// contains filtered or unexported fields
}
StorageAPI represents the storage rpc service.
func NewStorageAPI ¶ added in v1.1.16
func NewStorageAPI(host host.Host, keystore keystore.KeyLockUnlockLister, publisher PublisherNodesFinder, storageProtocol storageprotocol.Interface, storageEngine storage.Interface) (*StorageAPI, error)
NewStorageAPI creates a new storage API to be served using JSONRPC.
func (*StorageAPI) CancelUpload ¶ added in v1.1.26
func (api *StorageAPI) CancelUpload(r *http.Request, args *CancelUploadArgs, response *CancelUploadResponse) error
CancelUpload cancels a file upload.
func (*StorageAPI) DeleteUploadedFile ¶ added in v1.1.29
func (api *StorageAPI) DeleteUploadedFile(r *http.Request, args *DeleteUploadedFilesArgs, response *DeleteUploadedFilesResponse) error
ListUploadedFiles lists the uploaded files on this node.
func (*StorageAPI) FileUploadsProgress ¶ added in v1.1.23
func (api *StorageAPI) FileUploadsProgress(r *http.Request, args *FileUploadProgressArgs, response *FileUploadProgressResponse) error
FileUploadsProgress show the file upload progress and errors.
func (*StorageAPI) FindProviders ¶ added in v1.1.16
func (api *StorageAPI) FindProviders(r *http.Request, args *FindProvidersArgs, response *FindProvidersResponse) error
FindProviders reports the stats of the node.
func (*StorageAPI) FindProvidersFromPeers ¶ added in v1.1.29
func (api *StorageAPI) FindProvidersFromPeers(r *http.Request, args *EmptyArgs, response *FindProvidersResponse) error
FindProvidersFromPeers connects to other peers (mostly validators) and gets their discovered peers.
func (*StorageAPI) GetDiscoveredProviders ¶ added in v1.1.16
func (api *StorageAPI) GetDiscoveredProviders(r *http.Request, args *EmptyArgs, response *GetDiscoveredProvidersResponse) error
GetDiscoveredProviders returns a list of discovered storage providers.
func (*StorageAPI) ListUploadedFiles ¶ added in v1.1.19
func (api *StorageAPI) ListUploadedFiles(r *http.Request, args *ListUploadedFilesArgs, response *ListUploadedFilesResponse) error
ListUploadedFiles lists the uploaded files on this node.
func (*StorageAPI) SaveUploadedFileMetadataLocally ¶ added in v1.1.21
func (api *StorageAPI) SaveUploadedFileMetadataLocally(r *http.Request, args *SaveUploadedFileMetadataLocallyArgs, response *SaveUploadedFileMetadataLocallyResponse) error
SaveUploadedFileMetadataLocally saves a file metadata locally. This is useful when a file is uploaded to other nodes, and the uploading node wants to keep track of where and what has been uploaded to remote nodes.
func (*StorageAPI) Start ¶ added in v1.1.21
func (api *StorageAPI) Start()
Start starts the workers in the background for handling data uploading.
func (*StorageAPI) Stop ¶ added in v1.1.21
func (api *StorageAPI) Stop()
Stop the workers and gracefully shuts down the worker goroutines.
func (*StorageAPI) TestSpeedWithRemotePeer ¶ added in v1.1.16
func (api *StorageAPI) TestSpeedWithRemotePeer(r *http.Request, args *TestSpeedWithRemotePeerArgs, response *TestSpeedWithRemotePeerResponse) error
TestSpeedWithRemotePeer tests the remote peer speed.
func (*StorageAPI) UploadFileToProvider ¶ added in v1.1.16
func (api *StorageAPI) UploadFileToProvider(r *http.Request, args *UploadFileToProviderArgs, response *UploadFileToProviderResponse) error
UploadFileToProvider uploads a file to provider.
type TestSpeedWithRemotePeerArgs ¶ added in v1.1.16
type TestSpeedWithRemotePeerArgs struct { PeerID string `json:"peer_id"` FileSize uint64 `json:"file_size"` }
TestSpeedWithRemotePeerArgs args for testing speed.
type TestSpeedWithRemotePeerResponse ¶ added in v1.1.16
type TestSpeedWithRemotePeerResponse struct {
DownloadThroughputMB float64 `json:"download_throughput_mb"`
}
TestSpeedWithRemotePeerResponse the response of the speed test.
type TransactionAPI ¶
type TransactionAPI struct {
// contains filtered or unexported fields
}
TransactionAPI represents the transaction rpc service.
func NewTransactionAPI ¶
func NewTransactionAPI(keystore keystore.KeyAuthorizer, publisher NetworkMessagePublisher, blockchain Blockchain, superLightNode bool) (*TransactionAPI, error)
NewTransactionAPI creates a new transaction API to be served using JSONRPC.
func (*TransactionAPI) ByAddress ¶
func (api *TransactionAPI) ByAddress(r *http.Request, args *ByAddressArgs, response *TransactionsResponse) error
ByAddress gets the list of transactions by address.
func (*TransactionAPI) CreateTransaction ¶ added in v1.1.29
func (api *TransactionAPI) CreateTransaction(r *http.Request, args *SendTransactionArgs, response *TransactionResponse) error
CreateTransaction creates a transaction and returns the json encoded payload. it uses the same arguments as SendTransactionArgs. this method is used for a client to create and sign and a transaction without broadcasting it to the network.
func (*TransactionAPI) Pool ¶
func (api *TransactionAPI) Pool(r *http.Request, args *EmptyArgs, response *MemPoolResponse) error
Pool gets the list of transactions in mempool.
func (*TransactionAPI) Receipt ¶
func (api *TransactionAPI) Receipt(r *http.Request, args *ReceiptArgs, response *TransactionsResponse) error
Receipt gets the transaction receipt.
func (*TransactionAPI) SendRawTransaction ¶
func (api *TransactionAPI) SendRawTransaction(r *http.Request, args *SendRawTransactionArgs, response *TransactionResponse) error
SendRawTransaction sends a raw transaction.
func (*TransactionAPI) SendTransaction ¶
func (api *TransactionAPI) SendTransaction(r *http.Request, args *SendTransactionArgs, response *TransactionResponse) error
SendTransaction sends a transaction.
type TransactionResponse ¶
type TransactionResponse struct {
Transaction JSONTransaction `json:"transaction"`
}
TransactionResponse represents a response with a transaction.
type TransactionsResponse ¶
type TransactionsResponse struct {
Transactions []JSONBlockTransaction `json:"transactions"`
}
TransactionsResponse represents a response with block and transaction
type UnlockAddressArgs ¶
type UnlockAddressArgs struct { Address string `json:"address"` Passphrase string `json:"passphrase"` }
UnlockAddressArgs arguments required for unlocking a key.
type UnlockAddressResponse ¶
type UnlockAddressResponse struct {
Token string `json:"token"`
}
UnlockAddressResponse is a key unlock response.
type UploadFileToProviderArgs ¶ added in v1.1.16
type UploadFileToProviderArgs struct {
Files []UploadFileToProviderRequest `json:"files"`
}
UploadFileToProviderArgs args for uploading to a provider.
type UploadFileToProviderRequest ¶ added in v1.1.23
type UploadFileToProviderRequest struct { PeerID string `json:"peer_id"` FilePath string `json:"file_path"` ChannelNodeItemHash string `json:"channel_node_item_hash"` }
UploadFileToProviderRequest
type UploadFileToProviderResponse ¶ added in v1.1.16
type UploadFileToProviderResponse struct {
Success bool `json:"success"`
}
UploadFileToProviderResponse is the response of the uploaded file to provider.
type VerifierHasEncryptionMetadataArgs ¶ added in v1.1.23
type VerifierHasEncryptionMetadataArgs struct {
ContractHash string `json:"contract_hash"`
}
VerifierHasEncryptionMetadataArgs represent args for VerifierHasEncryptionMetadataArgs.
type VerifierHasEncryptionMetadataResponse ¶ added in v1.1.23
type VerifierHasEncryptionMetadataResponse struct {
Verified bool `json:"verified"`
}
VerifierHasEncryptionMetadataResponse represent response of VerifierHasEncryptionMetadataResponse.