Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitcoinTransaction ¶
type BitcoinTransaction struct { Network string From []TxInput To []TxOutput // Fee int64 // ChangeAddr string PrivateKey string }
BitcoinTransaction *Important* make sure to properly calculate the difference between INs and OUTs since it will be automatically payed as a Fee. In the future we may include UTXO and Fee calculation into the service.
type EthereumTransaction ¶
type SendBTCResult ¶
type SendETHResult ¶
type UbiquityTransactionService ¶
type UbiquityTransactionService struct {
// contains filtered or unexported fields
}
UbiquityTransactionService provides API to send various protocol transactions. So far it supports BTC and ETH.
func NewService ¶
func NewService(txAPI ubiquity.TransactionsAPI) *UbiquityTransactionService
func (UbiquityTransactionService) SendBTC ¶
func (s UbiquityTransactionService) SendBTC(ctx context.Context, tx *BitcoinTransaction) (*SendBTCResult, error)
SendBTC creates, signs and sends BTC transaction. Under the hood it uses Ubiquity TxSend API.
func (UbiquityTransactionService) SendETH ¶
func (s UbiquityTransactionService) SendETH(ctx context.Context, tx *EthereumTransaction) (*SendETHResult, error)
SendETH creates, signs and sends ETH transaction. Under the hood it uses Ubiquity TxSend API.
Click to show internal directories.
Click to hide internal directories.