mirror of
https://github.com/aljazceru/ark.git
synced 2026-02-01 01:24:39 +01:00
* SDK - GetTransactionsStream add to rest/grpc no session, pattern or user messages provided * SDK - AppDataRepository added, store refactor This patch introduces a significant refactor of the Ark SDK codebase. The primary changes involve: 1. **Domain Package Introduction**: A new `domain` package has been created under `store`, encapsulating core data structures and interfaces such as `ConfigData`, `Transaction`, `SdkRepository`, and various repository interfaces. This enhances modularity and separation of concerns. 2. **Replacement of Store with Domain Objects**: All references to the `store` package's `StoreData` have been replaced with `domain.ConfigData`. This change reflects a shift towards using domain-driven design, where the core business logic is represented by domain objects. 3. **Repository Pattern Implementation**: The code has been refactored to use repositories for accessing and managing data. `ConfigRepository` and `TransactionRepository` interfaces are introduced, providing methods for managing configuration data and transactions, respectively. 4. **New Storage Implementations**: New storage implementations using BadgerDB are introduced for persisting transactions (`transaction_repository.go`). This change indicates a move towards more robust and scalable data storage solutions. 5. **Service Layer Introduction**: A service layer (`service.go`) is introduced, which acts as a facade for the underlying data repositories. This layer abstracts the data access logic and provides a unified interface for interacting with configuration and transaction data. 6. **Code Simplification and Cleanup**: The patch removes redundant code and simplifies the existing codebase by consolidating store-related logic and enhancing the overall structure of the code. 7. **Testing Enhancements**: Test cases are updated to reflect the changes in the data access layer, ensuring that the new repository pattern and domain objects are properly tested. Overall, this refactor aims to improve the maintainability, scalability, and testability of the codebase by adopting best practices such as domain-driven design, repository pattern, and separation of concerns. * 'SDK listen for tx stream This diff represents a substantial refactor and enhancement of the `ark-sdk` client, which involves modifications to multiple files, primarily in the `pkg/client-sdk` and `server/internal/core/application` directories. Here's a summary of the key changes: 1. **Configuration and Initialization**: - Refactor to replace file-based configuration store with a domain-based approach. - Introduced `ListenTransactionStream` configuration to allow real-time transaction event listening. 2. **Client SDK Enhancements**: - The client SDK now supports asynchronous transaction streaming and handling. - Introduced methods to get transaction event channels and stop the client gracefully. - Expanded the `ArkClient` interface to include these new functionalities. 3. **Transaction Handling**: - Added support for listening to and processing transaction events in real-time. - Implemented methods to handle different types of transactions, including boarding, redeem, and round transactions. - Expanded the `Transaction` struct to include more metadata, such as `BoardingVOut`. 4. **Repository Changes**: - Introduced `VtxoRepository` for managing VTXO-related operations. - Modified `AppDataRepository` to include `VtxoRepository`. 5. **Example and Test Adjustments**: - Updated example code to utilize the new transaction streaming capabilities. - Adjusted tests to reflect changes in client initialization and configuration handling. 6. **Dependency Updates**: - Updated `go.mod` and `go.sum` to include new dependencies such as `badger` for data storage and potentially updated versions of existing packages. These changes collectively enhance the functionality of the `ark-sdk` client by enabling real-time transaction handling, improving configuration management, and providing a more robust and scalable client architecture. This update seems to be aimed at improving the efficiency and responsiveness of the client application, likely in response to increased demands for real-time data processing and analysis.' * merge * go work sync * test fix * Tiny refactor (#2) * tiny refactor * renaming * Renamings * Fixes (#3) --------- Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
90 lines
4.0 KiB
Modula-2
90 lines
4.0 KiB
Modula-2
module github.com/ark-network/ark/pkg/client-sdk
|
|
|
|
go 1.23.1
|
|
|
|
replace github.com/btcsuite/btcd/btcec/v2 => github.com/btcsuite/btcd/btcec/v2 v2.3.3
|
|
|
|
require (
|
|
github.com/btcsuite/btcd v0.24.2
|
|
github.com/btcsuite/btcd/btcec/v2 v2.3.4
|
|
github.com/btcsuite/btcd/btcutil v1.1.5
|
|
github.com/btcsuite/btcd/btcutil/psbt v1.1.9
|
|
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0
|
|
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0
|
|
github.com/dgraph-io/badger/v4 v4.2.0
|
|
github.com/go-openapi/errors v0.22.0
|
|
github.com/go-openapi/runtime v0.28.0
|
|
github.com/go-openapi/strfmt v0.23.0
|
|
github.com/go-openapi/swag v0.23.0
|
|
github.com/go-openapi/validate v0.24.0
|
|
github.com/lightningnetwork/lnd v0.18.2-beta
|
|
github.com/sirupsen/logrus v1.9.3
|
|
github.com/stretchr/testify v1.9.0
|
|
github.com/timshannon/badgerhold/v4 v4.0.3
|
|
github.com/vulpemventures/go-elements v0.5.4
|
|
golang.org/x/crypto v0.26.0
|
|
google.golang.org/grpc v1.65.0
|
|
)
|
|
|
|
require (
|
|
github.com/aead/siphash v1.0.1 // indirect
|
|
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
|
|
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f // indirect
|
|
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd // indirect
|
|
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 // indirect
|
|
github.com/btcsuite/winsvc v1.0.0 // indirect
|
|
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
|
github.com/decred/dcrd/crypto/blake256 v1.0.1 // indirect
|
|
github.com/decred/dcrd/lru v1.1.3 // indirect
|
|
github.com/dgraph-io/ristretto v0.1.1 // indirect
|
|
github.com/dustin/go-humanize v1.0.1 // indirect
|
|
github.com/fsnotify/fsnotify v1.7.0 // indirect
|
|
github.com/go-logr/logr v1.4.2 // indirect
|
|
github.com/go-logr/stdr v1.2.2 // indirect
|
|
github.com/go-openapi/analysis v0.23.0 // indirect
|
|
github.com/go-openapi/jsonpointer v0.21.0 // indirect
|
|
github.com/go-openapi/jsonreference v0.21.0 // indirect
|
|
github.com/go-openapi/loads v0.22.0 // indirect
|
|
github.com/go-openapi/spec v0.21.0 // indirect
|
|
github.com/gogo/protobuf v1.3.2 // indirect
|
|
github.com/golang/glog v1.2.1 // indirect
|
|
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
|
github.com/golang/protobuf v1.5.4 // indirect
|
|
github.com/golang/snappy v0.0.4 // indirect
|
|
github.com/google/flatbuffers v24.3.25+incompatible // indirect
|
|
github.com/google/uuid v1.6.0 // indirect
|
|
github.com/gorilla/websocket v1.5.3 // indirect
|
|
github.com/jessevdk/go-flags v1.6.1 // indirect
|
|
github.com/josharian/intern v1.0.0 // indirect
|
|
github.com/jrick/logrotate v1.0.0 // indirect
|
|
github.com/kkdai/bstream v1.0.0 // indirect
|
|
github.com/klauspost/compress v1.17.9 // indirect
|
|
github.com/lightningnetwork/lnd/fn v1.2.1 // indirect
|
|
github.com/mailru/easyjson v0.7.7 // indirect
|
|
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
|
github.com/oklog/ulid v1.3.1 // indirect
|
|
github.com/onsi/ginkgo v1.16.4 // indirect
|
|
github.com/opentracing/opentracing-go v1.2.0 // indirect
|
|
github.com/pkg/errors v0.9.1 // indirect
|
|
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
|
github.com/rogpeppe/go-internal v1.12.0 // indirect
|
|
github.com/stretchr/objx v0.5.2 // indirect
|
|
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
|
|
github.com/vulpemventures/fastsha256 v0.0.0-20160815193821-637e65642941 // indirect
|
|
go.mongodb.org/mongo-driver v1.14.0 // indirect
|
|
go.opencensus.io v0.24.0 // indirect
|
|
go.opentelemetry.io/otel v1.30.0 // indirect
|
|
go.opentelemetry.io/otel/metric v1.30.0 // indirect
|
|
go.opentelemetry.io/otel/sdk v1.28.0 // indirect
|
|
go.opentelemetry.io/otel/trace v1.30.0 // indirect
|
|
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa // indirect
|
|
golang.org/x/net v0.28.0 // indirect
|
|
golang.org/x/sync v0.8.0 // indirect
|
|
golang.org/x/sys v0.24.0 // indirect
|
|
golang.org/x/text v0.17.0 // indirect
|
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20240812133136-8ffd90a71988 // indirect
|
|
google.golang.org/protobuf v1.34.2 // indirect
|
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
)
|