Documentation ¶
Index ¶
Constants ¶
View Source
const ( BitcoinFromTypeBtc = 0 BitcoinFromTypeEvm = 1 )
View Source
const ( BitcoinToTypeNormal = 0 BitcoinToTypeNullData = 1 )
View Source
const ( ServerContextKey = serverContext("server.context") DBContextKey = serverContext("db.context") ListenAddressContextKey = serverContext("listenaddress.context") HTTPConfigContextKey = serverContext("http.context") AuditDBContextKey = serverContext("audit.db.context") )
ServerContextKey defines the context key used to retrieve a server.Context from a command's Context.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BITCOINBridge ¶
type BITCOINBridge interface { // Deposit transfers amout to address Deposit(string, BitcoinFrom, int64, *types.Transaction, uint64, bool) (*types.Transaction, []byte, string, string, error) // Transfer amount to address Transfer(BitcoinFrom, int64, *types.Transaction, uint64, bool) (*types.Transaction, string, error) // WaitMined wait mined WaitMined(context.Context, *types.Transaction, []byte) (*types.Receipt, error) // TransactionReceipt TransactionReceipt(hash string) (*types.Receipt, error) // TransactionByHash TransactionByHash(hash string) (*types.Transaction, bool, error) // EnableEoaTransfer EnableEoaTransfer() bool FromAddress() string }
BITCOINBridge defines the interface of custom bitcoin bridge.
type BITCOINTxIndexer ¶
type BITCOINTxIndexer interface { // ParseBlock parse bitcoin block tx ParseBlock(int64, int64) ([]*BitcoinTxParseResult, *wire.BlockHeader, error) // LatestBlock get latest block height in the longest block chain. LatestBlock() (int64, error) // CheckConfirmations get tx detail info CheckConfirmations(txHash string) error }
BITCOINTxIndexer defines the interface of custom bitcoin tx indexer.
type BitcoinFrom ¶
type BitcoinTxParseResult ¶
type BitcoinTxParseResult struct { // from is l2 user address, by parse bitcoin get the address From []BitcoinFrom // to is listening address To string // value is from transfer amount Value int64 // tx_id is the btc transaction id TxID string // tx_type is the type of the transaction, eg. "brc20_transfer","transfer" TxType string // index is the index of the transaction in the block Index int64 // tos tx all to info Tos []BitcoinTo }
Click to show internal directories.
Click to hide internal directories.