Documentation
¶
Index ¶
- func CreateCoinTxn(inputs []Inputs, outputs map[string]*big.Float, ...) (*pb.CoinTXN, error)
- func GetNonce(address string) uint64
- func SendCoinTXN(txn *pb.CoinTXN) (*emptypb.Empty, error)
- func Sign(privateKeyBase58 string, payload []byte, keyType KeyType) ([]byte, error)
- func Verify(publicKeyBase58 string, payload []byte, signature []byte) (bool, error)
- type HashType
- type Inputs
- type KeyType
- type NetworkClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCoinTxn ¶
func CreateCoinTxn(inputs []Inputs, outputs map[string]*big.Float, symbol, baseFeeID, baseFeeAmountParts string, contractFeeID, contractFeeAmountParts *string) (*pb.CoinTXN, error)
CreateCoinTxn creates a CoinTXN protobuf message for a given set of inputs and outputs Inputs: [Key] = address, [Value] = Inputs struct Outputs: [Key] = address, [Value] = amount of whole coins (not parts) symbol: contract symbol to send (ex $ZRA+0000) baseFeeID: fee id for the base fee (ex $ZRA+0000) baseFeeAmountParts: fee amount for the base fee in *parts* (ex 1000000000 = 1 ZRA) contractFeeID: fee id for the contract fee (ex $ZRA+0000) contractFeeAmountParts: fee amount for the contract fee in *parts* (ex 1000000000 = 1 ZRA)
func GetNonce ¶
Gets the nonce from ZV indexer, ignores ssl cert in case its self signed or a non-official service to get nonce
Types ¶
type NetworkClient ¶
type NetworkClient struct {
// contains filtered or unexported fields
}
struct for client implementation of grpcs
func NewNetworkClient ¶
func NewNetworkClient(conn *grpc.ClientConn) *NetworkClient
constructor for client implementation of grpcs