github.com/quantosnetwork/Quantos@v0.0.0-20220306172517-e20b28c5a29a/sdk/blockchainmanager.go (about) 1 package sdk 2 3 type BlockchainManager interface { 4 CreateNewBlockchain() 5 SetConfigurationFile() 6 GetConfiguration(config string) (value interface{}, err error) 7 GetPublicInfo() 8 GetGenesisBlock() 9 ValidateGenesisBlock() 10 GetValidators() 11 ValidateValidators() 12 GetBlockById(blockID string) 13 ValidateBlock(blockID string) 14 CloseBlock(blockID string) 15 CreateBlock(data ...interface{}) 16 GetLastBlock() 17 GetBlockMerkleRoot(blockID string) 18 GetTXMerkleRoot(txID string) 19 GetReceiptMerkleRoot(rID string) 20 CreateTx(txData ...interface{}) 21 SendTx(txData ...interface{}) 22 SignTx(signData ...interface{}) 23 GetLastTimeStamp() 24 GetBlockByTxID(txId string) 25 GetTxByID(txId string) 26 Consensus() interface{} 27 GetOrphanBlocks() 28 GetPendingTxs() 29 GetPendingBlocks() 30 GetTxQueue() 31 GetBlockQueue() 32 Version() 33 CoinbaseAddress() 34 Coin() 35 Tokens() 36 Contracts() 37 38 } 39 40 type Coins interface{ 41 MintTo(addr string, amt uint) 42 BurnTo(addr string, amt uint) 43 TotalAvailable() 44 Unspent() 45 Pairings() 46 PairingValue() 47 Description() 48 URI() 49 Coinbase() 50 Name() 51 JSONInfo() 52 Contract() 53 } 54 type Token interface{ 55 Address() 56 ContractAddress() 57 TokenType() 58 Coins 59 } 60 type Contract interface{ 61 Code() 62 Hex() 63 CompiledBinary() 64 WASM() 65 VM() VM 66 } 67