erdgo

package module
v0.0.0-...-f23e49c Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: GPL-3.0 Imports: 24 Imported by: 0

README

Elrond SDK for GO

Elrond SDK for GO

Dependencies

github.com/btcsuite/btcutil/bech32
github.com/tyler-smith/go-bip39

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateNewMnemonic

func GenerateNewMnemonic() (string, error)

GenerateNewMnemonic generates a new set of 24 words to be used as seed phrase

func GetAddressFromPrivateKey

func GetAddressFromPrivateKey(privateKeyBytes []byte) (string, error)

GetAddressFromPrivateKey generates the bech32 address from a private key

func GetPrivateKeyFromMnemonic

func GetPrivateKeyFromMnemonic(mnemonic string, account, addressIndex uint8) []byte

GetPrivateKeyFromMnemonic generates a private key based on mnemonic, account and address index

func LoadPrivateKeyFromJsonFile

func LoadPrivateKeyFromJsonFile(filename string, password string) ([]byte, error)

LoadPrivateKeyFromJsonFile loads a password encrypted private key from a .json file

func LoadPrivateKeyFromPemFile

func LoadPrivateKeyFromPemFile(filename string) ([]byte, error)

LoadPrivateKeyFromPemFile loads a private key from a .pem file

func SavePrivateKeyToJsonFile

func SavePrivateKeyToJsonFile(privateKey []byte, password string, filename string) error

SavePrivateKeyToJsonFile saves a password encrypted private key to a .json file

func SavePrivateKeyToPemFile

func SavePrivateKeyToPemFile(privateKey []byte, filename string) error

SavePrivateKeyToPemFile saves the private key in a .pem file

func SignTransaction

func SignTransaction(tx *data.Transaction, privateKey []byte) error

SignTransaction signs a transaction with the provided private key

func SignTransactionHash

func SignTransactionHash(tx *data.Transaction, privateKey []byte) error

SignTransactionHash signs a transaction with the provided private key Also known as "version 2" transactions, their signatures are computed upon the sha256 hash of the marshalized transaction instead of the plain marshalized transaction

Types

This section is empty.

Jump to

Keyboard shortcuts

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