account

package
v0.0.0-...-13df118 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2024 License: MIT Imports: 7 Imported by: 2

Documentation

Overview

Package account provides functionality for managing Tron network accounts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account interface {
	Address() address.Address
	tron.Signer
}

type LocalAccount

type LocalAccount struct {
	// contains filtered or unexported fields
}

LocalAccount is a private key address pair. TODO(271): Add more functionality to this.

func FromPrivateKeyHex

func FromPrivateKeyHex(hex string) (*LocalAccount, error)

FromPrivateKeyHex derives an account from a hexadecimal private key string.

func NewLocalAccount

func NewLocalAccount() *LocalAccount

func (*LocalAccount) Address

func (a *LocalAccount) Address() address.Address

Address returns the address of the account.

func (*LocalAccount) PrivateKey

func (a *LocalAccount) PrivateKey() string

func (*LocalAccount) Sign

func (a *LocalAccount) Sign(signable tron.Signable) error

Sign signs a signable object with the account's private key.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL