mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 20:24:21 +01:00
Vars and fields renaming (#387)
* Rename asp > server * Rename pool > round * Consolidate naming for pubkey/prvkey vars and types * Fix * Fix * Fix wasm * Rename congestionTree > vtxoTree * Fix wasm * Rename payment > request * Rename congestionTree > vtxoTree after syncing with master * Fix Send API in SDK * Fix wasm * Fix wasm * Fixes * Fixes after review * Fix * Fix naming * Fix * Fix e2e tests
This commit is contained in:
committed by
GitHub
parent
12d666bfdf
commit
7f937e8418
@@ -73,7 +73,7 @@ func parseReceiver(out *arkv1.Output) (domain.Receiver, error) {
|
||||
|
||||
return domain.Receiver{
|
||||
Amount: out.GetAmount(),
|
||||
Pubkey: hex.EncodeToString(schnorr.SerializePubKey(decodedAddr.VtxoTapKey)),
|
||||
PubKey: hex.EncodeToString(schnorr.SerializePubKey(decodedAddr.VtxoTapKey)),
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ func (v vtxoList) toProto() []*arkv1.Vtxo {
|
||||
Swept: vv.Swept,
|
||||
RedeemTx: vv.RedeemTx,
|
||||
IsPending: len(vv.RedeemTx) > 0,
|
||||
Pubkey: vv.Pubkey,
|
||||
Pubkey: vv.PubKey,
|
||||
CreatedAt: vv.CreatedAt,
|
||||
})
|
||||
}
|
||||
@@ -138,9 +138,9 @@ func (v vtxoKeyList) toProto() []*arkv1.Outpoint {
|
||||
return list
|
||||
}
|
||||
|
||||
type congestionTree tree.CongestionTree
|
||||
type vtxoTree tree.VtxoTree
|
||||
|
||||
func (t congestionTree) toProto() *arkv1.Tree {
|
||||
func (t vtxoTree) toProto() *arkv1.Tree {
|
||||
levels := make([]*arkv1.TreeLevel, 0, len(t))
|
||||
for _, level := range t {
|
||||
levelProto := &arkv1.TreeLevel{
|
||||
@@ -182,6 +182,27 @@ func (s stage) toProto() arkv1.RoundStage {
|
||||
}
|
||||
}
|
||||
|
||||
type roundTxEvent application.RoundTransactionEvent
|
||||
|
||||
func (e roundTxEvent) toProto() *arkv1.RoundTransaction {
|
||||
return &arkv1.RoundTransaction{
|
||||
Txid: e.RoundTxid,
|
||||
SpentVtxos: vtxoKeyList(e.SpentVtxos).toProto(),
|
||||
SpendableVtxos: vtxoList(e.SpendableVtxos).toProto(),
|
||||
ClaimedBoardingUtxos: vtxoKeyList(e.ClaimedBoardingInputs).toProto(),
|
||||
}
|
||||
}
|
||||
|
||||
type redeemTxEvent application.RedeemTransactionEvent
|
||||
|
||||
func (e redeemTxEvent) toProto() *arkv1.RedeemTransaction {
|
||||
return &arkv1.RedeemTransaction{
|
||||
Txid: e.RedeemTxid,
|
||||
SpentVtxos: vtxoKeyList(e.SpentVtxos).toProto(),
|
||||
SpendableVtxos: vtxoList(e.SpendableVtxos).toProto(),
|
||||
}
|
||||
}
|
||||
|
||||
func parseSignedVtxoOutpoints(signedVtxoOutpoints []*arkv1.SignedVtxoOutpoint) ([]application.SignedVtxoOutpoint, error) {
|
||||
if len(signedVtxoOutpoints) <= 0 {
|
||||
return nil, fmt.Errorf("missing signed vtxo outpoints")
|
||||
|
||||
Reference in New Issue
Block a user