offchain

package
v0.0.0-...-e701cd2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2021 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BroadcastOffchain

func BroadcastOffchain(data request.BroadcastWithdrawal) (*common.TxHash, error)

*

func CancelWithdrawalOffchain

func CancelWithdrawalOffchain(id string, revert bool) (string, error)

*

func StoreWithdrawalOffchain

func StoreWithdrawalOffchain(data request.CreateWithdrawal) *offchain.WithdrawalResponse

*

Types

type BcashOffchain

type BcashOffchain struct {
}

func (*BcashOffchain) PrepareBitcoinCashSignedOffchainTransaction

func (bc *BcashOffchain) PrepareBitcoinCashSignedOffchainTransaction(testnet bool, data []offchain.WithdrawalResponseData,
	amount string, address string, mnemonic string, keyPair []request.KeyPair,
	changeAddress string, multipleAmounts []string) (string, error)

*

  • Sign Bitcoin Cash transaction with private keys locally. Nothing is broadcast to the blockchain.
  • @param testnet mainnet or testnet version
  • @param data data from Tatum system to prepare transaction from
  • @param amount amount to send
  • @param address recipient address, if multiple recipients are present, it should be string separated by ','
  • @param mnemonic mnemonic to sign transaction from. mnemonic or keyPair must be present
  • @param keyPair keyPair to sign transaction from. keyPair or mnemonic must be present
  • @param changeAddress address to send the rest of the unused coins
  • @param multipleAmounts if multiple recipients are present in the address separated by ',', this should be list of amounts to send
  • @returns transaction data to be broadcast to blockchain.

func (*BcashOffchain) SendBitcoinCashOffchainTransaction

func (bc *BcashOffchain) SendBitcoinCashOffchainTransaction(testnet bool, body request.TransferBtcBasedOffchain) (*offchain.BroadcastResult, error)

*

  • Send Bitcoin Cash transaction from Tatum Ledger account to the blockchain. This method broadcasts signed transaction to the blockchain.
  • This operation is irreversible.
  • @param testnet mainnet or testnet version
  • @param body content of the transaction to broadcast
  • @returns transaction id of the transaction in the blockchain or id of the withdrawal, if it was not cancelled automatically

type BitcoinOffchain

type BitcoinOffchain struct {
}

func (*BitcoinOffchain) PrepareBitcoinSignedOffchainTransaction

func (b *BitcoinOffchain) PrepareBitcoinSignedOffchainTransaction(testnet bool, data []offchain.WithdrawalResponseData,
	amount string, address string, mnemonic string, keyPair []request.KeyPair,
	changeAddress string, multipleAmounts []string) (string, error)

*

  • Sign Bitcoin transaction with private keys locally. Nothing is broadcast to the blockchain.
  • @param testnet mainnet or testnet version
  • @param data data from Tatum system to prepare transaction from
  • @param amount amount to send
  • @param address recipient address, if multiple recipients are present, it should be string separated by ','
  • @param mnemonic mnemonic to sign transaction from. mnemonic or keyPair must be present
  • @param keyPair keyPair to sign transaction from. keyPair or mnemonic must be present
  • @param changeAddress address to send the rest of the unused coins
  • @param multipleAmounts if multiple recipients are present in the address separated by ',', this should be list of amounts to send
  • @returns transaction data to be broadcast to blockchain.

func (*BitcoinOffchain) SendBitcoinOffchainTransaction

func (b *BitcoinOffchain) SendBitcoinOffchainTransaction(testnet bool, body request.TransferBtcBasedOffchain) (*offchain.BroadcastResult, error)

*

  • Send Bitcoin transaction from Tatum Ledger account to the blockchain. This method broadcasts signed transaction to the blockchain.
  • This operation is irreversible. *
  • @param testnet mainnet or testnet version
  • @param body content of the transaction to broadcast
  • @return the broadcast result
  • @throws Exception the exception
  • @returns transaction id of the transaction in the blockchain

type EthereumOffchain

type EthereumOffchain struct {
}

func (*EthereumOffchain) PrepareEthErc20SignedOffchainTransaction

