Documentation ¶
Index ¶
- func SignPolkadotTransaction(seedPhrase, rawTx, rawSigningPayload string, network PolkadotNetwork) (string, error)
- func SignSolanaTransaction(unsignedRawTx string, privateKey solana.PrivateKey) (signedRawTx string, err error)
- type BitcoinTransaction
- type EthereumTransaction
- type PolkadotNetwork
- type PolkadotTransaction
- type SendTxResult
- type SolanaTransaction
- type TxInput
- type TxOutput
- type UbiquityTransactionService
- func (s UbiquityTransactionService) SendBTC(ctx context.Context, tx *BitcoinTransaction) (*SendTxResult, error)
- func (s UbiquityTransactionService) SendDOT(ctx context.Context, tx *PolkadotTransaction) (*SendTxResult, error)
- func (s UbiquityTransactionService) SendETH(ctx context.Context, tx *EthereumTransaction) (*SendTxResult, error)
- func (s UbiquityTransactionService) SendSOL(ctx context.Context, tx *SolanaTransaction) (*SendTxResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SignPolkadotTransaction ¶ added in v1.3.0
func SignPolkadotTransaction(seedPhrase, rawTx, rawSigningPayload string, network PolkadotNetwork) (string, error)
func SignSolanaTransaction ¶ added in v1.4.0
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 PolkadotNetwork ¶ added in v1.3.0
type PolkadotNetwork uint8
const ( PolkadotMainnet PolkadotNetwork = 0 PolkadotWestend PolkadotNetwork = 42 )
type PolkadotTransaction ¶ added in v1.3.0
type SendTxResult ¶ added in v1.3.0
type SolanaTransaction ¶ added in v1.4.0
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, feesAPI ubiquity.GasEstimatorAPI) *UbiquityTransactionService
func (UbiquityTransactionService) SendBTC ¶
func (s UbiquityTransactionService) SendBTC(ctx context.Context, tx *BitcoinTransaction) (*SendTxResult, error)
SendBTC creates, signs and sends BTC transaction. Under the hood it uses Ubiquity TxSend API.
func (UbiquityTransactionService) SendDOT ¶ added in v1.3.0
func (s UbiquityTransactionService) SendDOT(ctx context.Context, tx *PolkadotTransaction) (*SendTxResult, error)
SendDOT creates, signs and sends DOT transaction. Under the hood it uses Ubiquity TxCreate and TxSend API.
func (UbiquityTransactionService) SendETH ¶
func (s UbiquityTransactionService) SendETH(ctx context.Context, tx *EthereumTransaction) (*SendTxResult, error)
SendETH creates, signs and sends ETH transaction. Under the hood it uses Ubiquity TxSend API.
func (UbiquityTransactionService) SendSOL ¶ added in v1.4.0
func (s UbiquityTransactionService) SendSOL(ctx context.Context, tx *SolanaTransaction) (*SendTxResult, error)
SendSOL creates, signs and sends SOL transaction. Under the hood it uses Ubiquity TxCreate and TxSend API.