Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNonFinalBIP68 is returned when a transaction spending a CSV-locked output is not final. ErrNonFinalBIP68 = errors.New("non-final BIP68 sequence") )
Functions ¶
This section is empty.
Types ¶
type BlockTimestamp ¶
type BlockchainScanner ¶
type BlockchainScanner interface { WatchScripts(ctx context.Context, scripts []string) error UnwatchScripts(ctx context.Context, scripts []string) error GetNotificationChannel(ctx context.Context) <-chan map[string][]VtxoWithValue IsTransactionConfirmed(ctx context.Context, txid string) (isConfirmed bool, blocknumber int64, blocktime int64, err error) }
type BoardingInput ¶
type RepoManager ¶
type RepoManager interface { Events() domain.RoundEventRepository Rounds() domain.RoundRepository Vtxos() domain.VtxoRepository Notes() domain.NoteRepository Entities() domain.EntityRepository MarketHourRepo() domain.MarketHourRepo RegisterEventsHandler(func(*domain.Round)) Close() }
type SchedulerService ¶
type SweepInput ¶
type TxBuilder ¶
type TxBuilder interface { // BuildRoundTx builds a round tx for the given offchain and boarding tx // requests. It expects an optional list of connector addresses of expired // rounds from which selecting UTXOs as inputs of the transaction. // Returns the round tx, the VTXO tree, the connector chain and its root // address. BuildRoundTx( serverPubkey *secp256k1.PublicKey, txRequests []domain.TxRequest, boardingInputs []BoardingInput, connectorAddresses []string, musig2Data []*tree.Musig2, ) ( roundTx string, vtxoTree tree.TxTree, connectorAddress string, connectors tree.TxTree, err error, ) // VerifyForfeitTxs verifies a list of forfeit txs against a set of VTXOs and // connectors. VerifyForfeitTxs( vtxos []domain.Vtxo, connectors tree.TxTree, txs []string, connectorIndex map[string]domain.Outpoint, ) (valid map[domain.VtxoKey]string, err error) BuildSweepTx(inputs []SweepInput) (txid string, signedSweepTx string, err error) GetSweepInput(node tree.Node) (vtxoTreeExpiry *common.RelativeLocktime, sweepInput SweepInput, err error) FinalizeAndExtract(tx string) (txhex string, err error) VerifyTapscriptPartialSigs(tx string) (valid bool, txid string, err error) // FindLeaves returns all the leaves txs that are reachable from the given outpoint FindLeaves(vtxoTree tree.TxTree, fromtxid string, vout uint32) (leaves []tree.Node, err error) VerifyAndCombinePartialTx(dest string, src string) (string, error) GetTxID(tx string) (string, error) }
type TxOutpoint ¶
type VtxoWithValue ¶
type WalletService ¶
type WalletService interface { BlockchainScanner GetSyncedUpdate(ctx context.Context) <-chan struct{} GenSeed(ctx context.Context) (string, error) Create(ctx context.Context, seed, password string) error Restore(ctx context.Context, seed, password string) error Unlock(ctx context.Context, password string) error Lock(ctx context.Context, password string) error Status(ctx context.Context) (WalletStatus, error) GetPubkey(ctx context.Context) (*secp256k1.PublicKey, error) GetForfeitAddress(ctx context.Context) (string, error) DeriveConnectorAddress(ctx context.Context) (string, error) DeriveAddresses(ctx context.Context, num int) ([]string, error) SignTransaction( ctx context.Context, partialTx string, extractRawTx bool, ) (string, error) SignTransactionTapscript(ctx context.Context, partialTx string, inputIndexes []int) (string, error) // inputIndexes == nil means sign all inputs SelectUtxos(ctx context.Context, asset string, amount uint64) ([]TxInput, uint64, error) BroadcastTransaction(ctx context.Context, txHex string) (string, error) WaitForSync(ctx context.Context, txid string) error EstimateFees(ctx context.Context, psbt string) (uint64, error) MinRelayFee(ctx context.Context, vbytes uint64) (uint64, error) MinRelayFeeRate(ctx context.Context) chainfee.SatPerKVByte ListConnectorUtxos(ctx context.Context, connectorAddress string) ([]TxInput, error) MainAccountBalance(ctx context.Context) (uint64, uint64, error) ConnectorsAccountBalance(ctx context.Context) (uint64, uint64, error) LockConnectorUtxos(ctx context.Context, utxos []TxOutpoint) error GetDustAmount(ctx context.Context) (uint64, error) GetTransaction(ctx context.Context, txid string) (string, error) SignMessage(ctx context.Context, message []byte) ([]byte, error) VerifyMessageSignature(ctx context.Context, message, signature []byte) (bool, error) GetCurrentBlockTime(ctx context.Context) (*BlockTimestamp, error) Withdraw(ctx context.Context, address string, amount uint64) (string, error) Close() }
type WalletStatus ¶
Click to show internal directories.
Click to hide internal directories.