annchain

module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2018 License: LGPL-3.0

README

full-feature annchain

IKHOFI README

Set JAVA_HOME

wget https://cfapi-test.zhongan.io/download/jdk-8u101-linux-x64.tar.gz
tar zxvf jdk-8u101-linux-x64.tar.gz

Edit profile:

# for java
export JAVA_HOME=$HOME/jdk-8u101-linux-x64
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin:$PATH

Copy ikhofi to JAVA_HOME

wget https://cfapi-test.zhongan.io/download/ikhofi-all-0.6.5-jar-with-dependencies.jar
cp -rf ikhofi-all-0.6.5-jar-with-dependencies.jar $JAVA_HOME/jre/lib/ext/

Run ikhofi server

wget https://cfapi-test.zhongan.io/download/ikhofi-api-0.6.5.jar
java -jar target/ikhofi-server-0.6.5.jar --server.port=8080

Create ikhofi org

Need to add ikhofi_addr to ikhofi org config.toml:

# This is a TOML config file.
# For more information, see https://github.com/toml-lang/toml

seeds = ""
appname = "ikhofi"
p2p_laddr = "0.0.0.0:50011"
log_path = "/Users/shilei/ann/ikhofi/"
auth_by_ca = false
signbyCA = ""
cosi_laddr = "0.0.0.0:55011"
ikhofi_addr = "http://127.0.0.1:8080"

And then create ikhofi org:

./build/anntool --callmode="commit" --backend="tcp://127.0.0.1:46657" --target="annchain-civil" organization create --genesisfile genesis.json --configfile config.toml --privkey 6EBFC5A9B535A80D5BDEC0141502193F748FA6A9A02E1B1E9C59B010DA36BCBBA3C7622F824209127D7DFF74B8EAA48B169D97E015F358A46EA896C297244FE9

Create a java contract

./build/anntool --target="ikhofi" --backend="tcp://127.0.0.1:46657" ikhofi execute -contractid system -method "deploy('StorageContract01', './scripts/examples/contracts/StorageContract.class')" -privkey abee332ae1f38479d16c709fdcb601d2b07dceab8fdd2d8c932f0ed01a988264

Query contract id

./build/anntool --target="ikhofi" --backend="tcp://127.0.0.1:46657" ikhofi query -contractid system -method "contract('StorageContract0')" -privkey abee332ae1f38479d16c709fdcb601d2b07dceab8fdd2d8c932f0ed01a988264

Execute contract

./build/anntool --target="ikhofi" --backend="tcp://127.0.0.1:46657" ikhofi execute -contractid StorageContract01 -method "setData('a', '1')" -privkey abee332ae1f38479d16c709fdcb601d2b07dceab8fdd2d8c932f0ed01a988264

Query contract

./build/anntool --target="ikhofi" --backend="tcp://127.0.0.1:46657" ikhofi query -contractid StorageContract01 -method "getData()" -privkey abee332ae1f38479d16c709fdcb601d2b07dceab8fdd2d8c932f0ed01a988264

Directories

Path Synopsis
protos/blockchain
Package blockchain is a generated protocol buffer package.
Package blockchain is a generated protocol buffer package.
protos/consensus
Package consensus is a generated protocol buffer package.
Package consensus is a generated protocol buffer package.
protos/events
Package events is a generated protocol buffer package.
Package events is a generated protocol buffer package.
protos/mempool
Package mempool is a generated protocol buffer package.
Package mempool is a generated protocol buffer package.
protos/rpc
Package rpc is a generated protocol buffer package.
Package rpc is a generated protocol buffer package.
protos/state
Package state is a generated protocol buffer package.
Package state is a generated protocol buffer package.
protos/trace
Package trace is a generated protocol buffer package.
Package trace is a generated protocol buffer package.
protos/types
Package types is a generated protocol buffer package.
Package types is a generated protocol buffer package.
eth
abi
Package abi implements the Ethereum ABI (Application Binary Interface).
Package abi implements the Ethereum ABI (Application Binary Interface).
abi/bind
Package bind generates Ethereum contract Go bindings.
Package bind generates Ethereum contract Go bindings.
common
Package common contains various helper functions.
Package common contains various helper functions.
common/compiler
Package compiler wraps the Solidity compiler executable (solc).
Package compiler wraps the Solidity compiler executable (solc).
common/hexutil
Package hexutil implements hex encoding with 0x prefix.
Package hexutil implements hex encoding with 0x prefix.
common/mclock
package mclock is a wrapper for a monotonic clock source
package mclock is a wrapper for a monotonic clock source
core
Package core implements the Ethereum consensus protocol.
Package core implements the Ethereum consensus protocol.
core/state
Package state provides a caching layer atop the Ethereum state trie.
Package state provides a caching layer atop the Ethereum state trie.
core/types
Package types contains data types related to Ethereum consensus.
Package types contains data types related to Ethereum consensus.
core/vm
Package vm implements the Ethereum Virtual Machine.
Package vm implements the Ethereum Virtual Machine.
core/vm/runtime
Package runtime provides a basic execution model for executing EVM code.
Package runtime provides a basic execution model for executing EVM code.
crypto/secp256k1
Package secp256k1 wraps the bitcoin secp256k1 C library.
Package secp256k1 wraps the bitcoin secp256k1 C library.
crypto/sha3
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202.
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202.
event
Package event deals with subscriptions to real-time events.
Package event deals with subscriptions to real-time events.
event/filter
Package filter implements event filters.
Package filter implements event filters.
logger/glog
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
metrics
Package metrics provides general system and process level metrics collection.
Package metrics provides general system and process level metrics collection.
pow
rlp
Package rlp implements the RLP serialization format.
Package rlp implements the RLP serialization format.
trie
Package trie implements Merkle Patricia Tries.
Package trie implements Merkle Patricia Tries.
module
lib/ed25519
Package ed25519 implements the Ed25519 signature algorithm.
Package ed25519 implements the Ed25519 signature algorithm.
lib/ed25519/edwards25519
Package edwards25519 implements operations in GF(2**255-19) and on an Edwards curve that is isomorphic to curve25519.
Package edwards25519 implements operations in GF(2**255-19) and on an Edwards curve that is isomorphic to curve25519.
lib/go-common
Classical-inheritance-style service declarations.
Classical-inheritance-style service declarations.
lib/go-flowrate/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.
lib/go-p2p
Uses nacl's secret_box to encrypt a net.Conn.
Uses nacl's secret_box to encrypt a net.Conn.
lib/go-p2p/upnp
Taken from taipei-torrent
Taken from taipei-torrent
lib/go-rpc/server
Commons for HTTP handling
Commons for HTTP handling
lib/go-rpc/test command
xlib/iavl/pb
Package iavl is a generated protocol buffer package.
Package iavl is a generated protocol buffer package.
src
chain command
chain/app/ikhofi
Package ikhofi is a generated protocol buffer package.
Package ikhofi is a generated protocol buffer package.
chain/types
Package types contains data types related to Ethereum consensus.
Package types contains data types related to Ethereum consensus.
client command
test/tps command
tools/coin command
types
Package types is a generated protocol buffer package.
Package types is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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