- GetOnChainClient
- GetSystemParam
- GetHistoricalAveragePriceVerified
- GetAmount
- Upload
- GetMintInfo
- GetUserTaskDeals
- GetDealDetail
- GetDealLogs
- GetSourceFileUpload
- UnpinSourceFile
- WriteNftCollection
- GetNftCollections
- RecordMintInfo
- Pay
- GetPaymentInfo
- GetFileCoinPrice
- GetBillingHistory
- GetDeals2PreSign
- GetDeals2Sign
- GetDeals2SignHash
Definition:
func GetOnChainClient(mcsClient user.McsClient) *OnChainClient
Outputs:
*OnChainClient # includes jwt token and other information for use when call the other apis
Definition:
func (onChainClient *OnChainClient) GetSystemParam() (*SystemParam, error)
Outputs:
*SystemParam # system parameters
error # error or nil
Definition:
func GetHistoricalAveragePriceVerified() (float64, error)
Outputs:
float64 # historical average verified price
error # error or nil
Definition:
func GetAmount(fizeSizeByte int64, historicalAveragePriceVerified, fileCoinPrice float64, copyNumber int) (int64, error)
Outputs:
int64 # amount to pay
error # error or nil
Definition:
func (onChainClient *OnChainClient) Upload(filePath string, fileType int) (*UploadFile, error)
Outputs:
*UploadFile # upload file information
error # error or nil
Definition:
func (onChainClient *OnChainClient) GetMintInfo(sourceFileUploadId int64) ([]*SourceFileMintOut, error)
Outputs:
*SourceFileMintOut # file mint info
error # error or nil
Definition:
func (onChainClient *OnChainClient) GetUserTaskDeals(dealsParams DealsParams) ([]*Deal, *int64, error)
Outputs:
[]*Deal # deal list
*int64 # total count
error # error or nil
Definition:
func (onChainClient *OnChainClient) GetDealDetail(sourceFileUploadId, dealId int64) (*SourceFileUploadDeal, []*DaoSignature, *int, error)
Outputs:
*SourceFileUploadDeal # deal list
[]*DaoSignature # dao signature list
*int # dao threshold
error # error or nil
Definition:
func (onChainClient *OnChainClient) GetDealLogs(offlineDealId int64) ([]*OfflineDealLog, error)
Outputs:
[]*OfflineDealLog # deal logs
error # error or nil
Definition:
func (onChainClient *OnChainClient) GetSourceFileUpload(sourceFileUploadId int64) (*SourceFileUpload, error)
Outputs:
*SourceFileUpload # source file upload information
error # error or nil
Definition:
func (onChainClient *OnChainClient) UnpinSourceFile(sourceFileUploadId int64) error
Outputs:
error # error or nil
Definition:
func (onChainClient *OnChainClient) WriteNftCollection(nftCollectionParams NftCollectionParams) error
Outputs:
error # error or nil
Definition:
func (onChainClient *OnChainClient) GetNftCollections() ([]*NftCollection, error)
Outputs:
[]*NftCollection # NFT collections
error # error or nil
Definition:
func (onChainClient *OnChainClient) RecordMintInfo(recordMintInfoParams *RecordMintInfoParams) (*SourceFileMint, error)
Outputs:
*SourceFileMint # Mint info
error # error or nil
Definition:
func (onChainClient *OnChainClient) Pay(sourceFileUploadId int64, privateKeyStr string, rpcUrl string) (*string, error)
Outputs:
*string # payment transaction hash
error # error or nil
Definition:
func (client *OnChainClient) GetPaymentInfo(fileUploadId int64) (*LockPaymentInfo, error)
Outputs:
*LockPaymentInfo # payment information
error # error or nil
Definition:
func (onChainClient *OnChainClient) GetFileCoinPrice() (*float64, error)
Outputs:
*float64 # filecoin price
error # error or nil
Definition:
func (onChainClient *OnChainClient) GetBillingHistory(billingHistoryParams BillingHistoryParams) ([]*BillingHistory, *int64, error)
Outputs:
[]*BillingHistory # billing list
*int64 # total record number
error # error or nil
Definition:
func (onChainClient *OnChainClient) GetDeals2PreSign() ([]*Deal2PreSign, error)
Outputs:
[]*Deal2PreSign # deals to pre sign
error # error or nil
Definition:
func (onChainClient *OnChainClient) GetDeals2Sign() ([]*Deal2Sign, error)
Outputs:
[]*Deal2Sign # deals to sign
error # error or nil
Definition:
func (onChainClient *OnChainClient) GetDeals2SignHash() ([]*Deal2Sign, error)
Outputs:
[]*Deal2Sign # deals to sign hash
error # error or nil