Storage DFMS

Storage DFMS

  • Getting Started
  • CLI
  • Guides
  • API Endpoints
  • Help

›SuperContract

Nodes

  • Create API node
  • Create API HTTP node

Contract

  • Compose Contract
  • Get Contract
  • List contracts
  • Ammends Contracts
  • Verify Contract
  • Accept Contract
  • Accepted Contract
  • Contract Invites
  • Finish Contract

Drive

  • Add
  • Get
  • Get File by CID
  • Copy
  • Move(Rename)
  • Make Dir
  • Stat
  • List
  • Remove
  • Flush
  • Clear

SuperContract

  • Deploy SuperContract
  • Execute SuperContract
  • SuperContract Results
  • List SuperContracts
  • Get SuperContract
  • SuperContract Executions
  • Deactivate SuperContract

Network

  • Node ID
  • Get Node Addresses
  • Connect to Node
  • Get Connected Peers
  • Disconnect from Node

Different flows

  • Guide of connection lifecycle
  • Guide of contract lifecycle
  • Guide of file lifecycle
  • Guide of SuperContract lifecycle

SuperContract Results

Requirements

  • IDE or text editor
  • SuperContract API
  • One owner
  • One Drive with executors
  • One deployed SuperContract
  • One finished execution

Example

If a SC function saves results client can get it by transaction ID.

import (
    "context"

    "github.com/ipfs/go-cid"

    apihttp "github.com/proximax-storage/go-xpx-dfms-api-http"
)

func main() {
    // Create a new client API by given address
    client := apihttp.NewClientAPI("127.0.0.1:63666")

    // ID of some transaction
    txId, err := cid.Decode("bafybeifbqukufovlk5oyjujzgev6t7co2ygtfcavcgvj5onph6v2mvwujm")
    if err != nil {
        panic(err)
    }

    // Get the results
    // Note that results can be empty if SC doesn;t save results
    scResults, err := client.SuperContract().GetResults(context.Background(), txId)
    if err != nil {
        panic(err)
    }

    // print results
    for _, r := range scResults {
        println(r)
    }
}
← Execute SuperContractList SuperContracts →
  • Requirements
  • Example
Storage DFMS
Roles
SDNSRNVerifierSC Executor
Built-in Features
DriveSuperContractChallengeRewards
Protocols
Cross-block protocolFair streaming
Algorithms
VerificationConsensus
CLI
dfms-clientdfms-replicatorsupercontracts
Giudes
ContractDriveSupercontractsNetwork
Copyright © 2021 ProximaX