All Projects → KleeTaurus → go-trustsql-sdk

KleeTaurus / go-trustsql-sdk

Licence: MIT license
基于 Golang 语言的腾讯区块链 TrustSQL SDK

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to go-trustsql-sdk

Selenium Geetest Crack
selenium破解滑动验证码
Stars: ✭ 418 (+2686.67%)
Mutual labels:  tencent
Tencent Express
Easily deploy serverless Express.js applications to Tencent Cloud with the Serverless Framework
Stars: ✭ 96 (+540%)
Mutual labels:  tencent
Face.evolve.pytorch
🔥🔥High-Performance Face Recognition Library on PaddlePaddle & PyTorch🔥🔥
Stars: ✭ 2,719 (+18026.67%)
Mutual labels:  tencent
Musicdl
A lightweight music downloader written by pure python.
Stars: ✭ 641 (+4173.33%)
Mutual labels:  tencent
Tencent Website
Easily deploy serverless websites (e.g. Vue.js, React, static) to Tencent Cloud with the Serverless Framework
Stars: ✭ 64 (+326.67%)
Mutual labels:  tencent
Cloudbase Framework
🏆 腾讯云开发 ☁️ 云原生一体化部署工具 🚀 CloudBase Framework:一键部署,不限框架语言,云端一体化开发,基于Serverless 架构。A front-end and back-end integrated deployment tool 🔥 One-click deploy to serverless architecture. https://docs.cloudbase.net/framework
Stars: ✭ 1,389 (+9160%)
Mutual labels:  tencent
Ocbarrage
iOS 弹幕库 OCBarrage, 同时渲染5000条弹幕也不卡, 轻量, 可拓展, 高度自定义动画, 超高性能, 简单易上手; A barrage render-engine with high performance for iOS. At the same time, rendering 5000 barrages is also very smooth, lightweight, scalable, highly custom animation, ultra high performance, simple and easy to use!
Stars: ✭ 294 (+1860%)
Mutual labels:  tencent
ABot-Graia
一个使用 Graia Ariadne 搭建的 QQ 功能性机器人。
Stars: ✭ 194 (+1193.33%)
Mutual labels:  tencent
Terraform Provider Tencentcloud
Terraform TencentCloud Provider
Stars: ✭ 85 (+466.67%)
Mutual labels:  tencent
Cos Nodejs Sdk V5
腾讯云 COS Nodejs SDK(XML API)
Stars: ✭ 149 (+893.33%)
Mutual labels:  tencent
Mtrans
Multi-source Translation
Stars: ✭ 711 (+4640%)
Mutual labels:  tencent
Tencentsig
😜golang 原生支持的 腾讯云 usersig 生成库
Stars: ✭ 14 (-6.67%)
Mutual labels:  tencent
Decryptlogin
APIs for loginning some websites by using requests.
Stars: ✭ 1,861 (+12306.67%)
Mutual labels:  tencent
Ocbarrage
iOS 弹幕库 OCBarrage, 同时渲染5000条弹幕也不卡, 轻量, 可拓展, 高度自定义动画, 超高性能, 简单易上手; A barrage render-engine with high performance for iOS. At the same time, rendering 5000 barrages is also very smooth, lightweight, scalable, highly custom animation, ultra high performance, simple and easy to use!
Stars: ✭ 589 (+3826.67%)
Mutual labels:  tencent
Weworkapi php
official lib of wework api
Stars: ✭ 225 (+1400%)
Mutual labels:  tencent
Translators
🌏🌍🌎Translators🌎🌍🌏 is a library which aims to bring free, multiple, enjoyable translation to individuals and students in Python. Translators是一个旨在用Python为个人和学生带来免费、多样、愉快翻译的库。
Stars: ✭ 295 (+1866.67%)
Mutual labels:  tencent
React Native Qqsdk
A React Native wrapper around the Tencent QQ SDK for Android and iOS. Provides access to QQ ssoLogin, QQ Sharing, QQZone Sharing etc
Stars: ✭ 100 (+566.67%)
Mutual labels:  tencent
cb-spider
CB-Spider provides a unified view and single interface for multi-cloud management.
Stars: ✭ 26 (+73.33%)
Mutual labels:  tencent
Awesome crawl
腾讯新闻、知乎话题、微博粉丝,Tumblr爬虫、斗鱼弹幕、妹子图爬虫、分布式设计等
Stars: ✭ 246 (+1540%)
Mutual labels:  tencent
Gulp Wxapp Boilerplate
小程序 Gulp 开发脚手架
Stars: ✭ 145 (+866.67%)
Mutual labels:  tencent

GoTrustSQL

license GoDoc

基于 Golang 语言的 TrustSQL SDK

概述

该 SDK 实现了底层密钥对生成、地址生成、签名/验签等基础功能,并对 TrustSQL 提供的三类(信息共享/身份管理) API 接口进行了封装。

特性

SDK 基础命令

  1. 生成密钥对
  2. 根据私钥生成公钥(压缩公钥)
  3. 根据公钥生成地址(压缩地址)
  4. 利用私钥对数据签名
  5. 利用公钥对数据和签名进行验签

SDK API 接口

  1. 数字资产(暂未实现)
  2. 信息共享
  3. 身份管理

示例

下列示例演示了该 SDK 的基本使用方法。

func SendToTrustSQL(content map[string]interface{}) (*tsiss.IssAppendResponse, error) {
    privateKey := "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    client, _ := trustsql.NewClient(privateKey)
    client.SetIssRequestTimeout(5 * time.Second)
    //testURI := ""
    //client.SetAppendIssURI(testURI)
    accountAddr := client.GetAddrByPubkey()
    pubKey := client.GetPublicKey()
    issAppend := &tsiss.IssAppend{
        Version:  "1.0",
        SignType: "ECDSA",
        MchID:    "gbxxxxxxxxxxxxxxx",
        //MchSign:     "",
        Account:    string(accountAddr),
        CommitTime: time.Now().Format("2006-01-02 15:04:05"),
        //Content:    map[string]interface{}{"c": "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks"},
        Content: content,
        InfoKey: bson.NewObjectId().Hex(),
        //InfoKey:     "1242123jjj",
        InfoVersion: "1",
        State:       "0",
        Notes:       map[string]interface{}{"notes": "comments"},
        PublicKey:   pubKey,
        Sign:        "",
        ChainID:     "ch_tencent_test",
        LedgerID:    "ld_tencent_iss",
    }
    signStr, err := client.GetIssSignStr(issAppend)
    if err != nil {
        fmt.Printf("get issSignStr error: %s\n", err)
        return nil, err
    }

    issAppend.Sign = client.SignString(signStr, true)
    appendRes, err := client.AppendIss(issAppend)
    if err != nil {
        fmt.Printf("append error: %s\n", err)
        return nil, err
    }
    //fmt.Printf("appendRes: %+v\n", appendRes)
    return appendRes, nil
}

环境依赖

参考资料

  1. Bitcoin Wiki
  2. Base58Check encoding
  3. Bitcoin Developer Reference
  4. Technical background of version 1 Bitcoin addresses
  5. Merkle Trees
  6. 数据库那么便宜,为何还要死贵的区块链来存储数据?
  7. Data Insertion in Bitcoin's Blockchain

License

GoTrustSQL is MIT licensed. See the included LICENSE file for more details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].