Documentation ¶
Index ¶
- func GetAdapter(coinType uint16, seed []byte, derivationPath string) (baseadapter.IBlockchainAdapter, error)
- type BitcoinAdapter
- type BitsharesAdapter
- func (e *BitsharesAdapter) CreateSignedTransaction(payload string, backendLogger log.Logger) (string, error)
- func (e *BitsharesAdapter) DeriveAddress(logger log.Logger) (string, error)
- func (e *BitsharesAdapter) DerivePrivateKey(backendLogger log.Logger) (string, error)
- func (e *BitsharesAdapter) DerivePublicKey(logger log.Logger) (string, error)
- func (e *BitsharesAdapter) GetBlockchainNetwork() string
- type EthereumAdapter
- func (e *EthereumAdapter) CreateSignature(payload string, backendLogger log.Logger) (string, error)
- func (e *EthereumAdapter) CreateSignedTransaction(payload string, backendLogger log.Logger) (string, error)
- func (e *EthereumAdapter) DeriveAddress(logger log.Logger) (string, error)
- func (e *EthereumAdapter) DerivePrivateKey(backendLogger log.Logger) (string, error)
- func (e *EthereumAdapter) DerivePublicKey(logger log.Logger) (string, error)
- func (e *EthereumAdapter) GetBlockchainNetwork() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAdapter ¶
func GetAdapter(coinType uint16, seed []byte, derivationPath string) (baseadapter.IBlockchainAdapter, error)
GetAdapter returns suitable adapter depending on coin type
Types ¶
type BitcoinAdapter ¶
type BitcoinAdapter struct {
baseadapter.BitcoinBaseAdapter
}
func NewBitcoinAdapter ¶
func NewBitcoinAdapter(seed []byte, derivationPath string, isDev bool) *BitcoinAdapter
type BitsharesAdapter ¶
type BitsharesAdapter struct { // contains filtered or unexported fields }
BitsharesAdapter - Ethereum blockchain transaction adapter
func NewBitsharesAdapter ¶
func NewBitsharesAdapter(seed []byte, derivationPath string, isDev bool) *BitsharesAdapter
NewBitsharesAdapter constructor function for BitsharesAdapter sets seed, derivation path as internal data
func (*BitsharesAdapter) CreateSignedTransaction ¶
func (e *BitsharesAdapter) CreateSignedTransaction(payload string, backendLogger log.Logger) (string, error)
CreateSignedTransaction creates and signs raw transaction from transaction digest + private key
func (*BitsharesAdapter) DeriveAddress ¶
func (e *BitsharesAdapter) DeriveAddress(logger log.Logger) (string, error)
DeriveAddress Address in Bitsahres can be avoided for most cases by using account names instead. However it is needed for "nathan"
func (*BitsharesAdapter) DerivePrivateKey ¶
func (e *BitsharesAdapter) DerivePrivateKey(backendLogger log.Logger) (string, error)
DerivePrivateKey Derives Private Key from mnemonic coressponding to a hard coded derivation path i.e "m/44'/69'/69'/69/69" for bitshares, to obtain private key and checks for errors.
func (*BitsharesAdapter) DerivePublicKey ¶
func (e *BitsharesAdapter) DerivePublicKey(logger log.Logger) (string, error)
DerivePublicKey returns the public key for BTS format.
func (*BitsharesAdapter) GetBlockchainNetwork ¶
func (e *BitsharesAdapter) GetBlockchainNetwork() string
GetBlockchainNetwork returns network config. Default isDev=false i.e. Mainnet for Bitshares as it is not needed for BTS.
type EthereumAdapter ¶
type EthereumAdapter struct { baseadapter.BlockchainAdapter // contains filtered or unexported fields }
EthereumAdapter - Ethereum blockchain transaction adapter
func NewEthereumAdapter ¶
func NewEthereumAdapter(seed []byte, derivationPath string, isDev bool) *EthereumAdapter
NewEthereumAdapter constructor function for EthereumAdapter sets seed, derivation path as internal data
func (*EthereumAdapter) CreateSignature ¶
CreateSignature creates and signs hex message from payload data + private key
func (*EthereumAdapter) CreateSignedTransaction ¶
func (e *EthereumAdapter) CreateSignedTransaction(payload string, backendLogger log.Logger) (string, error)
CreateSignedTransaction creates and signs raw transaction from payload data + private key
func (*EthereumAdapter) DeriveAddress ¶
func (e *EthereumAdapter) DeriveAddress(logger log.Logger) (string, error)
func (*EthereumAdapter) DerivePrivateKey ¶
func (e *EthereumAdapter) DerivePrivateKey(backendLogger log.Logger) (string, error)
DerivePrivateKey Derives derivation path to obtain private key checks for errors
func (*EthereumAdapter) DerivePublicKey ¶
func (e *EthereumAdapter) DerivePublicKey(logger log.Logger) (string, error)
func (*EthereumAdapter) GetBlockchainNetwork ¶
func (e *EthereumAdapter) GetBlockchainNetwork() string
GetBlockchainNetwork returns network config default isDev=false i.e. Mainnet