Pietralberto Mazza
5c2065ad47
Make change of async payment spendable ( #324 )
...
* Drop unused ComputeOutputScript & use ParseTaprootScript internally
* Add pending field to vtxo domain
* Add check to handle async change as claimed vtxo & Move check to prevent spending penidng vtxos to app level
* Rename utils.go to parser.go & Fixes
* Ignore sent-and-reversible vtxos in ListVtxos
* Fixes
Co-authored-by: Louis Singer <louisinger@users.noreply.github.com >
* Fix e2e test
Co-authored-by: Louis Singer <louisinger@users.noreply.github.com >
Co-authored-by: João Bordalo <bordalix@users.noreply.github.com >
* Fix
* Add PendingChange field to vtxo
* Add PendingChange field to Transaction
* Fixes
* Remove logs
---------
Co-authored-by: Louis Singer <louisinger@users.noreply.github.com >
Co-authored-by: João Bordalo <bordalix@users.noreply.github.com >
2024-09-19 19:44:22 +02:00
Louis Singer
10ef0dbffa
Add reversible policy to pending vtxos ( #311 )
...
* [server] descriptor-based vtxo script
* [server] fix unit tests
* [sdk] descriptor based vtxo
* empty config check & version flag support
* fix: empty config check & version flag support (#309 )
* fix
* [sdk] several fixes
* [sdk][server] several fixes
* [common][sdk] add reversible VtxoScript type, use it in async payment
* [common] improve parser
* [common] fix reversible vtxo parser
* [sdk] remove logs
* fix forfeit map
* remove debug log
* [sdk] do not allow reversible vtxo script in case of self-transfer
* remove signing pubkey
* remove signer public key, craft forfeit txs client side
* go work sync
* fix linter errors
* rename MakeForfeitTxs to BuildForfeitTxs
* fix conflicts
* fix tests
* comment VtxoScript type
* revert ROUND_INTERVAL value
---------
Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com >
Co-authored-by: sekulicd <sekula87@gmail.com >
2024-09-19 10:01:33 +02:00
Louis Singer
4da76ec88b
New boarding protocol ( #279 )
...
* [domain] add reverse boarding inputs in Payment struct
* [tx-builder] support reverse boarding script
* [wallet] add GetTransaction
* [api-spec][application] add reverse boarding support in covenantless
* [config] add reverse boarding config
* [api-spec] add ReverseBoardingAddress RPC
* [domain][application] support empty forfeits txs in EndFinalization events
* [tx-builder] optional connector output in round tx
* [btc-embedded] fix getTx and taproot finalizer
* whitelist ReverseBoardingAddress RPC
* [test] add reverse boarding integration test
* [client] support reverse boarding
* [sdk] support reverse boarding
* [e2e] add sleep time after faucet
* [test] run using bitcoin-core RPC
* [tx-builder] fix GetSweepInput
* [application][tx-builder] support reverse onboarding in covenant
* [cli] support reverse onboarding in covenant CLI
* [test] rework integration tests
* [sdk] remove onchain wallet, replace by onboarding address
* remove old onboarding protocols
* [sdk] Fix RegisterPayment
* [e2e] add more funds to covenant ASP
* [e2e] add sleeping time
* several fixes
* descriptor boarding
* remove boarding delay from info
* [sdk] implement descriptor boarding
* go mod tidy
* fixes and revert error msgs
* move descriptor pkg to common
* add replace in go.mod
* [sdk] fix unit tests
* rename DescriptorInput --> BoardingInput
* genrest in SDK
* remove boarding input from domain
* remove all "reverse boarding"
* rename "onboarding" ==> "boarding"
* remove outdate payment unit test
* use tmpfs docker volument for compose testing files
* several fixes
2024-09-04 19:21:26 +02:00
Marco Argentieri
1b0252f3e4
Migrate to Go Workspaces ( #243 )
...
* api-spec: move the api-spec to root and init go.mod
* go mod tidy
* move buf files in the root as well
* gh action for api-spec changes only
* gh action for api-spec on push and pr
* introduce go.work and remove all replaces
* solve dependencies and force btcd/btcec@v2.3.3
* go work sync
* force btcd/btcec@v2.3.3
* go mod tidy
2024-08-13 03:27:41 +02:00
Pietralberto Mazza
72a7f29bab
Add CreatePayment and CompletePayment ( #229 )
...
Co-authored-by: Marco Argentieri <tiero@users.noreply.github.com >
* Add claim command
* Persist pending data in sqlite repo
* Remove debug log
* Return pending data at interface level
* Fix unlocking btc wallet after restart
* Lint & Fix whitelist permissions
* Fix send command for covenant
* Update client/covenantless/claim.go
Signed-off-by: Marco Argentieri <3596602+tiero@users.noreply.github.com >
* Fix
* Pay for min relay fee instead of estimating fees for redeem and unconf forfeit txs
* Add support for pending payments (coventanless)
* Fixes
* Fixes
* Improve verbosity
* Fix coin selection
* Fix
---------
Signed-off-by: Marco Argentieri <3596602+tiero@users.noreply.github.com >
Co-authored-by: louisinger <louis@vulpem.com >
Co-authored-by: Marco Argentieri <tiero@users.noreply.github.com >
Co-authored-by: Marco Argentieri <3596602+tiero@users.noreply.github.com >
2024-08-10 19:18:02 +02:00
Pietralberto Mazza
57ce08f239
Support macaroons and TLS && Add arkd wallet cmds ( #232 )
...
* Update protos
* Update handlers
* Support macaroons and TLS
* Add arkd cli
* Minor fixes
* Update deps
* Fixes
* Update makefile
* Fixes
* Fix
* Fix
* Fix
* Remove trusted onboarding from client
* Completely remove trusted onboarding
* Fix compose files and add --no-macaroon flag to arkd cli
* Lint
* Remove e2e for trusted onboarding
* Add sleep time
2024-08-09 17:59:31 +02:00
Dusan Sekulic
e45bff3c70
Sqlite - add sqlc and migration ( #217 )
2024-07-26 02:09:48 +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
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
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
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
a6e0b6f408
Fix badger repo SweepVtxo API ( #172 )
2024-05-23 14:43:30 +02:00
Louis Singer
34aff2c4c3
ListVtxos rpc: return swept vtxos ( #168 )
2024-05-06 11:09:11 -05:00
Louis Singer
f1b83bd522
Add expireAt member in ListVtxo RPC ( #160 )
2024-05-01 16:42:13 +02:00
Pietralberto Mazza
7fc8d7d07d
Get current round & Return spent vtxos for user ( #139 )
2024-04-23 16:14:35 +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
Louis Singer
066e8eeabb
Prevent getting cheated by broadcasting forfeit transactions ( #123 )
...
* broadcast forfeit transaction in case the user is trying the cheat the ASP
* fix connector input + --cheat flag in CLI
* WIP
* cleaning and fixes
* add TODO
* sweeper.go: mark round swept if vtxo are redeemed
* fixes after reviews
* revert "--cheat" flag in client
* revert redeem.go
* optimization
* update account.go according to ocean ListUtxos new spec
* WaitForSync implementation
* ocean-wallet/service.go: remove go rountine while writing to notification channel
2024-03-04 13:58:36 +01:00
Pietralberto Mazza
bcd66d7ae7
Fixes ( #107 )
2024-02-13 17:38:55 +01:00
Pietralberto Mazza
99961d9fd5
Update event and projection stores in sync ( #102 )
2024-02-12 14:07:15 +01:00
Pietralberto Mazza
dc00d60585
Rename folders ( #97 )
...
* Rename arkd folder & drop cli
* Rename ark cli folder & update docs
* Update readme
* Fix
* scripts: add build-all
* Add target to build cli for all platforms
* Update build scripts
---------
Co-authored-by: tiero <3596602+tiero@users.noreply.github.com >
2024-02-09 19:32:58 +01:00