Documentation ¶
Index ¶
- Variables
- func DateFromStamp(timestamp uint64) time.Time
- func Pack58(data []byte) string
- func Unpack58(data string) ([]byte, error)
- func ValidToken(u uint16) bool
- func ValidTransaction(u uint16) bool
- func ValidWalletTag(u uint8) bool
- type Digest
- type PrivateKey
- type PublicKey
- type Signature
- type Token
- type Transaction
- type WalletTag
Constants ¶
This section is empty.
Variables ¶
View Source
var TokenToString = map[Token]string{ TokenMNT: "MNT", TokenGOLD: "GOLD", }
TokenToString definition
View Source
var TransactionToString = map[Transaction]string{ TransactionRegisterNode: "RegisterNodeTransaction", TransactionUnregisterNode: "UnregisterNodeTransaction", TransactionTransferAssets: "TransferAssetsTransaction", TransactionRegisterSystemWallet: "RegisterSystemWalletTransaction", TransactionUnregisterSystemWallet: "UnregisterSystemWalletTransaction", TransactionUserData: "UserDataTransaction", TransactionDistributionFee: "DistributionFeeTransaction", }
TransactionToString definition
View Source
var WalletTagToString = map[WalletTag]string{ WalletTagNode: "Node", WalletTagGenesisNode: "GenesisNode", WalletTagSupervisor: "SupervisorWallet", WalletTagOwner: "OwnerWallet", WalletTagEmission: "EmissionWallet", WalletTagData: "DataWallet", }
WalletTagToString definition
Functions ¶
Types ¶
type PublicKey ¶
type PublicKey [32]byte
PublicKey bytes
func UnpackAddress58 ¶
UnpackAddress58 from string
type Transaction ¶
type Transaction uint16
Transaction in Sumus blockchain
const ( // TransactionRegisterNode registers a new node TransactionRegisterNode Transaction = 1 // TransactionUnregisterNode unregisters existing node TransactionUnregisterNode Transaction = 2 // TransactionTransferAssets sends token between wallets TransactionTransferAssets Transaction = 10 // TransactionRegisterSystemWallet registers system wallet TransactionRegisterSystemWallet Transaction = 3 // TransactionUnregisterSystemWallet unregisters system wallet TransactionUnregisterSystemWallet Transaction = 4 // TransactionUserData contains custom payload TransactionUserData Transaction = 7 // TransactionDistributionFee sends block fee to owner TransactionDistributionFee Transaction = 11 )
func ParseTransaction ¶
func ParseTransaction(s string) (Transaction, error)
ParseTransaction from string
type WalletTag ¶
type WalletTag uint8
WalletTag in Sumus blockchain
const ( // WalletTagNode is node wallet WalletTagNode WalletTag = iota + 1 // WalletTagGenesisNode is node wallet (TODO: clarify) WalletTagGenesisNode // WalletTagSupervisor is controller wallet who can tag other wallets WalletTagSupervisor // WalletTagOwner is a fee accumulator WalletTagOwner // WalletTagEmission emits token without a fee WalletTagEmission // WalletTagData can send UserData transactions without a fee WalletTagData )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.