All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Amount Converter Utility:
GasfreeSdk::Utils::AmountConverterfor converting between human-readable amounts and base units (wei/sun) - Timestamp Parsing: Support for various timestamp formats in API responses (UNIX seconds, milliseconds, ISO 8601, RFC 3339, RFC 2822)
- Logging and Security: Migrated to a single middleware (
SanitizedLogsMiddleware) for all HTTP request/response logging and masking.- Now, all HTTP logs (when
DEBUG_GASFREE_SDK=1) are guaranteed to be sanitized before output, with no risk of leaking sensitive data. - No other HTTP logging middleware is used, ensuring complete control over log output.
- Now, all HTTP logs (when
- Stronger Data Protection: Sensitive fields (private keys, tokens, signatures, etc.) are always masked in logs, even in debug mode. No original data is ever written to logs.
- Updated README to reflect the new logging architecture and usage.
-
TronEIP712Signer Module: Complete EIP-712 signature implementation for TRON GasFree transfers
- Full EIP-712 structured data signing according to TIP-712 specifications
- Support for both TRON Mainnet and Testnet (Nile) networks
- Built-in Keccak256 cryptographic hashing implementation
- Base58 encoding/decoding utilities for TRON addresses
- Flexible data key handling (camelCase, snake_case conversion)
- Pre-configured domain constants for GasFree contracts
- Comprehensive test coverage with RSpec
-
Core GasFree SDK functionality
- API client for GasFree.io with support for different endpoints (mainnet, testnet, custom)
- Support for tokens, providers, and transfer operations
- Comprehensive error handling and validation
- Ethereum and TRON address support
- RSpec test suite with comprehensive coverage
- Dry-rb validation and type checking
GasfreeSdk::TronEIP712Signer.sign_typed_data_testnet()- Sign for TRON TestnetGasfreeSdk::TronEIP712Signer.sign_typed_data_mainnet()- Sign for TRON MainnetGasfreeSdk::TronEIP712Signer.sign_typed_data()- Generic signing with custom domainsGasfreeSdk::Crypto::Keccak256- Pure Ruby Keccak256 implementationGasfreeSdk::Base58- TRON address encoding/decoding utilities- Token, Provider, and Transfer management APIs
- Service Providers API with proper data mapping from camelCase to snake_case
- Improved URL path handling for API requests
- Added
rbsecp256k1(~> 6.0) for secp256k1 cryptographic operations
examples/simple_usage_example.rb- Basic TronEIP712Signer usage demonstrationexamples/test_tron_signer.rb- Comprehensive module testing script- Updated
examples/test_with_real_data_prod.rbto use the new module
- Updated README.md with comprehensive TronEIP712Signer documentation
- Added usage examples and API reference
- Documented all cryptographic operations and utilities
- Improved documentation for Service Providers with detailed configuration constraints
- Fixed Service Providers API data mapping from camelCase to snake_case
- Added proper transformation for provider configuration fields (maxPendingTransfer -> max_pending_transfer, etc.)
- Updated tests to use correct API response format for providers
- Comprehensive test coverage for provider field mapping
- RSpec testing framework integration
- Improved error handling and validation throughout the SDK