GithubHelp home page GithubHelp logo

codepark-team / moonlight Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 183 KB

EOS 前端 React 开发框架 Moonlight

License: MIT License

JavaScript 100.00%
eos eos-blockchain react scatter eosjs moonlight

moonlight's Introduction

moonlight

  • moonlight 是一个前端库,它使写 DAPP 前端更容易和更可预测。moonlight 核心是基于 Redux,异步中间件使用的是 Redux-saga。我们负责同步您的合同数据、交易数据等。

数据结构(State)

{
  //账户列表,格式对象,key和value相同
  accounts:{eosname:'eosname'},
  //账户资源
  accountResources: {
    //对应的 eos 账户名字
    eosname:{
      //可用余额
      available:"9.0098 EOS",
      //赎回中
      refunding:"0.0000 EOS",
      //CPU Staked
      stakedCPU:"0.0000 EOS",
      //NET Staked
      stakedNET:"0.0000 EOS",
      //有他人质押
      stakedByOthers:"0.0000 EOS",
      //cpu 使用
      cpu_used:"10000",
      //cpu 总量
      cpu_max:"10000",
      //net 使用
      net_used:"10000",
      //net 总量
      net_max:"10000",
      //ram 使用
      ram_used:"10000",
      //ram 总量
      ram_max:"10000"
    }
  },
  //其他在eos上发行的代币 -- 暂定
  accountTokens:{
    //对应的 eos 账户名字
    eosname:{
      //对应的 token 名字,余额
      tokenname: "1.0000 EGT"
    }
  },
  //数据库列表
  contractTables:{
    //数据库表名字
    tableName:
  },
  //moonLight 库初始化状态
  moonLightStatus: {
    initialized
  },
  //记录每笔交易详情
  transactions: {
    txHash: {
      confirmations,
      error,
      receipt,
      status
    }
  },
  //每笔交易列表
  transactionStack,
  //eosjs 初始化状态
  eosjs: {
    status: 'initializing' | 'initialized' | 'failed'
  }
}

注意

  • 测试发现 eosjs 版本为 v16.0.9 时最稳定,所以该项目基于此版本开发,如后期 v20 版本加入正式我们会做兼容处理。

moonlight's People

Contributors

dily3825002 avatar pony-unicorn avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

tvrc4m

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.