Documentation
¶
Index ¶
Constants ¶
View Source
const ( AccountTypeEVM = "ethereum" AccountTypeAR = "arweave" )
Variables ¶
View Source
var ( ERR_INVALID_ID = errors.New("err_invalid_id") ERR_INVALID_ACCOUNT_TYPE = errors.New("err_invalid_account_type") ERR_INVALID_NONCE = errors.New("err_invalid_nonce") ERR_NONCE_TOO_LOW = errors.New("err_nonce_too_low") ERR_INVALID_SIGNATURE = errors.New("err_invalid_signature") ERR_INVALID_TRANSACTION = errors.New("err_invalid_transaction") )
Functions ¶
func DecodeArSig ¶
func DecodeEthSig ¶
func IsArAddress ¶
Types ¶
type Account ¶
type Account struct { ID string // ID is eth address, notice: Case Sensitive Type string Nonce int64 }
func (*Account) UpdateNonce ¶
func (*Account) Verify ¶
func (a *Account) Verify(tx Transaction) (nonce int64, err error)
Verify & return transaction's nonce
func (*Account) VerifySig ¶
func (a *Account) VerifySig(tx Transaction) (err error)
only verify signature
type Transaction ¶
Click to show internal directories.
Click to hide internal directories.