Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var KeyDBClient mongo.Collection
View Source
var MainDBClient mongo.Collection
View Source
var RelDBClient mongo.Collection
Functions ¶
func AddKey ¶
func AddKey(name string, derivationPath string, address string, publicKey []byte, encPrivateKey []byte)
Add new key to the account
func CountNumberOfKeys ¶
func CountNumberOfKeys() int64
func CountNumberOfTransactions ¶
func CountNumberOfTransactions() int64
func InsertRelated ¶
func InsertRelated(dbItem MainDBItem)
Saves a transaction related to this account
Types ¶
type KeyDBItem ¶
type KeyDBItem struct { Name string DerivationPath string Address string PublicKey []byte EncPrivateKey []byte }
Key structure
func GetKeyByName ¶
Gets a single keypair by its given name
func GetsKeyByDerivationPath ¶
GetsKeyByDerivationPath fetches a list of keys with given a derivation path
type MainDBItem ¶
type MainDBItem struct { Index uint64 Hash []byte PrevHash []byte Date time.Time ObjectType byte SubType byte Data []byte Targets []string Signatures [][]byte PublicKeys [][]byte DerivationPaths [][]byte OrganizationTransaction []byte // Genesis transaction of the organization referred by this transaction }
Transaction structure
func GetByObjectType ¶
func GetByObjectType(objectType byte) []MainDBItem
Get organization transactions
Click to show internal directories.
Click to hide internal directories.