Commit Graph

160 Commits

Author SHA1 Message Date
Pietralberto Mazza
fb8a127f4f Update deps (#223) 2024-07-31 13:24:31 +02:00
Louis Singer
01297ae38c Add support for covenant-less ASP (#214)
* scaffolding wallet

* remove wallet db, add loader instead

* wip

* implement some wallet methods

* signing and utxos

* renaming

* fee estimator

* chain source options

* config

* application service

* clark docker-compose

* CLI refactor

* v0 clark

* v0.1 clark

* fix SignTapscriptInput (btcwallet)

* wallet.Broadcast, send via explora

* fix ASP pubkey

* Use lnd's btcwallet & Add rpc to get wallet staus

* wip

* unilateral exit

* Fixes on watching for notifications and cli init

* handle non-final BIP68 errors

* Fixes

* Fixes

* Fix

* a

* fix onboard cosigners + revert tree validation

* fix covenant e2e tests

* fix covenantless e2e tests

* fix container naming

* fix lint error

* update REAME.md

* Add env var for wallet password

---------

Co-authored-by: altafan <18440657+altafan@users.noreply.github.com>
2024-07-30 20:57:52 +02:00
Pietralberto Mazza
89df461623 Update client sdk (#207)
* Add bitcoin networks

* Refactor client

* Refactor explorer

* Refactor store

* Refactor wallet

* Refactor sdk client

* Refactor wasm & Update examples

* Move common util funcs to internal/utils

* Move to constants for service types

* Add unit tests

* Parallelize tests

* Lint

* Add job to gh action

* go mod tidy

* Fixes

* Fixes

* Fix compose file

* Fixes

* Fixes after review:
* Drop factory pattern
* Drop password from ark client methods
* Make singlekey wallet manage store and wallet store instead of defining WalletStore as extension of Store
* Move constants to arksdk module
* Drop config and expect directory store and wallet as ark client factory args

* Fix

* Add constants for bitcoin/liquid explorer

* Fix test

* Fix wasm

* Rename client.Client to client.ASPClient

* Rename store.Store to store.ConfigStore

* Rename wallet.Wallet to wallet.WalletService

* Renamings

* Lint

* Fixes

* Move everything to internal/utils & move ComputeVtxoTaprootScript to common

* Go mod tidy
2024-07-30 16:08:23 +02:00
Dusan Sekulic
e45bff3c70 Sqlite - add sqlc and migration (#217) 2024-07-26 02:09:48 +02:00
Marco Argentieri
03cbb22a34 New banner
Signed-off-by: Marco Argentieri <3596602+tiero@users.noreply.github.com>
2024-07-20 13:25:25 +02:00
Dusan Sekulic
1f42843a69 Add first version of client SDK (#193)
* Add gRPC, REST, and gRPC-Web clients for server access

This commit introduces clients for gRPC, REST, and gRPC-Web to access the server.

- gRPC client: Includes additional argument opts ...grpc.CallOption in the interface for future extensibility.
- REST client: Factory function accepts http.Client as an argument to allow user customization.
- gRPC-Web client: Added a Log method for fast debugging in JavaScript.

The decision to use different interfaces for each client type is to accommodate specific features and extensibility requirements for each protocol.

* remove grpc web

* generate rest

* use grpc sdk in CLI

* temp wasm

* ark sdk

* renaming

* pr review refactor

* pr review refactor

* walletStore & configStore

* ark sdk wasm wrapper

* handle event stream with rest

* wip on supporting rest

* store init

* simulate event stream with rest

* fix rest sdk wip

* Fix returning forfeit txs in round event

* wasm first working e2e example

* pr review refactor

* pr review refactor

* pr review refactor

* Fixes

---------

Co-authored-by: altafan <18440657+altafan@users.noreply.github.com>
2024-07-18 16:27:14 +02:00
Pietralberto Mazza
498394a191 Add endpoint to get round via id & round stage (#202) 2024-07-12 15:42:21 +02:00
Pietralberto Mazza
4ff1c7c87a Add RoundFinalizationEvent to PingResponse (#200) 2024-07-11 14:21:12 +02:00
Pietralberto Mazza
d10c724ced Fix errors on round finalization (#199)
* Fix ListConnectorUtxos

* Fix

* Fix

* Add log

* Store current round in memoory and drop GetCurrentRound repo api

* Skip lint
2024-07-08 14:22:35 +02:00
Marco Argentieri
c274d670fe Update ark.release.yaml
Signed-off-by: Marco Argentieri <3596602+tiero@users.noreply.github.com>
2024-06-24 15:37:55 +02:00
Louis Singer
024b0b8402 Hotifx: do not return locked connector utxos (#186) 2024-06-21 18:42:20 +02:00
Louis Singer
bb208ec995 Implements SQLite repositories (#180)
* add sqlite db

* add .vscode to gitignore

* add vtxo repo

* add sqlite repos implementations

* add sqlite in db/service

* update go.mod

* fix sqlite

* move sqlite tests to service_test.go + fixes

* integration tests using sqlite + properly close statements

* implement GetRoundsIds

* add "tx" table to store forfeits, connectors and congestion trees

* add db max conn = 1

* upsert VTXO + fix onboarding

* remove json tags

* Fixes

* Fix

* fix lint

* fix config.go

* Fix rm config & open db only once

* Update makefile

---------

Co-authored-by: altafan <18440657+altafan@users.noreply.github.com>
2024-06-19 18:16:31 +02:00
Marco Argentieri
584131764f Create LICENSE
Signed-off-by: Marco Argentieri <3596602+tiero@users.noreply.github.com>
2024-06-03 19:29:56 +02:00
Louis Singer
9fc49d9f08 Add AdminService (#176)
* add admin service

* go mod tidy

* fix linter: grpc.Dial

* fix ocean get balance

* fix linter

* add .vscode to gitignore

* rework admin balance API

* fix mockedwallet in covenantless pkg

* make proto
2024-05-31 15:46:46 +02:00
Louis Singer
329ba555db Covenant-less TxBuilder (#178)
* initial commit

* wip

* add bitcointree pkg in common

* add bitcoin txbuilder

* fix BuildPoolTx test

* fix sweeper

* v0 musig2 congestion tree

* bitcointree: add signatures support

* add Makefile in common

* fix lint

* fix go.mod and TxBuilder

* go mod tidy

* rename "pset" --> "psbt"

* add GetSweepInput method in TxBuilder

* fix extractSweepLeaf (bitcoin tx builder)
2024-05-31 12:49:52 +02:00
Louis Singer
b5bac540ef Use connectors utxos from swept rounds (#167)
* use connectors utxos from swept rounds

* revert docker-compose.regtest.yml

* add gitignore

* fix integration tests
2024-05-29 14:34:35 +02:00
Louis Singer
dca302df69 Dynamic amount in unroll closure (#173)
* update UnrollClosure

* update TrustedOnboarding flow + add TrustedOnboarding e2e test

* fix linter: grpc.Dial

* add comment

* integration tests: faucet the ASP with 2 utxos
2024-05-28 12:13:03 +02:00
Louis Singer
2dae630daf Trigger integration tests on PR (#174) 2024-05-23 17:54:00 +02:00
Louis Singer
a6e0b6f408 Fix badger repo SweepVtxo API (#172) 2024-05-23 14:43:30 +02:00
Luke
5f2e1ed31e nit: Update README.md (#169)
Signed-off-by: Luke <u32luke@gmail.com>
2024-05-06 17:24:28 -05:00
Louis Singer
34aff2c4c3 ListVtxos rpc: return swept vtxos (#168) 2024-05-06 11:09:11 -05:00
Marco Argentieri
a3eb64c94c improve README instructions (#166) 2024-05-02 23:32:52 -05:00
José A.P
166b4c99ad Fix readme to use testnet for ark init (#165)
* Fix readme to use testnet for ark init

Signed-off-by: José A.P <53834183+Jossec101@users.noreply.github.com>

* Added to ark2 network param

Signed-off-by: José A.P <53834183+Jossec101@users.noreply.github.com>

---------

Signed-off-by: José A.P <53834183+Jossec101@users.noreply.github.com>
2024-05-02 23:27:01 -05:00
Justin Moon
06803ec7e9 fix: add -it flag to ark alias in README (#164) 2024-05-02 18:55:33 -05:00
Louis Singer
f1b83bd522 Add expireAt member in ListVtxo RPC (#160) 2024-05-01 16:42:13 +02:00
Louis Singer
02ff7c7ed9 Add roundInterval, network and minRelayFee to GetInfo RPC (#159) 2024-05-01 16:15:29 +02:00
Louis Singer
3c9da99516 Add --datadir flag (#152)
* add --datadir flag

* map ENV variable to --datadir flag

* revert version var
2024-05-01 16:14:02 +02:00
tiero
9e42c7f9f9 config: update defaults 2024-04-30 22:34:36 -05:00
tiero
6cb79b6968 gh action: use -arm64 2024-04-30 17:51:28 -05:00
Louis Singer
85693e9e9a update README.md (#158) 2024-04-30 17:45:37 -05:00
João Bordalo
caa6c51e3c Merge pull request #162 from louisinger/addspentpoolid
add `spentBy` member in ListVtxos response
2024-04-30 16:48:55 +01:00
Louis Singer
3597594fe7 add spentBy member in ListVtxos 2024-04-30 17:46:12 +02:00
Louis Singer
dc64947d28 returns forfeitsTxs in Ping RPC while the finalization started (#161) 2024-04-29 18:58:11 +02:00
tiero
4ef35c8d26 improve README 2024-04-27 04:11:27 +02:00
tiero
ec3692e12d gh action: permissions 2024-04-27 03:51:20 +02:00
Marco Argentieri
30c1df9a66 Improve README (#157)
* Prepare for default liquid, README and Release GH action

* improve README
2024-04-27 03:22:41 +02:00
Marco Argentieri
9496094443 Prepare for default liquid, README and Release GH action (#156) 2024-04-27 03:09:04 +02:00
tiero
4939cdaaa6 client: init network mainnet > liquid 2024-04-26 00:44:23 +02:00
tiero
085fac9372 client: mainnet > liquid 2024-04-25 20:30:31 +02:00
Marco Argentieri
6608b2cc9a ARK_NETWORK=liquid (#140)
* Update config.go

Signed-off-by: Marco Argentieri <3596602+tiero@users.noreply.github.com>

* common: mainnet > liquid

---------

Signed-off-by: Marco Argentieri <3596602+tiero@users.noreply.github.com>
2024-04-25 20:27:50 +02:00
Marco Argentieri
7c43152a8f use another GOPROXY
Signed-off-by: Marco Argentieri <3596602+tiero@users.noreply.github.com>
2024-04-25 20:15:16 +02:00
Pietralberto Mazza
7fc8d7d07d Get current round & Return spent vtxos for user (#139) 2024-04-23 16:14:35 +02:00
Louis Singer
740d4fb7b1 Add TrustedOnboarding RPC (#138)
* add CreateOnboardingAddress rpc

* add TrustedOnboarding rpc

* remove log.Info in notifications.go
2024-04-23 14:54:27 +02:00
Louis Singer
7a58d97a34 check io.Copy errors in test/e2e/utils.go (#136) 2024-04-19 19:48:57 +02:00
Louis Singer
852756eaba Add integration tests and regtest support (#128)
* regtest support + integration tests (e2e)

* add integration CI

* add PR trigger on integration CI

* wait for ocean to be unlocked at startup

* integration tests: add tests flags and build docker images at startup

* use nigiri chopsticks-liquid

* fix after reviews

* Update client/init.go

Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
Signed-off-by: Louis Singer <41042567+louisinger@users.noreply.github.com>

* do not trigger integration on PR

---------

Signed-off-by: Louis Singer <41042567+louisinger@users.noreply.github.com>
Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
2024-04-19 18:57:13 +02:00
Pietralberto Mazza
f9e7621165 Add grpc-gateway and /healthz endpoint (#133)
* Add grpc-gateway and /healthz endpoint

* Add nolint

* nosec
2024-04-19 17:11:59 +02:00
João Bordalo
f135869928 fix client binary name on server/README (#134) 2024-04-19 17:07:18 +02:00
Louis Singer
127c7a07de Fix ValidateConnectors (#132)
* connector validation fix

* better fix
2024-03-27 17:36:04 +01:00
Louis Singer
2261aa0699 Add --enable-expiry-coinselect flag in redeem & send cmds (#131) 2024-03-27 13:32:58 +01:00
tiero
14cefdf35d fix: remove whitespace from ark wallet state keys 2024-03-19 13:34:52 +01:00