# Functions
BabyJubJub describes the twisted Edwards curve, babyJubJub, required for zero-knowledge proofs.
BcoinDialJsonRpc - dials and caches a new JSON-RPC client instance at the JSON-RPC url and caches it using the given network id.
BcoinGenerateKeyPair generates a bitcoin address using the given hex representation of a secp256k1 private key; see http://bcoin.io/guides/generate-address.html; returns the address and private key, or an error.
BcoinGetBlock retrieves the latsest block.
BcoinGetChainInfo retrieves chain info.
BcoinGetDifficulty retrieves the current difficulty target.
BcoinGetHeader retrieves the latsest block.
BcoinGetHeight retrieves the height of the longest chain.
BcoinGetNetworkStatus retrieves current metadata from the JSON-RPC client; returned struct includes block height, number of connected peers, protocol version, and syncing state.
BcoinInvokeJsonRpcClient - invokes the JSON-RPC client for the given network and url.
BcoinResolveJsonRpcClient resolves a cached *ethclient.Client client or dials and caches a new instance.
C25519ComputeSecret - computes the shared secret given a private key and peer's public key.
C25519GenerateKeyPair - generates a c25519 keypair suitable for Diffie-Hellman key exchange.
EVMBroadcastSignedTx emits a given signed tx for inclusion in a block.
EVMBroadcastTx injects a signed transaction into the pending pool for execution.
EVMChainConfigFactory returns the chain config for the given chain id.
EVMDialJsonRpc - dials and caches a new JSON-RPC client instance at the JSON-RPC url and caches it using the given network id.
EVMEncodeABI returns the ABI-encoded calldata for the given method and params.
EVMEthCall invokes eth_call manually via JSON-RPC.
EVMGenerateKeyPair - creates and returns an ECDSA keypair; the returned *ecdsa.PrivateKey can be encoded with: hex.EncodeToString(ethcrypto.FromECDSA(privateKey)).
EVMGetBlockByNumber retrieves a given block by number.
EVMGetBlockGasLimit retrieves the latest block gas limit.
EVMGetBlockNumber retrieves the latest block known to the JSON-RPC client.
EVMGetBlockTimestamp retrieves a block timestamp (seconds since epoch time) for the given block by number.
EVMGetChainConfig parses the cached network config mapped to the given `rpcClientKey`, if one exists; otherwise, the mainnet chain config is returned.
EVMGetChainID retrieves the current chainID via JSON-RPC.
EVMGetCode retrieves the code stored at the named address in the given scope; scope can be a block number, latest, earliest or pending.
EVMGetGasPrice returns the gas price.
EVMGetHeaderByNumber retrieves a given block header by number.
EVMGetLatestBlock retrieves the latest block.
EVMGetLatestBlockNumber retrieves the latest block number.
EVMGetLogs retrieves logs emitted from the given contract address.
EVMGetNativeBalance retrieves a wallet's native currency balance.
EVMGetNetworkStatus retrieves current metadata from the JSON-RPC client; returned struct includes block height, chainID, number of connected peers, protocol version, and syncing state.
EVMGetPeerCount returns the number of peers currently connected to the JSON-RPC client.
EVMGetProtocolVersion returns the JSON-RPC client protocol version.
EVMGetSyncProgress retrieves the status of the current network sync.
EVMGetTokenBalance retrieves a token balance for a specific token contract and network address.
EVMGetTokenDecimals attempts to retrieve the number of decimals supported by an arbitrary token contract.
EVMGetTokenSymbol attempts to retrieve the symbol of a token presumed to be deployed at the given token contract address.
EVMGetTxReceipt retrieves the full transaction receipt via JSON-RPC given the transaction hash.
EVMHashFunctionSelector returns the first 4 bytes of the Keccak256 hash of the given function selector.
EVMInvokeJsonRpcClient - invokes the JSON-RPC client for the given network and url.
EVMMarshalEncryptedKey encrypts key as version 3.
EVMMarshalKeyPairJSON - returns keystore JSON representation of given private key.
EVMResolveEthClient resolves a cached *ethclient.Client client or dials and caches a new instance.
EVMResolveJsonRpcClient resolves a cached *ethclient.Client client or dials and caches a new instance.
EVMSignTx signs a transaction using the given private key and calldata; providing 0 gas results in the tx attempting to use up to the block gas limit for execution.
EVMTraceTx returns the VM traces; requires parity JSON-RPC client and the node must be configured with `--fat-db on --tracing on --pruning archive`.
EVMTxFactory builds and returns an unsigned transaction hash.
FromECDSA exports a private key into a binary dump.
HexToAddress returns Address with byte values of s.
Keccak256 hash the given string.
TECGenerateKeyPair - creates and returns an Twisted Edwards Curve (TEC) keypair;.
TECSign signs the given message using the given private key TODO: see crypto/anon/sig.go to add anonymous sigs.
TECVerify verifies a signature for the given message and public key.