candy

module
v0.0.0-...-f47aca1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2020 License: Apache-2.0

README

Candy

Candy is a fork of tendermint. It combines fabric chaincode to implement smart contracts.

Minimum requirements

Requirement Notes
Go version Go1.13 or higher
Install
make cenv
make install
How to use

The way of writing candy contract is the same as fabric chaincode, but only support golang.

NOTE: please use wjbbig/candy-contract-api as a dependency to write your contract. It is a simplified version of fabric/fabric-contract-api-go and only retains database operations.

You can use the following command to package your contract:

candy package -p /the path of your contract -o xxx.tar.gz -l golang

Before you install the contract, you have to start at least one node:

candy node

then, use the following command to install the contract:

curl -s 'localhost:26657/contract_install?name="the name of your contract"'

NOTE: you only need to install the contract on one node, and other nodes will automatically receive the contract package and install it.

Finally, let's make a tx:

curl -s 'localhost:26657/broadcast_tx_commit?tx="contractname,functionname,args..."'

Directories

Path Synopsis
abci
server
Package server is used to start a new ABCI server.
Package server is used to start a new ABCI server.
blockchain
v0
v1
v2
cmd
candy contract is a fork of fabric chaincode.
candy contract is a fork of fabric chaincode.
merkle
Package merkle computes a deterministic minimal height Merkle tree hash.
Package merkle computes a deterministic minimal height Merkle tree hash.
secp256k1/internal/secp256k1
nolint:gocritic Package secp256k1 wraps the bitcoin secp256k1 C library.
nolint:gocritic Package secp256k1 wraps the bitcoin secp256k1 C library.
xchacha20poly1305
Package xchacha20poly1305 creates an AEAD using hchacha, chacha, and poly1305 This allows for randomized nonces to be used in conjunction with chacha.
Package xchacha20poly1305 creates an AEAD using hchacha, chacha, and poly1305 This allows for randomized nonces to be used in conjunction with chacha.
libs
cli
events
Package events - Pub-Sub in go with event caching
Package events - Pub-Sub in go with event caching
flowrate
Package flowrate provides the tools for monitoring and limiting the flow rate of an arbitrary data stream.
Package flowrate provides the tools for monitoring and limiting the flow rate of an arbitrary data stream.
kv
nolint: dupl dupl is reading this as the same file as crypto/merkle/result.go
nolint: dupl dupl is reading this as the same file as crypto/merkle/result.go
log
net
os
pubsub
Package pubsub implements a pub-sub model with a single publisher (Server) and multiple subscribers (clients).
Package pubsub implements a pub-sub model with a single publisher (Server) and multiple subscribers (clients).
pubsub/query
nolint Package query provides a parser for a custom query format: abci.invoice.number=22 AND abci.invoice.owner=Ivan See query.peg for the grammar, which is a https://en.wikipedia.org/wiki/Parsing_expression_grammar.
nolint Package query provides a parser for a custom query format: abci.invoice.number=22 AND abci.invoice.owner=Ivan See query.peg for the grammar, which is a https://en.wikipedia.org/wiki/Parsing_expression_grammar.
Package lite is deprecated and will be removed in v0.34! Package lite allows you to securely validate headers without a full node.
Package lite is deprecated and will be removed in v0.34! Package lite allows you to securely validate headers without a full node.
client
Package client defines a provider that uses a rpchttp to get information, which is used to get new headers and validators directly from a Tendermint client.
Package client defines a provider that uses a rpchttp to get information, which is used to get new headers and validators directly from a Tendermint client.
Package lite provides a light client implementation.
Package lite provides a light client implementation.
rpc
TODO: Better handle abci client errors.
TODO: Better handle abci client errors.
Package node is the main entry point, where the Node struct, which represents a full node, is defined.
Package node is the main entry point, where the Node struct, which represents a full node, is defined.
p2p
pex
upnp
Taken from taipei-torrent.
Taken from taipei-torrent.
Package privval provides different implementations of the types.PrivValidator.
Package privval provides different implementations of the types.PrivValidator.
proto
p2p
rpc
core
# Introduction Tendermint supports the following RPC protocols: * URI over HTTP * JSONRPC over HTTP * JSONRPC over websockets Tendermint RPC is built using our own RPC library which contains its own set of documentation and tests.
# Introduction Tendermint supports the following RPC protocols: * URI over HTTP * JSONRPC over HTTP * JSONRPC over websockets Tendermint RPC is built using our own RPC library which contains its own set of documentation and tests.
jsonrpc
HTTP RPC server supporting calls via uri params, jsonrpc over HTTP, and jsonrpc over websockets Client Requests Suppose we want to expose the rpc function `HelloWorld(name string, num int)`.
HTTP RPC server supporting calls via uri params, jsonrpc over HTTP, and jsonrpc over websockets Client Requests Suppose we want to expose the rpc function `HelloWorld(name string, num int)`.
jsonrpc/server
Commons for HTTP handling
Commons for HTTP handling
scripts
test
app
tools

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL