Documentation ¶
Index ¶
- Constants
- Variables
- func Create(password []byte) error
- func GetPassword(password []byte, confirmed bool) ([]byte, error)
- func InputFromUTXO(utxo *sutil.UTXO) *types.Input
- func SelectAccount(wallet *Wallet) (string, error)
- func Setup(dataDir, rpcUrl string, assetId common.Uint256)
- func ShowAccountInfo(password []byte) error
- func ShowAccounts(addrs []*sutil.Addr, newAddr *common.Uint168, wallet *Wallet) error
- type Keystore
- func (store *Keystore) ChangePassword(oldPassword, newPassword []byte) error
- func (store *Keystore) FromJson(str string, password string) error
- func (store *Keystore) GetAccountByIndex(index int) *sdk.Account
- func (store *Keystore) GetAccountByProgramHash(programHash *common.Uint168) *sdk.Account
- func (store *Keystore) GetAccounts() []*sdk.Account
- func (store *Keystore) Json() (string, error)
- func (store *Keystore) MainAccount() *sdk.Account
- func (store *Keystore) NewAccount() *sdk.Account
- type KeystoreFile
- func (store *KeystoreFile) FromJson(str string) error
- func (store *KeystoreFile) GetIV() ([]byte, error)
- func (store *KeystoreFile) GetMasterKeyEncrypted() ([]byte, error)
- func (store *KeystoreFile) GetPasswordHash() ([]byte, error)
- func (store *KeystoreFile) GetPrivetKeyEncrypted() ([]byte, error)
- func (store *KeystoreFile) Json() (string, error)
- func (store *KeystoreFile) LoadFromFile() error
- func (store *KeystoreFile) SaveToFile() error
- func (store *KeystoreFile) SetIV(iv []byte)
- func (store *KeystoreFile) SetMasterKeyEncrypted(masterKeyEncrypted []byte)
- func (store *KeystoreFile) SetPasswordHash(passwordHash []byte)
- func (store *KeystoreFile) SetPrivateKeyEncrypted(privateKeyEncrypted []byte)
- type Transfer
- type Wallet
- func (wallet *Wallet) AddMultiSignAccount(m int, publicKeys ...*crypto.PublicKey) (*common.Uint168, error)
- func (wallet *Wallet) CreateLockedMultiOutputTransaction(fromAddress string, fee *common.Fixed64, lockedUntil uint32, ...) (*types.Transaction, error)
- func (wallet *Wallet) CreateLockedTransaction(fromAddress, toAddress string, amount, fee *common.Fixed64, lockedUntil uint32) (*types.Transaction, error)
- func (wallet *Wallet) CreateMultiOutputTransaction(fromAddress string, fee *common.Fixed64, outputs ...*Transfer) (*types.Transaction, error)
- func (wallet *Wallet) CreateTransaction(fromAddress, toAddress string, amount, fee *common.Fixed64) (*types.Transaction, error)
- func (wallet *Wallet) NewSubAccount(password []byte) (*common.Uint168, error)
- func (wallet *Wallet) SendTransaction(tx *types.Transaction) error
- func (wallet *Wallet) Sign(password []byte, tx *types.Transaction) (*types.Transaction, error)
- func (wallet *Wallet) VerifyPassword(password []byte) error
Constants ¶
View Source
const (
KeystoreFilename = "keystore.dat"
)
View Source
const (
KeystoreVersion = "1.0"
)
Variables ¶
View Source
var CommonFlags = []cli.Flag{ cli.StringFlag{ Name: "password, p", Usage: "keystore password", }, }
Functions ¶
func SelectAccount ¶
func ShowAccountInfo ¶
Types ¶
type Keystore ¶
type Keystore struct { sync.Mutex *KeystoreFile // contains filtered or unexported fields }
func CreateKeystore ¶
func OpenKeystore ¶
func (*Keystore) ChangePassword ¶
func (*Keystore) GetAccountByIndex ¶
func (*Keystore) GetAccountByProgramHash ¶
func (*Keystore) GetAccounts ¶
func (*Keystore) MainAccount ¶
func (*Keystore) NewAccount ¶
type KeystoreFile ¶
type KeystoreFile struct { sync.Mutex Version string IV string PasswordHash string MasterKeyEncrypted string PrivateKeyEncrypted string SubAccountsCount int }
func CreateKeystoreFile ¶
func CreateKeystoreFile() (*KeystoreFile, error)
func OpenKeystoreFile ¶
func OpenKeystoreFile() (*KeystoreFile, error)
func (*KeystoreFile) FromJson ¶
func (store *KeystoreFile) FromJson(str string) error
func (*KeystoreFile) GetIV ¶
func (store *KeystoreFile) GetIV() ([]byte, error)
func (*KeystoreFile) GetMasterKeyEncrypted ¶
func (store *KeystoreFile) GetMasterKeyEncrypted() ([]byte, error)
func (*KeystoreFile) GetPasswordHash ¶
func (store *KeystoreFile) GetPasswordHash() ([]byte, error)
func (*KeystoreFile) GetPrivetKeyEncrypted ¶
func (store *KeystoreFile) GetPrivetKeyEncrypted() ([]byte, error)
func (*KeystoreFile) Json ¶
func (store *KeystoreFile) Json() (string, error)
func (*KeystoreFile) LoadFromFile ¶
func (store *KeystoreFile) LoadFromFile() error
func (*KeystoreFile) SaveToFile ¶
func (store *KeystoreFile) SaveToFile() error
func (*KeystoreFile) SetIV ¶
func (store *KeystoreFile) SetIV(iv []byte)
func (*KeystoreFile) SetMasterKeyEncrypted ¶
func (store *KeystoreFile) SetMasterKeyEncrypted(masterKeyEncrypted []byte)
func (*KeystoreFile) SetPasswordHash ¶
func (store *KeystoreFile) SetPasswordHash(passwordHash []byte)
func (*KeystoreFile) SetPrivateKeyEncrypted ¶
func (store *KeystoreFile) SetPrivateKeyEncrypted(privateKeyEncrypted []byte)
type Wallet ¶
func (*Wallet) AddMultiSignAccount ¶
func (*Wallet) CreateLockedMultiOutputTransaction ¶
func (*Wallet) CreateLockedTransaction ¶
func (*Wallet) CreateMultiOutputTransaction ¶
func (*Wallet) CreateTransaction ¶
func (*Wallet) NewSubAccount ¶
func (*Wallet) SendTransaction ¶
func (wallet *Wallet) SendTransaction(tx *types.Transaction) error
func (*Wallet) Sign ¶
func (wallet *Wallet) Sign(password []byte, tx *types.Transaction) (*types.Transaction, error)
func (*Wallet) VerifyPassword ¶
Click to show internal directories.
Click to hide internal directories.