Documentation ¶
Index ¶
- Constants
- func GenerateRandomSeedString() string
- func Gensequentialwallet(wlt *Wallet, seedString string)
- func SerializeRSAPrivateKey(privateKey *rsa.PrivateKey) ([]byte, error)
- func SerializeRSAPublicKey(publicKey *rsa.PublicKey) ([]byte, error)
- func UnserializeRSAPrivateKey(privkeyBytes []byte) (rsa.PrivateKey, error)
- func UnserializeRSAPublicKey(pubkeyBytes []byte) (rsa.PublicKey, error)
- func VerifyRSASignature(encryptedBytes []byte, sendersignature []byte, senderpublickeyBytes []byte) error
- type Asset
- type Broadcastedtx
- type Commcredential
- type Contact
- type PrivateKeyBytes
- type Wallet
- func (wlt *Wallet) AddAsset(txhash utility.Hash, index uint32, value uint64, privkeyindex uint32, ...)
- func (wlt *Wallet) AddBroadcastedtx(tx utility.Transaction)
- func (wlt *Wallet) AddContact(tmpname string, tmpaddrstring string, tmpgroupidarray []uint32)
- func (wlt *Wallet) ComputeBalance() uint64
- func (wlt *Wallet) DecryptCommText(encryptedBytes []byte, recepientpublickeyhash utility.Hash) ([]byte, error)
- func (wlt *Wallet) EncryptCommText(tmptext []byte, recipientPubkeyBytes []byte, sendername []byte) ([]byte, []byte, error)
- func (wlt *Wallet) GenerateCommKey(tmpname []byte) []byte
- func (wlt *Wallet) GenerateKeyPair() utility.Hash
- func (wlt *Wallet) GenerateKeyPairs(nbkeypair int)
- func (wlt *Wallet) GetAddress(i uint) utility.Hash
- func (wlt *Wallet) GetAddressesDetails() []string
- func (wlt *Wallet) GetAssetFromRegisteredName(name string) (*Asset, error)
- func (wlt *Wallet) GetAssetsDetails() []string
- func (wlt *Wallet) GetLastAddress() utility.Hash
- func (wlt *Wallet) GetNbAddresses() int
- func (wlt *Wallet) GetNbAssets() int
- func (wlt *Wallet) GetPrivatekeyindexFromAddress(addr utility.Hash) int
- func (wlt *Wallet) GetRegisteredNames() []string
- func (wlt *Wallet) GetUnconfirmedBroadcastedTxs() []*utility.Transaction
- func (wlt *Wallet) LoadJSONWalletFile(path string, key []byte) error
- func (wlt *Wallet) Lock()
- func (wlt *Wallet) SaveJSONWalletFile(walletfilepath string, key []byte)
- func (wlt *Wallet) SetupTransactionAmount(amount uint64, fee uint64, txin *utility.TxIn, txout *utility.TxOut) (*utility.Transaction, error)
- func (wlt *Wallet) SetupTransactionForNameRegistration(name []byte, pubkeyhash utility.Hash, amount uint64, fee uint64) (*utility.Transaction, error)
- func (wlt *Wallet) SetupTransactionForNameUnregistration(name string, fee uint64) (*utility.Transaction, error)
- func (wlt *Wallet) SetupTransactionForRegistredNameCommit(name string, commitbytes []byte, fee uint64) (*utility.Transaction, error)
- func (wlt *Wallet) SetupTransactionToPublicKeyHash(pubkeyhash utility.Hash, amount uint64, fee uint64) (*utility.Transaction, error)
- func (wlt *Wallet) SetupTransactionToPublicKeyHashArray(pubkeyhasharray []utility.Hash, amountarray []uint64, fee uint64) (*utility.Transaction, error)
- func (wlt *Wallet) Unlock()
- type Walletfile
Constants ¶
View Source
const ( NB_INITIAL_HASHES int = 10000000 WALLET_TYPE_SEQUENTIAL uint32 = 1 WALLET_TYPE_SEQUENTIAL_VERSION uint32 = 1 )
Variables ¶
This section is empty.
Functions ¶
func GenerateRandomSeedString ¶ added in v0.2.2
func GenerateRandomSeedString() string
func Gensequentialwallet ¶ added in v0.2.3
func SerializeRSAPrivateKey ¶ added in v0.2.4
func SerializeRSAPrivateKey(privateKey *rsa.PrivateKey) ([]byte, error)
func SerializeRSAPublicKey ¶ added in v0.2.4
func UnserializeRSAPrivateKey ¶ added in v0.2.4
func UnserializeRSAPrivateKey(privkeyBytes []byte) (rsa.PrivateKey, error)
func UnserializeRSAPublicKey ¶ added in v0.2.4
Types ¶
type Broadcastedtx ¶
type Broadcastedtx struct { Tx utility.Transaction ConfirmationString string }
type Commcredential ¶ added in v0.2.4
type Commcredential struct { Name string RSAPrivateKey rsa.PrivateKey RSAPublicKeyHash utility.Hash }
type PrivateKeyBytes ¶
type PrivateKeyBytes []byte
type Wallet ¶
type Wallet struct { //HotWallet bool //Hotaddresses HotAddresses //Chain []byte Walletloaded bool Walletstate string Path string Type uint32 Version uint32 Privatekeyarray []*btcec.PrivateKey Assetarray []Asset Lastknownblock uint64 Broadcastedtxarray []Broadcastedtx Commcredentialarray []Commcredential Groupnamearray []string Contactarray []Contact // contains filtered or unexported fields }
func Newsequentialwallet ¶ added in v0.2.3
func (*Wallet) AddBroadcastedtx ¶
func (wlt *Wallet) AddBroadcastedtx(tx utility.Transaction)
func (*Wallet) AddContact ¶
func (*Wallet) ComputeBalance ¶
func (*Wallet) DecryptCommText ¶ added in v0.2.4
func (*Wallet) EncryptCommText ¶ added in v0.2.4
func (*Wallet) GenerateCommKey ¶ added in v0.2.4
func (*Wallet) GenerateKeyPair ¶
func (*Wallet) GenerateKeyPairs ¶ added in v0.2.3
func (*Wallet) GetAddressesDetails ¶
func (*Wallet) GetAssetFromRegisteredName ¶
func (*Wallet) GetAssetsDetails ¶
func (*Wallet) GetLastAddress ¶
func (*Wallet) GetNbAddresses ¶
func (*Wallet) GetNbAssets ¶
func (wlt *Wallet) GetAssetInfo(int i) ([]byte,value){ return len(wlt.Assetarray) }
func (*Wallet) GetPrivatekeyindexFromAddress ¶
func (*Wallet) GetRegisteredNames ¶
func (*Wallet) GetUnconfirmedBroadcastedTxs ¶
func (wlt *Wallet) GetUnconfirmedBroadcastedTxs() []*utility.Transaction
func (*Wallet) LoadJSONWalletFile ¶ added in v0.2.2
func (*Wallet) SaveJSONWalletFile ¶ added in v0.2.3
func (*Wallet) SetupTransactionAmount ¶
func (*Wallet) SetupTransactionForNameRegistration ¶
func (*Wallet) SetupTransactionForNameUnregistration ¶
func (*Wallet) SetupTransactionForRegistredNameCommit ¶ added in v0.2.3
func (*Wallet) SetupTransactionToPublicKeyHash ¶
func (*Wallet) SetupTransactionToPublicKeyHashArray ¶
type Walletfile ¶
type Walletfile struct { //Path string //Chain []byte // Privatekeyarray []PrivateKeyBytes Assetarray []Asset Lastknownblock uint64 Broadcastedtxarray []Broadcastedtx Groupnamearray []string Contactarray []Contact }
Click to show internal directories.
Click to hide internal directories.