transaction

package
v0.0.0-...-868bdbc Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2020 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrettyPrint

func PrettyPrint(tx Tx) (string, error)

PrettyPrint prints the json with readable indenting

Types

type Asset

type Asset struct {
	Category                string `json:"category"`
	Symbol                  string `json:"symbol"`
	Network                 string `json:"network"`
	Value                   string `json:"value"`
	Fee                     string `json:"fee"`
	Nonce                   string `json:"nonce"`
	ExternalSenderAddress   string `json:"external_sender_address"`
	ExternalRecieverAddress string `json:"external_reciever_address"`
	ExternalNonce           uint64 `json:"external_nonce"`
	ExternalBlockHeight     uint64 `json:"external_block_height"`
	LockedAmount            uint64 `json:"locked_amount"`
	RedeemedAmount          uint64 `json:"redeemed_amount"`
}

Asset ...

type Service

type Service interface {
	AddTx(Tx)
	GetTxList() *TxList
}

Service provides Transaction specific operations for the end users.

func TxService

func TxService() Service

TxService creates a new transaction service

type Tx

type Tx struct {
	SenderAddress   string `json:"sender_address"`
	SenderPubKey    string `json:"sender_pubkey"`
	ReceiverAddress string `json:"receiver_address"`
	Asset           Asset  `json:"asset"`
	Message         string `json:"message"`
	Signature       string `json:"sign"`
	Type            string `json:"type"`
	Status          string `json:"status"`
	Data            string `json:"data"`
}

Tx ...

type TxList

type TxList struct {
	Transactions []*Tx `json:"transactions"`
}

TxList : List of Transactions Batches are to be created for 500-1000 Transactions

Jump to

Keyboard shortcuts

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