sdk

package
v0.0.0-...-f318d61 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const SDKVERSION = 1

Variables

View Source
var CurrentNetworkID config.NetworkID

Functions

func MakeNewUint256

func MakeNewUint256(b []byte) *uint256.Int

func Uint256BytesFromHex

func Uint256BytesFromHex(hex string) []byte

func Uint256StringFromBytes

func Uint256StringFromBytes(b []byte) string

Types

type API

type API interface {
	Connection() net.Conn
	Auth()
	Synchronize()
	GetEndpoints() map[string]string
	Disconnect()
	Close()
	Send(dataType string, value interface{})
	SendTo(uri string, dataType string, value interface{})
	Subscribe(topic string) chan interface{}
	Info()
	Stats()
	Metrics()
}

type AccountManager

type AccountManager interface {
	CreateNewAccount() *address.Account
	GetAddressFromAccount() address.Address
	GetAccountFromAddress(addr address.Address) *address.Account
	Wallet()
	Keys() KeyManager
	Authenticate(args ...[]byte) bool
}

type AddressSDK

type AddressSDK interface {
	InitSDK(netID string)
	GenerateMasterWalletAddress() (*uint512.Address, string)
	VerifyAddress(in string, out bool)
	IsZeroAddress(in string, out bool)
	GenerateTXAddress(in InputData, out OutputData)
	GenerateBlockAddress(in InputData, out OutputData)
	GetZeroAddress() string
	DeriveFromMaster(master *uint512.Address, derivationPath string) string
}

func GetAddressSDK

func GetAddressSDK() AddressSDK

type BlockchainManager

type BlockchainManager interface {
	CreateNewBlockchain()
	SetConfigurationFile()
	GetConfiguration(config string) (value interface{}, err error)
	GetPublicInfo()
	GetGenesisBlock()
	ValidateGenesisBlock()
	GetValidators()
	ValidateValidators()
	GetBlockById(blockID string)
	ValidateBlock(blockID string)
	CloseBlock(blockID string)
	CreateBlock(data ...interface{})
	GetLastBlock()
	GetBlockMerkleRoot(blockID string)
	GetTXMerkleRoot(txID string)
	GetReceiptMerkleRoot(rID string)
	CreateTx(txData ...interface{})
	SendTx(txData ...interface{})
	SignTx(signData ...interface{})
	GetLastTimeStamp()
	GetBlockByTxID(txId string)
	GetTxByID(txId string)
	Consensus() interface{}
	GetOrphanBlocks()
	GetPendingTxs()
	GetPendingBlocks()
	GetTxQueue()
	GetBlockQueue()
	Version()
	CoinbaseAddress()
	Coin()
	Tokens()
	Contracts()
}

type Coins

type Coins interface {
	MintTo(addr string, amt uint)
	BurnTo(addr string, amt uint)
	TotalAvailable()
	Unspent()
	Pairings()
	PairingValue()
	Description()
	URI()
	Coinbase()
	Name()
	JSONInfo()
	Contract()
}

type Contract

type Contract interface {
	Code()
	Hex()
	CompiledBinary()
	WASM()
	VM() VM
}

type InputData

type InputData struct {
	// contains filtered or unexported fields
}

type KeyManager

type KeyManager interface {
	GenerateKeyPair() *crypto.HardenedKeys
	SignItem(item []byte) []byte
	ValidateSignedItem(item []byte, sig []byte) (bool, error)
	GetPublicKey() kyber.Point
	GetPrivateKey() kyber.Scalar
	GetCurrentSuite() suites.Suite
	ExchangeSecrets() bool
	Encrypt()
	Decrypt()
}

type OutputData

type OutputData struct {
	// contains filtered or unexported fields
}

type Protocol

type Protocol interface {
	P2P()
	KeyExchangeProtocol()
}

type QuantosSDK

type QuantosSDK interface {
	Version() int
	KeyManager() KeyManager
	AccountManager() AccountManager
	Protocol() Protocol
	BlockchainManager()
	Wire()
	GetChainConfig() map[string]string
}

type Token

type Token interface {
	Address()
	ContractAddress()
	TokenType()
	Coins
}

type VM

type VM interface {
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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