Documentation ¶
Index ¶
- func BuildRLPInput(address, currency string, value uint64) []byte
- func ConvertStringToInt(value string) int
- func DeriveAddress(p string) string
- func FilterZeroX(item string) string
- func GenerateAccount() (string, string)
- func LogFormatter()
- func RemoveLeadingZeroX(item string) string
- func SendChChReq(chchRequest ChChRequester, chchClient string, method string, ...) ([]byte, error)
- func SignHash(hashed []byte, privateKeys []string) ([][]byte, error)
- type ChChRequester
- type DepositOwnership
- type DepositParent
- type InputDeposit
- type OutputUTXO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildRLPInput ¶
Build the RLP encoded input to the smart contract that deposit() will accept. The format of the UTXO inputs, outputs, and ownership data is critical. If any value is incorrect the deposit will be rejected by the smart contract and transaction reversed. The correct format is: [[[0,0,0],[0,0,0],[0,0,0],[0,0,0]],[[owner_public, eth_raw, 10], [eth_raw, eth_raw, 0], [eth_raw, eth_raw, 0], [eth_raw, eth_raw, 0]]] where eth_raw is 20 bytes of 0.
func ConvertStringToInt ¶
func GenerateAccount ¶
Generate Account - Public and Privatekey
func LogFormatter ¶
func LogFormatter()
Add the full time include timezone into log messages INFO[2019-01-31T16:38:57+07:00]
func RemoveLeadingZeroX ¶
Make strings suitable for hex encoding
func SendChChReq ¶
func SendChChReq( chchRequest ChChRequester, chchClient string, method string, postData interface{}, ) ([]byte, error)
Types ¶
type DepositOwnership ¶
type DepositParent ¶
type DepositParent struct { UTXOInputs []InputDeposit UTXOOutputs []interface{} }
type InputDeposit ¶
Click to show internal directories.
Click to hide internal directories.