Documentation
¶
Overview ¶
* This package contains intermediary events that are used only by the covenantless version * they let to sign the vtxo tree using musig2 algorithm * they are not included in domain because they don't mutate the Round state and should not be persisted
Index ¶
- type AdminService
- type ArkProviderBalance
- type Balance
- type Batch
- type BatchStarted
- type ChainTx
- type ChainTxType
- type CommitmentTxInfo
- type ForfeitTxsResp
- type GetVtxosResp
- type IndexerService
- type IntentInfo
- type NextMarketHour
- type Outpoint
- type Page
- type PageResp
- type Receiver
- type RoundDetails
- type RoundFinalized
- type RoundSigningStarted
- type ScheduledSweep
- type Service
- type ServiceInfo
- type SweepableOutput
- type TransactionEvent
- type TransactionEventType
- type TreeNoncesAggregated
- type TreeSignatureMessage
- type TreeTx
- type TreeTxMessage
- type TreeTxResp
- type TxData
- type TxType
- type VOut
- type VirtualTxsResp
- type VtxoChainResp
- type VtxoTreeLeavesResp
- type WalletStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminService ¶
type AdminService interface {
Wallet() ports.WalletService
GetScheduledSweeps(ctx context.Context) ([]ScheduledSweep, error)
GetRoundDetails(ctx context.Context, roundId string) (*RoundDetails, error)
GetRounds(ctx context.Context, after int64, before int64) ([]string, error)
GetWalletAddress(ctx context.Context) (string, error)
GetWalletStatus(ctx context.Context) (*WalletStatus, error)
CreateNotes(ctx context.Context, amount uint32, quantity int) ([]string, error)
GetMarketHourConfig(ctx context.Context) (*domain.MarketHour, error)
UpdateMarketHourConfig(
ctx context.Context,
marketHourStartTime, marketHourEndTime time.Time, period, roundInterval time.Duration,
) error
ListIntents(ctx context.Context, intentIds ...string) ([]IntentInfo, error)
DeleteIntents(ctx context.Context, intentIds ...string) error
}
func NewAdminService ¶
func NewAdminService( walletSvc ports.WalletService, repoManager ports.RepoManager, txBuilder ports.TxBuilder, liveStoreSvc ports.LiveStore, timeUnit ports.TimeUnit, ) AdminService
type ArkProviderBalance ¶
type BatchStarted ¶
type BatchStarted struct {
domain.RoundEvent
IntentIdsHashes [][32]byte
BatchExpiry uint32
}
the user should react to this event by confirming the registration using intent_id
type ChainTxType ¶
type ChainTxType string
const ( IndexerChainedTxTypeUnspecified ChainTxType = "unspecified" IndexerChainedTxTypeCommitment ChainTxType = "commitment" IndexerChainedTxTypeArk ChainTxType = "ark" IndexerChainedTxTypeTree ChainTxType = "tree" IndexerChainedTxTypeCheckpoint ChainTxType = "checkpoint" )
type CommitmentTxInfo ¶
type ForfeitTxsResp ¶
type GetVtxosResp ¶
type IndexerService ¶
type IndexerService interface {
GetCommitmentTxInfo(ctx context.Context, txid string) (*CommitmentTxInfo, error)
GetVtxoTree(ctx context.Context, batchOutpoint Outpoint, page *Page) (*TreeTxResp, error)
GetVtxoTreeLeaves(
ctx context.Context, batchOutpoint Outpoint, page *Page,
) (*VtxoTreeLeavesResp, error)
GetForfeitTxs(ctx context.Context, txid string, page *Page) (*ForfeitTxsResp, error)
GetConnectors(ctx context.Context, txid string, page *Page) (*TreeTxResp, error)
GetVtxos(
ctx context.Context,
pubkeys []string, spendableOnly, spendOnly, recoverableOnly bool, page *Page,
) (*GetVtxosResp, error)
GetVtxosByOutpoint(
ctx context.Context, outpoints []Outpoint, page *Page,
) (*GetVtxosResp, error)
GetVtxoChain(ctx context.Context, vtxoKey Outpoint, page *Page) (*VtxoChainResp, error)
GetVirtualTxs(ctx context.Context, txids []string, page *Page) (*VirtualTxsResp, error)
GetBatchSweepTxs(ctx context.Context, batchOutpoint Outpoint) ([]string, error)
}
func NewIndexerService ¶
func NewIndexerService(repoManager ports.RepoManager) IndexerService
type IntentInfo ¶
type NextMarketHour ¶
type RoundDetails ¶
type RoundFinalized ¶
type RoundFinalized struct {
domain.RoundFinalized
Txid string
}
type RoundSigningStarted ¶
type RoundSigningStarted struct {
domain.RoundEvent
UnsignedCommitmentTx string
CosignersPubkeys []string
}
signer should react to this event by generating a musig2 nonce for each transaction in the tree
func (RoundSigningStarted) GetTopic ¶
func (r RoundSigningStarted) GetTopic() string
implement domain.RoundEvent interface
type ScheduledSweep ¶
type ScheduledSweep struct {
RoundId string
SweepableOutputs []SweepableOutput
}
type Service ¶
type Service interface {
Start() error
Stop()
RegisterIntent(
ctx context.Context, proof bip322.Signature, message bip322.IntentMessage,
) (string, error)
ConfirmRegistration(ctx context.Context, intentId string) error
SubmitForfeitTxs(ctx context.Context, forfeitTxs []string) error
SignCommitmentTx(ctx context.Context, commitmentTx string) error
GetEventsChannel(ctx context.Context) <-chan []domain.Event
GetInfo(ctx context.Context) (*ServiceInfo, error)
SubmitOffchainTx(
ctx context.Context, checkpointTxs []string, signedArkTx string,
) (signedCheckpoints []string, finalArkTx string, arkTxid string, err error)
FinalizeOffchainTx(ctx context.Context, txid string, finalCheckpoints []string) error
// Tree signing methods
RegisterCosignerNonces(
ctx context.Context, roundId, pubkey string, nonces tree.TreeNonces,
) error
RegisterCosignerSignatures(
ctx context.Context, roundId, pubkey string, signatures tree.TreePartialSigs,
) error
GetTxEventsChannel(ctx context.Context) <-chan TransactionEvent
DeleteIntentsByProof(
ctx context.Context, bip322signature bip322.Signature, message bip322.DeleteIntentMessage,
) error
// TODO: remove when detaching the indexer svc.
GetIndexerTxChannel(ctx context.Context) <-chan TransactionEvent
}
func NewService ¶
func NewService( wallet ports.WalletService, signer ports.SignerService, repoManager ports.RepoManager, builder ports.TxBuilder, scanner ports.BlockchainScanner, scheduler ports.SchedulerService, cache ports.LiveStore, vtxoTreeExpiry, unilateralExitDelay, boardingExitDelay arklib.RelativeLocktime, roundInterval, roundMinParticipantsCount, roundMaxParticipantsCount, utxoMaxAmount, utxoMinAmount, vtxoMaxAmount, vtxoMinAmount int64, network arklib.Network, allowCSVBlockType bool, noteUriPrefix string, marketHourStartTime, marketHourEndTime time.Time, marketHourPeriod, marketHourRoundInterval time.Duration, ) (Service, error)
type ServiceInfo ¶
type SweepableOutput ¶
type TransactionEvent ¶
type TransactionEventType ¶
type TransactionEventType string
const ( CommitmentTxType TransactionEventType = "commitment_tx" ArkTxType TransactionEventType = "ark_tx" )
type TreeNoncesAggregated ¶
type TreeNoncesAggregated struct {
domain.RoundEvent
Nonces tree.TreeNonces // aggregated nonces
}
signer should react to this event by partially signing the vtxo tree transactions then, delete its ephemeral key
func (TreeNoncesAggregated) GetTopic ¶
func (r TreeNoncesAggregated) GetTopic() string
type TreeSignatureMessage ¶
type TreeSignatureMessage struct {
domain.RoundEvent
Topic []string
BatchIndex int32
Txid string
Signature string
}
func (TreeSignatureMessage) GetTopic ¶
func (r TreeSignatureMessage) GetTopic() string
type TreeTx ¶
type TreeTx = tree.TxTreeNode
type TreeTxMessage ¶
type TreeTxMessage struct {
domain.RoundEvent
Topic []string
BatchIndex int32
Node tree.TxTreeNode
}
func (TreeTxMessage) GetTopic ¶
func (r TreeTxMessage) GetTopic() string
type TreeTxResp ¶
type VirtualTxsResp ¶
type VtxoChainResp ¶
type VtxoTreeLeavesResp ¶
type WalletStatus ¶
Click to show internal directories.
Click to hide internal directories.