Git Product home page Git Product logo

tds-sdk's Introduction

tds sdk

dependencies:

https://scans.gradle.com/s/22zpxxnvn343c/dependencies?focusedDependencyView=details&toggled=W1swXSxbMCwxXV0

The local jar is in release。

Class.forName("org.sdk.util.Init")
  • Keystore

    • 生成keystore
    KeystoreUtility.generateKeyStore(String password)
    参数:password:密码
    返回值:KeyStoreImplObject
    • 解析keystore,获取私钥
    KeystoreUtility.decryptKeyStore(KeyStoreImpl keyStore, String password)
    参数:keyStore
         password:密码
    返回值:私钥(String
    • 私钥转公钥
    KeystoreUtility.privateKeyToPublicKey(String privateKey)
    参数:privateKey:私钥
    返回值:公钥(String
    • 公钥转地址
    KeystoreUtility.publicKeyToAddress(String publicKey)
    参数:publicKey:公钥
    返回值:地址(String
  • Transaction

    • 保存、更新用户
    TransactionUtility.saveUser(long nonce, HexBytes privateKey, String address, String username, 
                                int role, String org, int orgType)
    参数: nonce:序号
          privateKey:私钥
          address:地址
          username:用户名,
          role:用户角色 0.root 超级管理员 1.admin 管理员 2.user 普通用户
          org:组织名称
          orgType:组织类型 0.factory 1.training institution 2.testing organization:组织类型 3.other
    返回值:TransactionObject
    • 删除用户
    TransactionUtility.deleteUser(long nonce, HexBytes privateKey, String address)
    参数: nonce:序号
          privateKey:私钥
          address:地址
    返回值:TransactionObject
    • 更改超级管理员
    TransactionUtility.changeOwnerUser(long nonce, HexBytes privateKey, String address)
    参数: nonce:序号
          privateKey:私钥
          address:地址
    返回值:TransactionObject
    • 保存、更新WPQR流程
    TransactionUtility.saveWeld(long nonce, HexBytes privateKey, String wpqr, HexBytes groupHash, int type, Accessory accessory)
    参数: nonce:序号
          privateKey:私钥
          wpqr:wpqr编号
          groupHash:第个字节为0-6,代表类型,后面为文件哈希。
          type:0.wdld 1.accessory
          accessory:int type(流程序号),String accessoryName(附件名称),HexBytes accessoryHash(附件哈希)
    返回值:TransactionObject)
    
    *注:type=0时,accessorynulltype=1时,groupHashnull
    • 更新附件
    TransactionUtility.updateAccessory(long nonce, HexBytes privateKey, String wpqr, int type, String accessoryName, HexBytes accessoryHash)
    参数: nonce:序号
          privateKey:私钥
          wpqr:wpqr编号
          groupHash:第个字节为0-6,代表类型,后面为文件哈希。
          type:类型1.WPQR详情 3.焊接实验详情 4.实验结果 5.理化报告(非破坏性)
          accessoryName:附件名称
          accessoryHash:附件哈希
    返回值:TransactionObject

tds-sdk's People

Contributors

zhangtong599 avatar salpadding avatar

Watchers

James Cloos avatar  avatar  avatar

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.