Documentation
¶
Overview ¶
* Copyright (C) 2019 Zilliqa * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.
Index ¶
- func EncodeTransactionProto(txParams txParams) ([]byte, error)
- func FromBech32Addr(address string) (string, error)
- func GetAddressFromPrivateKey(privKeyHex string) (string, error)
- func GetPublicKeyFromPrivateKey(privKeyHex string) (string, error)
- func IsAddress(address string) bool
- func IsBech32(addr string) bool
- func IsByteString(str string, len int) bool
- func IsPrivateKey(private_key string) bool
- func IsPublicKey(public_key string) bool
- func IsSignature(signature string) bool
- func SignTransaction(privateKeyhex string, tx *Transaction) error
- func ToBech32Address(address string) (string, error)
- type Init
- type Transaction
- type TransactionPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeTransactionProto ¶
func FromBech32Addr ¶
func IsByteString ¶
func IsPrivateKey ¶
func IsPublicKey ¶
func IsSignature ¶
func SignTransaction ¶
func SignTransaction(privateKeyhex string, tx *Transaction) error
func ToBech32Address ¶
Types ¶
type Init ¶
type Init struct { Version int `json:"version"` Nonce int `json:"nonce"` ToAddr string `json:"toAddr"` Amount int64 `json:"amount"` PubKey string `json:"pubKey"` GasPrice int64 `json:"gasPrice"` GasLimit int64 `json:"gasLimit"` Code string `json:"code"` Data []interface{} `json:"data"` Signature string `json:"signature"` }
type Transaction ¶
type Transaction struct { ID string Version string Nonce string Amount string GasPrice string GasLimit string Signature string SenderPubKey string ToAddr string Code string Data interface{} ContractAddress string Priority bool }
func (*Transaction) Bytes ¶
func (t *Transaction) Bytes() ([]byte, error)
func (*Transaction) ToTransactionPayload ¶
func (t *Transaction) ToTransactionPayload() TransactionPayload
type TransactionPayload ¶
type TransactionPayload struct { Version int `json:"version"` Nonce int `json:"nonce"` ToAddr string `json:"toAddr"` Amount string `json:"amount"` PubKey string `json:"pubKey"` GasPrice string `json:"gasPrice"` GasLimit string `json:"gasLimit"` Code string `json:"code"` Data string `json:"data"` Signature string `json:"signature"` Priority bool `json:"priority"` }
Directories
¶
Path | Synopsis |
---|---|
* Copyright (C) 2019 Zilliqa * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version.
|
* Copyright (C) 2019 Zilliqa * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. |
* Copyright (C) 2019 Zilliqa * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version.
|
* Copyright (C) 2019 Zilliqa * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. |