func (e *EthereumOffchain) PrepareEthErc20SignedOffchainTransaction(testnet bool, amount string, privateKey string, address string,
	client *ethclient.Client, tokenAddress string, gasPrice string, nonce uint64) (string, uint64, error)

func (*EthereumOffchain) PrepareEthSignedOffchainTransaction

func (e *EthereumOffchain) PrepareEthSignedOffchainTransaction(testnet bool, amount string, privateKey string, address string,
	currency string, client *ethclient.Client, gasPrice string, nonce uint64) (string, uint64, error)

*

  • Sign Ethereum transaction with private keys locally. Nothing is broadcast to the blockchain.
  • @param amount amount to send
  • @param privateKey private key to sign transaction and send funds from
  • @param address recipient address
  • @param currency Ethereum or supported ERC20
  • @param web3 instance of the web3 client
  • @param gasPrice gas price of the blockchain fee
  • @param nonce nonce of the transaction. this is counter of the transactions from given address. should be + 1 from previous one.
  • @returns transaction data to be broadcast to blockchain.

func (*EthereumOffchain) SendEthErc20OffchainTransaction

func (e *EthereumOffchain) SendEthErc20OffchainTransaction(testnet bool, body request.TransferEthErc20Offchain, provider string) (*offchain.BroadcastResult, error)

*

  • Send Ethereum ERC20 transaction from Tatum Ledger account to the blockchain. This method broadcasts signed transaction to the blockchain.
  • This operation is irreversible.
  • @param testnet mainnet or testnet version
  • @param body content of the transaction to broadcast
  • @param provider url of the Ethereum Server to connect to. If not set, default public server will be used.
  • @returns transaction id of the transaction in the blockchain or id of the withdrawal, if it was not cancelled automatically

func (*EthereumOffchain) SendEthOffchainTransaction

func (e *EthereumOffchain) SendEthOffchainTransaction(testnet bool, body request.TransferEthErc20Offchain, provider string) (*offchain.BroadcastResult, error)

*

  • Send Ethereum transaction from Tatum Ledger account to the blockchain. This method broadcasts signed transaction to the blockchain.
  • This operation is irreversible.
  • @param testnet mainnet or testnet version
  • @param body content of the transaction to broadcast
  • @param provider url of the Ethereum Server to connect to. If not set, default public server will be used.
  • @returns transaction id of the transaction in the blockchain or id of the withdrawal, if it was not cancelled automatically

type LitecoinOffchain

type LitecoinOffchain struct {
}

func (*LitecoinOffchain) PrepareLitecoinSignedOffchainTransaction

func (l *LitecoinOffchain) PrepareLitecoinSignedOffchainTransaction(testnet bool, data []offchain.WithdrawalResponseData,
	amount string, address string, mnemonic string, keyPair []request.KeyPair,
	changeAddress string, multipleAmounts []string) (string, error)

*

  • Sign Litecoin transaction with private keys locally. Nothing is broadcast to the blockchain.
  • @param testnet mainnet or testnet version
  • @param data data from Tatum system to prepare transaction from
  • @param amount amount to send
  • @param address recipient address, if multiple recipients are present, it should be string separated by ','
  • @param mnemonic mnemonic to sign transaction from. mnemonic or keyPair must be present
  • @param keyPair keyPair to sign transaction from. keyPair or mnemonic must be present
  • @param changeAddress address to send the rest of the unused coins
  • @param multipleAmounts if multiple recipients are present in the address separated by ',', this should be list of amounts to send
  • @returns transaction data to be broadcast to blockchain.

func (*LitecoinOffchain) SendLitecoinOffchainTransaction

func (l *LitecoinOffchain) SendLitecoinOffchainTransaction(testnet bool, body request.TransferBtcBasedOffchain) (*offchain.BroadcastResult, error)

*

  • Send Litecoin transaction from Tatum Ledger account to the blockchain. This method broadcasts signed transaction to the blockchain.
  • This operation is irreversible.
  • @param testnet mainnet or testnet version
  • @param body content of the transaction to broadcast
  • @returns transaction id of the transaction in the blockchain or id of the withdrawal, if it was not cancelled automatically

Jump to

Keyboard shortcuts

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