Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
An Account model to store in Spanner.
type AccountStore ¶
type AccountStore struct { Address string Index string IssuedAt int64 Value string ObserveTime time.Time }
An AccountStore model to store in Spanner.
type AccountTransaction ¶
An AccountTransaction model to store in Spanner.
func (AccountTransaction) Key ¶
func (a AccountTransaction) Key() spanner.Key
Key for the AccountTransaction.
func (AccountTransaction) Table ¶
func (AccountTransaction) Table() string
Table to store AccountTransactions.
type Block ¶
type Block struct { ChainID int64 Height int64 TransactionCount int64 PreviousBlockHash string TransactionRootHash string StateRootHash string HeaderRootHash string GroupSignatureHash string TransactionHashes []string ObserveTime time.Time }
A Block model for storage in Spanner.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client to interact with alicenet. Note: This is a temporary solution as the GRPC endpoint is currently unavailable.
func (*Client) BlockHeader ¶
BlockHeader at a given height.
func (*Client) Transaction ¶
Transaction for a given hash.
type DataStore ¶
type DataStore struct { Signature string TransactionHash string ChainID int64 Index string IssuedAt int64 Deposit string RawData string TransactionOutIndex int64 Owner string Fee string ObserveTime time.Time }
A DataStore model to store in Spanner.
type Interface ¶
type Interface interface { Height(context.Context) (uint32, error) BlockHeader(context.Context, uint32) (*proto.BlockHeader, error) Transaction(context.Context, string) (*MinedTransactionResponse, error) }
The Interface to working with alicenet.
type MinedTransactionResponse ¶
type MinedTransactionResponse struct { Tx struct { Fee string Vin []struct { TXInLinker struct { TXInPreImage struct { ChainID uint32 ConsumedTxIdx uint32 ConsumedTxHash string } TxHash string } Signature string } Vout []struct { DataStore *struct { DSLinker struct { DSPreImage struct { ChainID uint32 Index string IssuedAt uint32 Deposit string RawData string TXOutIdx uint32 Owner string Fee string } TxHash string } Signature string } ValueStore *struct { VSPreImage struct { ChainID uint32 Value string TXOutIdx uint32 Owner string Fee string } TxHash string } } } }
MinedTransactionResponse is a hack put in place to allow for json deserialization because the proto models will eat the contents of Vout. This will not be necessary after moving to using GRPC clients.
type Stores ¶
type Stores struct { Blocks store.Store[Block] Transactions store.Store[Transaction] TransactionInputs store.Store[TransactionInput] DataStores store.Store[DataStore] ValueStores store.Store[ValueStore] Accounts store.Store[Account] AccountTransactions store.Store[AccountTransaction] AccountStores store.Store[AccountStore] }
Stores is a collection of all alicenet Storable objects.
type Transaction ¶
A Transaction model for storage in Spanner.
type TransactionInput ¶
type TransactionInput struct { TransactionHash string TransactionIndex int64 ChainID int64 ConsumedTransactionHash string ConsumedTransactionIndex int64 Signature string ObserveTime time.Time }
A TransactionInput for storage in Spanner.
func (TransactionInput) Table ¶
func (TransactionInput) Table() string
Table to store TransactionInputs.