github.com/aergoio/aergo@v1.3.1/message/accountmsg.go (about)

     1  package message
     2  
     3  import (
     4  	"github.com/aergoio/aergo/types"
     5  )
     6  
     7  const AccountsSvc = "AccountsSvc"
     8  
     9  type CreateAccount struct {
    10  	Passphrase string
    11  }
    12  
    13  type CreateAccountRsp struct {
    14  	Account *types.Account
    15  }
    16  
    17  type LockAccount struct {
    18  	Account    *types.Account
    19  	Passphrase string
    20  }
    21  
    22  type UnlockAccount struct {
    23  	Account    *types.Account
    24  	Passphrase string
    25  }
    26  
    27  type AccountRsp struct {
    28  	Account *types.Account
    29  	Err     error
    30  }
    31  
    32  /*
    33  TODO: is it good? or bad?
    34  type LockAccountRsp struct {
    35  	Account *types.Account
    36  	Err     error
    37  }
    38  
    39  type UnlockAccountRsp struct {
    40  	Account *types.Account
    41  	Err     error
    42  }
    43  */
    44  
    45  type SignTx struct {
    46  	Tx        *types.Tx
    47  	Requester []byte
    48  }
    49  type SignTxRsp struct {
    50  	Tx  *types.Tx
    51  	Err error
    52  }
    53  
    54  type VerifyTx struct {
    55  	Tx *types.Tx
    56  }
    57  type VerifyTxRsp struct {
    58  	Tx  *types.Tx
    59  	Err error
    60  }
    61  
    62  type GetAccounts struct{}
    63  type GetAccountsRsp struct {
    64  	Accounts *types.AccountList
    65  }
    66  
    67  type ImportAccount struct {
    68  	Wif     []byte
    69  	OldPass string
    70  	NewPass string
    71  }
    72  type ImportAccountRsp struct {
    73  	Account *types.Account
    74  	Err     error
    75  }
    76  
    77  type ExportAccount struct {
    78  	Account *types.Account
    79  	Pass    string
    80  }
    81  
    82  type ExportAccountRsp struct {
    83  	Wif []byte
    84  	Err error
    85  }