Documentation ¶
Index ¶
- Constants
- func NewLocalWalletAdaptor(network config.NetWorkType) wallet.WalletAdaptor
- func NewWalletAdaptor(conf *config.Config) (wallet.WalletAdaptor, error)
- type WalletAdaptor
- func (a *WalletAdaptor) ConvertAddress(req *wallet2.ConvertAddressRequest) (*wallet2.ConvertAddressResponse, error)
- func (a *WalletAdaptor) CreateAccountSignedTx(req *wallet2.CreateAccountSignedTxRequest) (*wallet2.CreateSignedTxResponse, error)
- func (a *WalletAdaptor) CreateAccountTx(req *wallet2.CreateAccountTxRequest) (*wallet2.CreateAccountTxResponse, error)
- func (a *WalletAdaptor) CreateUtxoSignedTx(req *wallet2.CreateUtxoSignedTxRequest) (*wallet2.CreateSignedTxResponse, error)
- func (a *WalletAdaptor) CreateUtxoTx(req *wallet2.CreateUtxoTxRequest) (*wallet2.CreateUtxoTxResponse, error)
- func (a *WalletAdaptor) GetAccount(req *wallet2.AccountRequest) (*wallet2.AccountResponse, error)
- func (a *WalletAdaptor) GetAccountTxFromData(req *wallet2.TxFromDataRequest) (*wallet2.AccountTxResponse, error)
- func (a *WalletAdaptor) GetAccountTxFromSignedData(req *wallet2.TxFromSignedDataRequest) (*wallet2.AccountTxResponse, error)
- func (a *WalletAdaptor) GetBalance(req *wallet2.BalanceRequest) (*wallet2.BalanceResponse, error)
- func (a *WalletAdaptor) GetMinRent(req *wallet2.MinRentRequest) (*wallet2.MinRentResponse, error)
- func (wa *WalletAdaptor) GetNonce(req *wallet2.NonceRequest) (*wallet2.NonceResponse, error)
- func (a *WalletAdaptor) GetTxByAddress(req *wallet2.TxAddressRequest) (*wallet2.TxAddressResponse, error)
- func (a *WalletAdaptor) GetTxByHash(req *wallet2.TxHashRequest) (*wallet2.TxHashResponse, error)
- func (a *WalletAdaptor) GetUtxo(req *wallet2.UtxoRequest) (*wallet2.UtxoResponse, error)
- func (a *WalletAdaptor) GetUtxoInsFromData(req *wallet2.UtxoInsFromDataRequest) (*wallet2.UtxoInsResponse, error)
- func (a *WalletAdaptor) GetUtxoTxFromData(req *wallet2.TxFromDataRequest) (*wallet2.UtxoTxResponse, error)
- func (a *WalletAdaptor) GetUtxoTxFromSignedData(req *wallet2.TxFromSignedDataRequest) (*wallet2.UtxoTxResponse, error)
- func (wa WalletAdaptor) SendTx(req *wallet2.SendTxRequest) (*wallet2.SendTxResponse, error)
- func (a *WalletAdaptor) ValidAddress(req *wallet2.ValidAddressRequest) (*wallet2.ValidAddressResponse, error)
- func (a *WalletAdaptor) VerifyAccountSignedTx(req *wallet2.VerifySignedTxRequest) (*wallet2.VerifySignedTxResponse, error)
- func (a *WalletAdaptor) VerifyUtxoSignedTx(req *wallet2.VerifySignedTxRequest) (*wallet2.VerifySignedTxResponse, error)
Constants ¶
View Source
const ( ChainName = "trx" TronSymbol = "trx" MaxTimeUntillExpiration = 24*60*60*1000 - 120000 //23hour58min, MaxTimeUntillExpiration is 24 hours in Tron )
View Source
const ( ChainIDMain = 0x41 //ChainIDTest = 0xa0 ChainIDTest = 0x41 )
View Source
const TrxDecimals = 6
Variables ¶
This section is empty.
Functions ¶
func NewLocalWalletAdaptor ¶
func NewLocalWalletAdaptor(network config.NetWorkType) wallet.WalletAdaptor
func NewWalletAdaptor ¶
func NewWalletAdaptor(conf *config.Config) (wallet.WalletAdaptor, error)
Types ¶
type WalletAdaptor ¶
type WalletAdaptor struct { fallback.WalletAdaptor // contains filtered or unexported fields }
func (*WalletAdaptor) ConvertAddress ¶
func (a *WalletAdaptor) ConvertAddress(req *wallet2.ConvertAddressRequest) (*wallet2.ConvertAddressResponse, error)
func (*WalletAdaptor) CreateAccountSignedTx ¶
func (a *WalletAdaptor) CreateAccountSignedTx(req *wallet2.CreateAccountSignedTxRequest) (*wallet2.CreateSignedTxResponse, error)
func (*WalletAdaptor) CreateAccountTx ¶
func (a *WalletAdaptor) CreateAccountTx(req *wallet2.CreateAccountTxRequest) (*wallet2.CreateAccountTxResponse, error)
func (*WalletAdaptor) CreateUtxoSignedTx ¶
func (a *WalletAdaptor) CreateUtxoSignedTx(req *wallet2.CreateUtxoSignedTxRequest) (*wallet2.CreateSignedTxResponse, error)
func (*WalletAdaptor) CreateUtxoTx ¶
func (a *WalletAdaptor) CreateUtxoTx(req *wallet2.CreateUtxoTxRequest) (*wallet2.CreateUtxoTxResponse, error)
func (*WalletAdaptor) GetAccount ¶
func (a *WalletAdaptor) GetAccount(req *wallet2.AccountRequest) (*wallet2.AccountResponse, error)
func (*WalletAdaptor) GetAccountTxFromData ¶
func (a *WalletAdaptor) GetAccountTxFromData(req *wallet2.TxFromDataRequest) (*wallet2.AccountTxResponse, error)
func (*WalletAdaptor) GetAccountTxFromSignedData ¶
func (a *WalletAdaptor) GetAccountTxFromSignedData(req *wallet2.TxFromSignedDataRequest) (*wallet2.AccountTxResponse, error)
func (*WalletAdaptor) GetBalance ¶
func (a *WalletAdaptor) GetBalance(req *wallet2.BalanceRequest) (*wallet2.BalanceResponse, error)
func (*WalletAdaptor) GetMinRent ¶
func (a *WalletAdaptor) GetMinRent(req *wallet2.MinRentRequest) (*wallet2.MinRentResponse, error)
func (*WalletAdaptor) GetNonce ¶
func (wa *WalletAdaptor) GetNonce(req *wallet2.NonceRequest) (*wallet2.NonceResponse, error)
func (*WalletAdaptor) GetTxByAddress ¶
func (a *WalletAdaptor) GetTxByAddress(req *wallet2.TxAddressRequest) (*wallet2.TxAddressResponse, error)
func (*WalletAdaptor) GetTxByHash ¶
func (a *WalletAdaptor) GetTxByHash(req *wallet2.TxHashRequest) (*wallet2.TxHashResponse, error)
func (*WalletAdaptor) GetUtxo ¶
func (a *WalletAdaptor) GetUtxo(req *wallet2.UtxoRequest) (*wallet2.UtxoResponse, error)
func (*WalletAdaptor) GetUtxoInsFromData ¶
func (a *WalletAdaptor) GetUtxoInsFromData(req *wallet2.UtxoInsFromDataRequest) (*wallet2.UtxoInsResponse, error)
func (*WalletAdaptor) GetUtxoTxFromData ¶
func (a *WalletAdaptor) GetUtxoTxFromData(req *wallet2.TxFromDataRequest) (*wallet2.UtxoTxResponse, error)
func (*WalletAdaptor) GetUtxoTxFromSignedData ¶
func (a *WalletAdaptor) GetUtxoTxFromSignedData(req *wallet2.TxFromSignedDataRequest) (*wallet2.UtxoTxResponse, error)
func (WalletAdaptor) SendTx ¶
func (wa WalletAdaptor) SendTx(req *wallet2.SendTxRequest) (*wallet2.SendTxResponse, error)
func (*WalletAdaptor) ValidAddress ¶
func (a *WalletAdaptor) ValidAddress(req *wallet2.ValidAddressRequest) (*wallet2.ValidAddressResponse, error)
func (*WalletAdaptor) VerifyAccountSignedTx ¶
func (a *WalletAdaptor) VerifyAccountSignedTx(req *wallet2.VerifySignedTxRequest) (*wallet2.VerifySignedTxResponse, error)
func (*WalletAdaptor) VerifyUtxoSignedTx ¶
func (a *WalletAdaptor) VerifyUtxoSignedTx(req *wallet2.VerifySignedTxRequest) (*wallet2.VerifySignedTxResponse, error)
Click to show internal directories.
Click to hide internal directories.