Documentation ¶
Index ¶
- type Chainnode
- func (ch *Chainnode) BroadcastTransaction(chain, symbol string, signedTxData []byte) (transactionHash string, err error)
- func (ch *Chainnode) ConvertAddress(chain string, publicKey []byte) (string, error)
- func (ch *Chainnode) CreateAccountSignedTransaction(chain, symbol string, raw []byte, signatures, pubKeys []byte) ([]byte, []byte, error)
- func (ch *Chainnode) CreateAccountTransaction(chain, symbol, contractAddress string, ...) ([]byte, []byte, error)
- func (ch *Chainnode) CreateUtxoSignedTransaction(chain, symbol string, raw []byte, signatures, pubKeys [][]byte) ([]byte, []byte, error)
- func (ch *Chainnode) CreateUtxoTransaction(chain, symbol string, transaction *chainnode.ExtUtxoTransaction) (transactionData []byte, signHashs [][]byte, err error)
- func (ch *Chainnode) Init(network string) error
- func (ch *Chainnode) QueryAccountTransaction(chain, symbol, hash string, asynMode bool) (*chainnode.ExtAccountTransaction, error)
- func (ch *Chainnode) QueryAccountTransactionFromData(chain, symbol string, rawData []byte) (*chainnode.ExtAccountTransaction, []byte, error)
- func (ch *Chainnode) QueryAccountTransactionFromSignedData(chain, symbol string, signedTxData []byte) (*chainnode.ExtAccountTransaction, error)
- func (ch *Chainnode) QueryBalance(chain, symbol, address, contractAddress string, blockHeight uint64) (sdk.Int, error)
- func (ch *Chainnode) QueryGasPrice(chain string) (sdk.Int, error)
- func (ch *Chainnode) QueryNonce(chain, address string) (uint64, error)
- func (ch *Chainnode) QueryUtxo(chain, symbol string, vin *sdk.UtxoIn) (bool, error)
- func (ch *Chainnode) QueryUtxoInsFromData(chain, symbol string, data []byte) ([]*sdk.UtxoIn, error)
- func (ch *Chainnode) QueryUtxoTransaction(chain, symbol, hash string, asynMode bool) (*chainnode.ExtUtxoTransaction, error)
- func (ch *Chainnode) QueryUtxoTransactionFromData(chain, symbol string, rawData []byte, vins []*sdk.UtxoIn) (*chainnode.ExtUtxoTransaction, [][]byte, error)
- func (ch *Chainnode) QueryUtxoTransactionFromSignedData(chain, symbol string, signedTxData []byte, vins []*sdk.UtxoIn) (*chainnode.ExtUtxoTransaction, error)
- func (ch *Chainnode) SupportChain(chain string) bool
- func (ch *Chainnode) ValidAddress(chain, symbol, address string) (bool, string)
- func (ch *Chainnode) VerifyAccountSignedTransaction(chain, symbol string, address string, signedTxData []byte) (bool, error)
- func (ch *Chainnode) VerifyUtxoSignedTransaction(chain, symbol string, addresses []string, signedTxData []byte, ...) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chainnode ¶
type Chainnode struct {
// contains filtered or unexported fields
}
Chainnode implements chainnode.Chainnode
func (*Chainnode) BroadcastTransaction ¶
func (ch *Chainnode) BroadcastTransaction(chain, symbol string, signedTxData []byte) ( transactionHash string, err error)
BroadcastTransaction broadcasts the signedTransaction
func (*Chainnode) ConvertAddress ¶
ConvertAddress converts publicKey to address
func (*Chainnode) CreateAccountSignedTransaction ¶
func (*Chainnode) CreateAccountTransaction ¶
func (ch *Chainnode) CreateAccountTransaction(chain, symbol, contractAddress string, transaction *chainnode.ExtAccountTransaction) ( []byte, []byte, error)
CreateTransaction for a transaction,
func (*Chainnode) CreateUtxoSignedTransaction ¶
func (ch *Chainnode) CreateUtxoSignedTransaction(chain, symbol string, raw []byte, signatures, pubKeys [][]byte) ( []byte, []byte, error)
CreateSignedTransaction for a transaction with signature, pubkey is only for BTC, signatures for multi-Vin in BTC
func (*Chainnode) CreateUtxoTransaction ¶
func (ch *Chainnode) CreateUtxoTransaction(chain, symbol string, transaction *chainnode.ExtUtxoTransaction) ( transactionData []byte, signHashs [][]byte, err error)
CreateTransaction for a transaction,
func (*Chainnode) QueryAccountTransaction ¶
func (*Chainnode) QueryAccountTransactionFromData ¶
func (ch *Chainnode) QueryAccountTransactionFromData(chain, symbol string, rawData []byte) (*chainnode.ExtAccountTransaction, []byte, error)
QueryAccountTransactionFromData for an address and a signed transaction bytes
func (*Chainnode) QueryAccountTransactionFromSignedData ¶
func (ch *Chainnode) QueryAccountTransactionFromSignedData(chain, symbol string, signedTxData []byte) (*chainnode.ExtAccountTransaction, error)
QueryAccountTransactionFromSignedData for an address and a signed transaction bytes
func (*Chainnode) QueryBalance ¶
func (*Chainnode) QueryNonce ¶
func (*Chainnode) QueryUtxoInsFromData ¶
VerifySignedTransaction for an address and a signed transaction bytes
func (*Chainnode) QueryUtxoTransaction ¶
func (*Chainnode) QueryUtxoTransactionFromData ¶
func (ch *Chainnode) QueryUtxoTransactionFromData(chain, symbol string, rawData []byte, vins []*sdk.UtxoIn) (*chainnode.ExtUtxoTransaction, [][]byte, error)
VerifySignedTransaction for an address and a signed transaction bytes
func (*Chainnode) QueryUtxoTransactionFromSignedData ¶
func (ch *Chainnode) QueryUtxoTransactionFromSignedData(chain, symbol string, signedTxData []byte, vins []*sdk.UtxoIn) (*chainnode.ExtUtxoTransaction, error)
QueryUtxoTransactionFromSignedData for an address and a signed transaction bytes
func (*Chainnode) SupportChain ¶
SupportAsset checks if a symbol is supported
func (*Chainnode) ValidAddress ¶
IsValidAddress checks the validity of an address and to be withdrawed to