Documentation
¶
Index ¶
- func NewAccountFromMnemonic(mnemonic, path string) (chain.AccountHandler, error)
- func NewAccountFromPrivateKey(privateKey []byte) (chain.AccountHandler, error)
- func NewAccountFromPrivateKeyHex(privateKey string) (chain.AccountHandler, error)
- func PackPayloadForESDT(assetsID, amount string) (string, error)
- func PublicKey2Address(publicKey []byte) string
- func ValidAddress(address string) bool
- type Account
- func (a *Account) Address() string
- func (a *Account) PrivateKey() []byte
- func (a *Account) PrivateKeyHex() string
- func (a *Account) PublicKey() []byte
- func (a *Account) PublicKeyHex() string
- func (a *Account) SignData(data []byte) ([]byte, error)
- func (a *Account) VerifySignData(data, sig []byte) bool
- type Ingredient
- type NetWorkConfig
- type TxBuilder
- func (tx *TxBuilder) Build() error
- func (tx *TxBuilder) ConcatSignature(signature string, isDerFormat bool) (string, error)
- func (tx *TxBuilder) GetSigHash() []string
- func (tx *TxBuilder) GetTxHash() string
- func (tx *TxBuilder) GetUnsignedHex() string
- func (tx *TxBuilder) SetSigHash(sigHash []string)
- func (tx *TxBuilder) SetUnsignedHex(unsignedHex string)
- func (tx *TxBuilder) Sign(privateKey []byte) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAccountFromMnemonic ¶
func NewAccountFromMnemonic(mnemonic, path string) (chain.AccountHandler, error)
func NewAccountFromPrivateKey ¶
func NewAccountFromPrivateKey(privateKey []byte) (chain.AccountHandler, error)
func NewAccountFromPrivateKeyHex ¶
func NewAccountFromPrivateKeyHex(privateKey string) (chain.AccountHandler, error)
func PackPayloadForESDT ¶
func PublicKey2Address ¶
func ValidAddress ¶
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
func (*Account) PrivateKey ¶
func (*Account) PrivateKeyHex ¶
func (*Account) PublicKeyHex ¶
func (*Account) VerifySignData ¶
type Ingredient ¶
type Ingredient struct {
TxType string `json:"txType" validate:"required,oneof=0 1 2 3 4 5 6"`
ContractAddress string `json:"contractAddress" validate:"required"`
Sender string `json:"sender" validate:"required,egld_addr"`
Recipient string `json:"recipient" validate:"required,egld_addr"`
Amount string `json:"amount" validate:"required,bigint_gt0"`
Nonce string `json:"nonce" validate:"required,bigint_gte0"`
*NetWorkConfig `validate:"required"`
}
type NetWorkConfig ¶
type TxBuilder ¶
type TxBuilder struct {
*Ingredient
// contains filtered or unexported fields
}
func NewTxBuilder ¶
func NewTxBuilder(ti *Ingredient) *TxBuilder
func (*TxBuilder) ConcatSignature ¶
func (*TxBuilder) GetSigHash ¶
func (*TxBuilder) GetUnsignedHex ¶
func (*TxBuilder) SetSigHash ¶
func (*TxBuilder) SetUnsignedHex ¶
Click to show internal directories.
Click to hide internal directories.