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

Deploy SuperContract

Requirements

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

Example

Before we can execute any SC it should be deployed. After deploy client will get the SC ID that can be used for execution. Technically we just marked some file as the SC.

import (
    "context"

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

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

    // ID of some contract
    contractId, err := drive.IDFromString("baegqajaiaqjcbpxt6l4e3lbvkityq5q673j4v4tcyst34xzxtfkot65a5nmjbjem")
    if err != nil {
        panic(err)
    }

    //Deploy a new SC
    scId, err := client.SuperContract().Deploy(context.Background(), contractId, "test.wat")
    if err != nil {
        panic(err)
    }

    //print scId
    println(scId.String())
}
← ClearExecute SuperContract →
  • 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