FilSwan开发文档
中文(简体)
  • 开始
    • FilSwan 概览
    • 协议栈
      • 跨链共识层
      • Peer-to-Peer (P2P) 网络
      • 支付频道
      • Service Discovery
      • 数据市场
      • 索引和缓存市场
      • Web3 任务bid市场
      • 存储层
      • 计算层
      • CDN 层
      • 治理
    • 联系我们
      • 社交账号&社区
      • 商业合作
  • Filswan Platform
    • 概览
      • FilSwan 竞价系统
      • Web3自动交易匹配
      • 信誉系统
    • 主要功能
      • 任务管理
        • 创建新任务
        • Navigate Tasks
        • 更新任务
        • 分配任务
      • 我的资料
        • 注册成为存储提供商
      • 寻找存储提供商
        • 存储提供商详情
      • DataCap订单续期服务
  • Multichain.Storage
    • 概览
      • Flink
    • Multichain.Storage 用户指南
      • 公链测试网
      • 设置MetaMask
      • 用Alchemy RPC URL配置MetaMask
    • 开发人员快速入门
      • SDK
        • js mcs SDK
          • 开始
          • 上传文件
          • 支付存储费用
          • 铸造NFT
          • 文件列表
          • 获取文件详情
          • 获取文件在Filecoin上的状态
          • SDK安装视频教程
        • python mcs SDK
          • 开始
          • 上传文件
          • Stream Upload Files
          • 支付存储费用
          • 铸造NFT
          • 文件列表
          • 获取文件详情
      • 更多资源
    • 运行Multichain.Storage节点
    • Multichain Storage 概述
      • Flink
      • Multichain.Storage Mumbai测试网用户指南
      • Multichain.Storage Polygon 主网用户指南
    • 开发人员快速入门
      • SDK
        • js-mcs-sdk
          • 开始
          • 上传文件
          • 支付数据存储费用
          • Mint NFTs资产
          • 列出文件
          • 获取文件详细信息
          • 获取文件的Filecoin状态
      • 其他资源
  • Swan Provider
    • 概览
    • 功能
    • 使用指南
      • 前提条件
      • 安装
      • 配置并运行
      • Swan Provider 视频教程
    • 常见问题
      • 1. Storage Provider 绑定新账号
      • 2. 如何检查您的 Storage Provider 连通性/稳定性
      • 3. 如何暂停接受自动竞价订单
      • 4. aria2_download_dir 和aria2_candidate_dirs 的区别
      • 5. Boostd 正常运行情况下如何配置从 Swan Provider 接收订单
      • 6. 接单过程中总出现拒绝信息
      • 7. 如何检查 aria2 是否在运行?
      • 8. Swan Platform 无响应
      • 9. Storage Provider 状态显示“Offline/离线”
      • 10. 如何检查任务状态
      • 11. 如何配置 Storage Provider Market
      • 12. 如何设置接单条件
  • SWAN CLIENT
    • 概览
    • 基本概念须知
    • 使用指南
      • Filecoin 交易发送引擎
        • 安装
        • 配置
        • 前提条件
        • 生成 CAR 文件
        • Meta-CAR
        • 上传 CAR 文件到 IPFS
        • 创建任务
      • 区块链 RPC 服务
        • 部署 RPC 服务
        • RPC 命令
      • Swan Client 视频教程
  • FS3
    • 概览
    • Setup your FS3
      • 前提
      • 安装 FS3
      • FS3安装视频教程
    • FS3 User Guide
    • FS3 User Guide (Cloud Version)
    • FS3手册中文版
  • 开发资源
    • Swan Token 合约
      • Acquire Testnet USDC and MATIC tokens
    • FilSwan API
    • MCS API
    • MCS 2.0 API
    • Flink API
    • FS3 API
    • API密钥
    • 有关FilSwan的常见问题
Powered by GitBook
On this page
  • Parameters
  • Return
  1. Multichain.Storage
  2. 开发人员快速入门
  3. SDK
  4. python mcs SDK

获取文件详情

Get Details about a specific file

McsAPI.get_payment_info(self, payload_cid, wallet_address, source_file_upload_id)

The following code example gets the file details of an uploaded file. This method takes the upload id of the file, and the deal id of the file.

def file_detail(wallet_info):
    wallet_address = wallet_info['wallet_address']
    private_key = wallet_info['private_key']
    web3_api = wallet_info['web3_api']
    
    w3_api = ContractAPI(web3_api)
    api = McsAPI()

    # upload file to mcs
    file_path = "/i*"
    filename = "/*"
    upload_file = api.upload_file(wallet_address, file_path)
    file_data = upload_file["data"]
    payload_cid, source_file_upload_id, nft_uri, file_size, w_cid = file_data['payload_cid'], file_data[
        'source_file_upload_id'], file_data['ipfs_url'], file_data['file_size'], file_data['w_cid']
    # get deal details
    return deal_detail = api.get_deal_detail(wallet_address, source_file_upload_id)

Parameters

  • source_file_upload_id: upload id of the file

  • payload_cid: not required

Return

Returns the response from the /deal/detail/ API

{
  status: 'success',
  data: {
    dao_signature: [ [Object], [Object], [Object], [Object] ],
    dao_threshold: 2,
    source_file_upload_deal: {
      deal_id: <ID>,
      deal_cid: '',
      message_cid: <'bafy...'>,
      height: <NUMBER>,
      piece_cid: <'...'>,
      verified_deal: <BOOLEAN>,
      storage_price_per_epoch: 0,
      signature: '',
      signature_type: '',
      created_at: <TIME>,
      piece_size_format: null,
      start_height: <NUMBER>,
      end_height: <NUMBER>,
      client: <'f...'>,
      client_collateral_format: '000000000000000000',
      provider: <'f...'>,
      provider_tag: '',
      verified_provider: 0,
      provider_collateral_format: '000000000000000000',
      status: 0,
      network_name: 'filecoin_mainnet',
      storage_price: 0,
      ipfs_url: <'https://calibration-ipfs.filswan.com/ipfs/Qm...'>,
      file_name: <FILE_NAME>,
      w_cid: <UNIQUE_CID>,
      car_file_payload_cid: <'bafy...'>,
      locked_at: <TIME>,
      locked_fee: <AMOUNT>,
      unlocked: <BOOLEAN>
    }
  }
}
Previous文件列表Next更多资源

Last updated 2 years ago