Documentation
¶
Index ¶
- Constants
- Variables
- func AddressToBytes(addr string) []byte
- func GetAddressByPrivateKey(privateKeyHex string, chainId string) (string, error)
- func GetAddressByPublicKey(publicKeyHex string, chainId string) (string, error)
- func GetPublicKey(privateKeyHex string) (string, error)
- func NewPrivateKey() string
- func SignedTx(message *Message, signHex string) (string, error)
- type BigInt
- type Message
- type Signature
- type SignedMessage
Constants ¶
View Source
const ( MainnetPrefix = "f" TestnetPrefix = "t" )
View Source
const ( ID byte = iota SECP256K1 Actor BLS )
Variables ¶
View Source
var (
AddressEncoding = base32.NewEncoding(encodeStd)
)
Functions ¶
func AddressToBytes ¶
func GetAddressByPrivateKey ¶
func GetAddressByPublicKey ¶
func GetPublicKey ¶
func NewPrivateKey ¶
func NewPrivateKey() string
Types ¶
type BigInt ¶
func (BigInt) MarshalJSON ¶
type Message ¶
type Message struct {
Version uint64 `json:"Version"`
To string `json:"To"`
From string `json:"From"`
Nonce uint64 `json:"Nonce"`
Value *BigInt `json:"Value"`
GasLimit int64 `json:"GasLimit"`
GasFeeCap *BigInt `json:"GasFeeCap"`
GasPremium *BigInt `json:"GasPremium"`
Method uint64 `json:"Method"`
Params []byte `json:"Params"`
}
type SignedMessage ¶
Click to show internal directories.
Click to hide internal directories.