Versions in this module Expand all Collapse all v1 v1.0.0 Jan 11, 2019 Changes in this version + func GetRedeedScriptByAddress(accountKeys []AccountKeyTable, addr string) string + type AccountKeyTable struct + Account string + FullPublicKey string + ID int64 + Idx uint32 + KeyStatus uint8 + P2shSegwitAddress string + RedeemScript string + UpdatedAt *time.Time + WalletAddress string + WalletImportFormat string + WalletMultisigAddress string + type AccountPublicKeyTable struct + Account string + ID int64 + IsAllocated bool + UpdatedAt *time.Time + WalletAddress string + type AddedPubkeyHistoryTable struct + AuthAddress1 string + AuthAddress2 string + FullPublicKey string + ID int64 + IsExported bool + RedeemScript string + UpdatedAt *time.Time + WalletMultisigAddress string + type DB struct + RDB *sqlx.DB + func NewDB(d *sqlx.DB) *DB + func (m *DB) GetAddedPubkeyHistoryTableByNoWalletMultisigAddress(accountType enum.AccountType) ([]AddedPubkeyHistoryTable, error) + func (m *DB) GetAddedPubkeyHistoryTableByNotExported(accountType enum.AccountType) ([]AddedPubkeyHistoryTable, error) + func (m *DB) GetAllAccountKeyByKeyStatus(accountType enum.AccountType, keyStatus enum.KeyStatus) ([]AccountKeyTable, error) + func (m *DB) GetAllAccountKeyByMultiAddrs(accountType enum.AccountType, addrs []string) ([]AccountKeyTable, error) + func (m *DB) GetAllAccountPubKeyTable(accountType enum.AccountType) ([]AccountPublicKeyTable, error) + func (m *DB) GetMaxIndexOnAccountKeyTable(accountType enum.AccountType) (int64, error) + func (m *DB) GetOneByMaxIDOnAccountKeyTable(accountType enum.AccountType) (*AccountKeyTable, error) + func (m *DB) GetOneUnAllocatedAccountPubKeyTable(accountType enum.AccountType) (*AccountPublicKeyTable, error) + func (m *DB) GetPaymentRequestAll() ([]PaymentRequest, error) + func (m *DB) GetPaymentRequestByPaymentID(paymentID int64) ([]PaymentRequest, error) + func (m *DB) GetSeedAll() ([]Seed, error) + func (m *DB) GetSeedCount() (int64, error) + func (m *DB) GetSeedOne() (Seed, error) + func (m *DB) GetSentTxHashByTxTypeDone(actionType enum.ActionType) ([]string, error) + func (m *DB) GetSentTxHashByTxTypeSent(actionType enum.ActionType) ([]string, error) + func (m *DB) GetTxByID(actionType enum.ActionType, id int64) (*TxTable, error) + func (m *DB) GetTxCountByUnsignedHex(actionType enum.ActionType, hex string) (int64, error) + func (m *DB) GetTxIDBySentHash(actionType enum.ActionType, hash string) (int64, error) + func (m *DB) GetTxInputByReceiptID(actionType enum.ActionType, receiptID int64) ([]TxInput, error) + func (m *DB) GetTxOutputByReceiptID(actionType enum.ActionType, receiptID int64) ([]TxOutput, error) + func (m *DB) InsertAccountKeyTable(accountType enum.AccountType, accountKeyTables []AccountKeyTable, tx *sqlx.Tx, ...) error + func (m *DB) InsertAccountPubKeyTable(accountType enum.AccountType, accountPubKeyTables []AccountPublicKeyTable, ...) error + func (m *DB) InsertAddedPubkeyHistoryTable(accountType enum.AccountType, ...) error + func (m *DB) InsertPaymentRequest(paymentRequests []PaymentRequest, tx *sqlx.Tx, isCommit bool) error + func (m *DB) InsertSeed(seed string, tx *sqlx.Tx, isCommit bool) (int64, error) + func (m *DB) InsertTxForUnsigned(actionType enum.ActionType, txReceipt *TxTable, tx *sqlx.Tx, isCommit bool) (int64, error) + func (m *DB) InsertTxInputForUnsigned(actionType enum.ActionType, txReceiptInputs []TxInput, tx *sqlx.Tx, ...) error + func (m *DB) InsertTxOutputForUnsigned(actionType enum.ActionType, txReceiptOutputs []TxOutput, tx *sqlx.Tx, ...) error + func (m *DB) ResetAnyFlagOnPaymentRequestForTestOnly(tx *sqlx.Tx, isCommit bool) (int64, error) + func (m *DB) UpdateAccountOnAccountPubKeyTable(accountType enum.AccountType, accountKeyTable []AccountPublicKeyTable, ...) error + func (m *DB) UpdateIsAllocatedOnAccountPubKeyTable(accountType enum.AccountType, accountKeyTable []AccountPublicKeyTable, ...) error + func (m *DB) UpdateIsDoneOnPaymentRequest(paymentID int64, tx *sqlx.Tx, isCommit bool) (int64, error) + func (m *DB) UpdateIsExportedOnAddedPubkeyHistoryTable(accountType enum.AccountType, ids []int64, tx *sqlx.Tx, isCommit bool) (int64, error) + func (m *DB) UpdateKeyStatusByWIF(accountType enum.AccountType, keyStatus enum.KeyStatus, strWIF string, ...) (int64, error) + func (m *DB) UpdateKeyStatusByWIFs(accountType enum.AccountType, keyStatus enum.KeyStatus, wifs []string, ...) (int64, error) + func (m *DB) UpdateMultisigAddrOnAccountKeyTableByFullPubKey(accountType enum.AccountType, accountKeyTable []AccountKeyTable, tx *sqlx.Tx, ...) error + func (m *DB) UpdateMultisigAddrOnAddedPubkeyHistoryTable(accountType enum.AccountType, ...) error + func (m *DB) UpdatePaymentIDOnPaymentRequest(paymentID int64, ids []int64, tx *sqlx.Tx, isCommit bool) (int64, error) + func (m *DB) UpdateTxAfterSent(actionType enum.ActionType, txReceipt *TxTable, tx *sqlx.Tx, isCommit bool) (int64, error) + func (m *DB) UpdateTxTypeDoneByID(actionType enum.ActionType, ID int64, tx *sqlx.Tx, isCommit bool) (int64, error) + func (m *DB) UpdateTxTypeDoneByTxHash(actionType enum.ActionType, hash string, tx *sqlx.Tx, isCommit bool) (int64, error) + func (m *DB) UpdateTxTypeNotifiedByID(actionType enum.ActionType, ID int64, tx *sqlx.Tx, isCommit bool) (int64, error) + func (m *DB) UpdateTxTypeNotifiedByTxHash(actionType enum.ActionType, hash string, tx *sqlx.Tx, isCommit bool) (int64, error) + type PaymentRequest struct + AccountFrom string + AddressFrom string + AddressTo string + Amount string + ID int64 + IsDone bool + PaymentID *int64 + UpdatedAt *time.Time + type Seed struct + ID uint8 + Seed string + UpdatedAt *time.Time + type TxInput struct + ID int64 + InputAccount string + InputAddress string + InputAmount string + InputConfirmations int64 + InputTxid string + InputVout uint32 + ReceiptID int64 + UpdatedAt *time.Time + type TxOutput struct + ID int64 + IsChange bool + OutputAccount string + OutputAddress string + OutputAmount string + ReceiptID int64 + UpdatedAt *time.Time + type TxTable struct + Fee string + ID int64 + SentHashTx string + SentUpdatedAt *time.Time + SignedHexTx string + SignedUpdatedAt *time.Time + TotalInputAmount string + TotalOutputAmount string + TxType uint8 + UnsignedHexTx string + UnsignedUpdatedAt *time.Time