Documentation ¶
Index ¶
- Constants
- Variables
- func FromMnemonicSeedAndPassphrase(mnemonic, passphrase string, index int) (*btcec.PrivateKey, *btcec.PublicKey)
- type ContractInfo
- type RawData
- type RawTransaction
- type SignedTransaction
- type Trc20
- func (client *Trc20) Base58ToHex(address string) string
- func (client *Trc20) GenerateWallet() (provider.Wallet, error)
- func (client *Trc20) GetTRC20Balance(address string, name string) (decimal.Decimal, error)
- func (client *Trc20) GetTRC20BalanceWithTronGrid(address string, name string) (decimal.Decimal, error)
- func (client *Trc20) GetTRXBalance(address string) (decimal.Decimal, error)
- func (client *Trc20) GetTRXBalanceWithTronGrid(address string) (decimal.Decimal, error)
- func (client *Trc20) SendTRC20(wallet provider.Wallet, toAddress string, amount decimal.Decimal, name string) (string, error)
- func (client *Trc20) SendTRX(wallet provider.Wallet, to string, amount decimal.Decimal) (string, error)
Constants ¶
View Source
const (
BalanceFuncSelector string = "70a08231"
)
Variables ¶
View Source
var ( Contracts = map[string]ContractInfo{ "usdt": { Address: "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t", Fee: decimal.NewFromInt(28), }, } )
Functions ¶
Types ¶
type ContractInfo ¶
type RawData ¶
type RawData struct { Contract []struct { Parameter struct { Value struct { Data string `json:"data"` Amount int `json:"amount"` OwnerAddress string `json:"owner_address"` ContractAddress string `json:"contract_address"` ToAddress string `json:"to_address"` } `json:"value"` TypeURL string `json:"type_url"` } `json:"parameter"` Type string `json:"type"` } `json:"contract"` RefBlockBytes string `json:"ref_block_bytes"` RefBlockHash string `json:"ref_block_hash"` Expiration int64 `json:"expiration"` Timestamp int64 `json:"timestamp"` FeeLimit int64 `json:"fee_limit"` }
type RawTransaction ¶
type SignedTransaction ¶
type Trc20 ¶
type Trc20 struct { FullNodeUrl string SolidityNodeURL string RestFullNodeUrl string RestSolidityNodeURL string TronGridNodeurl string TronGridApiKey string Denomination decimal.Decimal TRC20Denomination decimal.Decimal // contains filtered or unexported fields }
func (*Trc20) Base58ToHex ¶
func (*Trc20) GetTRC20Balance ¶
func (*Trc20) GetTRC20BalanceWithTronGrid ¶
func (*Trc20) GetTRXBalance ¶
func (*Trc20) GetTRXBalanceWithTronGrid ¶
Click to show internal directories.
Click to hide internal directories.