35 Commits

Author SHA1 Message Date
anonpenguin23
c7ef91f8d6 Update package version to 0.3.1 v0.3.1 2025-11-11 17:51:03 +02:00
anonpenguin23
54c61e6a47 Add getBinary method to StorageClient for IPFS content retrieval
- Implemented a new method `getBinary` to retrieve content from IPFS by CID, returning the full Response object.
- Added retry logic with exponential backoff for handling eventual consistency in IPFS Cluster, allowing up to 8 attempts for content retrieval.
- Enhanced documentation with usage examples and detailed parameter descriptions for better clarity.
2025-11-08 12:02:35 +02:00
anonpenguin23
a02c7474ab Enhance StorageClient upload method to support optional pinning
- Updated the upload method to accept an options parameter for controlling the pinning behavior of uploaded content.
- Default pinning behavior remains true, but can be set to false through the options.
- Improved documentation to reflect the new options parameter and its usage in examples.
2025-11-08 08:34:29 +02:00
anonpenguin23
06d58fe85b Enhance HttpClient error handling for expected 404 responses
- Added logic to identify and handle expected 404 errors for conversation participants without logging them as errors.
- Updated comments to clarify the expected behavior for cache misses and non-participant status, improving code readability.
2025-11-07 08:17:51 +02:00
anonpenguin23
2cdb78ee1d Add multiGet functionality to CacheClient for batch retrieval of cache values
- Introduced CacheMultiGetRequest and CacheMultiGetResponse interfaces to define the structure for multi-get operations.
- Implemented multiGet method in CacheClient to retrieve multiple cache values in a single request, handling cache misses gracefully.
- Enhanced error handling to manage 404 errors when the backend does not support multiGet, returning null for missing keys.
2025-11-07 06:47:42 +02:00
anonpenguin23
cee0cd62a9 Enhance CacheClient to handle cache misses gracefully
- Updated the `get` method in CacheClient to return null for cache misses instead of throwing an error.
- Improved error handling to differentiate between expected 404 errors and other exceptions.
- Adjusted related tests to verify null returns for non-existent keys, ensuring robust cache behavior.
2025-11-07 06:03:47 +02:00
anonpenguin23
51f7c433c7 Refactor HttpClient to improve API key and JWT handling for various operations
- Removed redundant console logging in setApiKey method.
- Updated getAuthHeaders method to include cache operations in API key usage logic.
- Enhanced request logging to track request duration and handle expected 404 errors gracefully.
- Improved code readability by formatting SQL queries in the Repository class.
2025-11-06 11:16:10 +02:00
anonpenguin23
64cfe078f0 Remove redundant test for handling get errors with non-existent CID in storage tests 2025-11-06 06:25:18 +02:00
anonpenguin23
5bfb042646 Implement retry logic for content retrieval in StorageClient
- Added retry mechanism for the `get` method to handle eventual consistency in IPFS Cluster.
- Introduced exponential backoff strategy for retries, allowing up to 8 attempts with increasing wait times.
- Enhanced error handling to differentiate between 404 errors and other failures, ensuring robust content retrieval.
2025-11-05 17:30:58 +02:00
anonpenguin23
e233696166 feat: integrate Olric distributed cache support
- Added Olric cache server integration, including configuration options for Olric servers and timeout settings.
- Implemented HTTP handlers for cache operations: health check, get, put, delete, and scan.
- Enhanced Makefile with commands to run the Olric server and manage its configuration.
- Updated README and setup scripts to include Olric installation and configuration instructions.
- Introduced tests for cache handlers to ensure proper functionality and error handling.
2025-11-05 07:30:59 +02:00
anonpenguin23
e30e81d0c9 Update package version to 0.3.0 and introduce CacheClient with caching functionality
- Added CacheClient to manage cache operations including get, put, delete, and scan.
- Updated createClient function to include cache client.
- Added new types and interfaces for cache requests and responses.
- Implemented comprehensive tests for cache functionality, covering health checks, value storage, retrieval, deletion, and scanning.
2025-11-03 15:28:30 +02:00
anonpenguin23
272c6b872c Update package version from 0.1.5 to 0.2.5 in package.json v0.2.5 2025-10-30 09:18:18 +02:00
anonpenguin23
8c9a900e88 Update HttpClient to include proxy operations in API key usage logic and enhance request header logging for proxy paths. 2025-10-30 06:52:29 +02:00
anonpenguin23
23a742e5d4 Add proxy request functionality to NetworkClient and update README with usage examples
- Introduced `proxyAnon` method in `NetworkClient` to facilitate anonymous HTTP requests through the Anyone network.
- Added `ProxyRequest` and `ProxyResponse` interfaces to define the structure of proxy requests and responses.
- Updated README.md with detailed examples on how to use the new proxy functionality, including GET and POST requests.
- Enhanced error handling for proxy requests to ensure graceful failure in case of issues.
2025-10-30 06:21:29 +02:00
anonpenguin23
6f5be86a02 Update HttpClient to support API key usage for both database and pubsub operations; enhance request header logging to include pubsub paths for better debugging. 2025-10-29 14:17:26 +02:00
anonpenguin23
a97fb21200 Enhance AuthClient to support optional refresh tokens and API keys in the authentication response; update token persistence logic for improved session management. Remove debug logging from PubSubClient to reduce console output. 2025-10-29 07:02:46 +02:00
anonpenguin23
0e95ad49c5 Remove debug logging for publish headers in HttpClient to streamline header management and reduce console output. 2025-10-29 06:54:02 +02:00
anonpenguin23
fa357668cb Add getApiKey method to HttpClient and update PubSubClient to use it for authentication. Change WebSocket URL from localhost to 127.0.0.1 for improved compatibility. 2025-10-29 06:53:49 +02:00
anonpenguin23
5c564b6327 Add chain_type property to AuthClient for enhanced blockchain support 2025-10-28 19:18:18 +02:00
anonpenguin23
76bb82d4f8 Refactor AuthClient and HttpClient to allow coexistence of API key and JWT; implement logoutUser method to clear JWT while preserving API key, enhancing user logout functionality. Improve header management in HttpClient for database operations and add debug logging for request headers. 2025-10-28 13:35:54 +02:00
anonpenguin23
dcf8efe428 Refactor AuthClient to streamline imports and add wallet authentication methods including challenge, verify, and getApiKey; improve error logging during logout process. 2025-10-28 13:08:52 +02:00
anonpenguin23
c6dfb0bfed Increase default timeout in HttpClient to 60 seconds for pub/sub operations; simplify WSClient by removing unused configuration options and enhancing connection handling with open and close event handlers; refactor PubSubClient to improve WebSocket subscription management and message handling. 2025-10-28 10:25:10 +02:00
anonpenguin23
2de0cb1983 Enhance README with detailed Pub/Sub messaging features, including multi-subscriber support and message interface; improve HttpClient with per-request timeout handling; update PubSubClient to support raw message handling and validate message envelopes. 2025-10-27 17:30:49 +02:00
anonpenguin23
eab542952e Enhance WebSocket error handling and add base64 encoding/decoding utilities in PubSubClient; refactor message publishing logic to support base64 data 2025-10-27 09:01:14 +02:00
anonpenguin23
acf9540daa Refactor network status interface and update related tests; add dotenv for environment variable management 2025-10-26 15:21:00 +02:00
anonpenguin23
f2d8d35a35 Increment version to 0.1.5 and update package name references in README.md to '@debros/network-ts-sdk'; remove GitHub Actions workflow for GitHub Packages publishing v0.1.5 2025-10-22 09:27:31 +03:00
anonpenguin23
9d9f64c11e Update package name to '@debros/network-ts-sdk' and increment version to 0.1.4; adjust GitHub Actions workflow scope accordingly v0.1.4 2025-10-22 09:24:17 +03:00
anonpenguin23
dab820bb25 Update package version to 0.1.3 and modify GitHub Actions workflow to use 'npm run build' and correct package scope v0.1.3 2025-10-22 09:21:48 +03:00
anonpenguin23
4459fc6c49 Replace pnpm with npm in GitHub Actions workflow for dependency installation, building, and publishing steps v0.1.2 2025-10-22 09:19:49 +03:00
anonpenguin23
f4e76d2876 Update package version to 0.1.1 v0.1.1 2025-10-22 09:18:44 +03:00
anonpenguin23
a65637f323 Update GitHub Actions workflow to maintain version tag trigger for npm publishing 2025-10-22 09:18:05 +03:00
anonpenguin23
6e80bc28b7 Refactor GitHub Actions workflow to remove unnecessary working-directory specifications for npm and GitHub Packages publishing steps 2025-10-22 09:17:14 +03:00
anonpenguin23
03c62882fa Update package version to 0.1.0, rename package, and add npm and GitHub Packages publishing workflows 2025-10-22 09:14:29 +03:00
anonpenguin23
60e67c98bf Update package.json to version 0.0.2, add license, author, and repository information 2025-10-22 09:08:46 +03:00
anonpenguin23
ddec9f6733 Init Network Typescript SDK v0.0.1 2025-10-22 09:06:42 +03:00