Skip to content

Releases: steemit/steemutil

v0.0.15

06 Jan 20:38

Choose a tag to compare

Fix ChainProperties unmarshal error for account_creation_fee in new format

  • Add custom UnmarshalJSON for ChainProperties to handle account_creation_fee
    as either string (old format) or object (new format with nai field)
  • Add formatAssetFromObject helper to convert new asset format to string
  • Add test cases to verify both old and new formats work correctly
  • Fixes unmarshal error in pow_operation when account_creation_fee is an object

v0.0.14

25 Dec 00:03

Choose a tag to compare

  • Add StringBytesMap type to handle flat_map<string, vector> JSON serialization
  • Change WitnessSetPropertiesOperation.Props from string to StringBytesMap
  • Update test to use new StringBytesMap type
  • Fixes unmarshal error when parsing witness_set_properties operations from get_ops_in_block API

v0.0.13

17 Dec 17:44

Choose a tag to compare

  • Replace all interface{} with any in protocol/operation.go and protocol/operations.go

  • Fix MarshalJSON to use op directly instead of op.Data() type assertion

  • Align with Go 1.18+ modern code style

  • Add comprehensive documentation for Operation.Data() method

  • Include return type explanations (known vs unknown operations)

  • Provide 5 best practice examples:

    • Type assertion based on operation type
    • Safe type assertion with error handling
    • Handling unknown operations
    • Direct operation access
    • Iterating over operations
  • Add important notes about type safety and performance

  • Use modern Go style (any instead of interface{})

v0.0.12

08 Dec 00:09

Choose a tag to compare

  • Fix CustomJSONOperation.MarshalTransaction to include operation type code
    This was causing "missing required posting authority" errors when broadcasting
    custom_json operations. The operation type code (18 = 0x12) must be encoded
    at the beginning of the operation serialization.

  • Add sorting for required_auths and required_posting_auths fields
    These fields are flat_set types in Steem C++ and must be sorted before
    serialization to match blockchain expectations.

  • Add comprehensive unit tests for CustomJSONOperation

    • TestMarshalTransaction: Tests direct MarshalTransaction calls with type code
    • TestFullOperationEncoding: Tests complete operation encoding via encoder.Encode()
    • TestMarshalTransaction_Sorting: Verifies flat_set field sorting
      All tests verify compatibility with steem-js serialization.
  • Add debug output for JSON-RPC requests when DEBUG env var is set
    Helps diagnose transaction broadcasting issues.

  • Improve Time.UnmarshalJSON to handle quoted and unquoted time strings
    More robust parsing for ISO8601 time format.

  • Add documentation explaining the fix and why unit tests didn't catch it

    • custom_json_operation_type_code_fix.md: Detailed analysis of the bug
    • signature_format_analysis.md: Signature format verification
    • transaction_serialization_verification.md: Transaction serialization details

v0.0.11

27 Nov 14:01

Choose a tag to compare

Add SignedCall RPC authentication support

  • Add RPC authentication module (rpc/auth.go) with Sign/Validate functions
  • Implement SHA256 message signing support in wif package (wif/signature.go)
  • Add comprehensive unit tests for RPC authentication (rpc/auth_test.go)
  • Support steem-js compatible signed RPC request format
  • Include security features: nonce generation, timestamp expiration, replay protection
  • Add public key recovery from signatures
  • Maintain full compatibility with steem-js signedCall implementation

Core features

  • JSON-RPC request signing with ECDSA
  • Message hashing with protocol-specific constant K
  • 60-second signature expiration for security
  • Multiple private key signing support
  • Base64 parameter encoding and hex signature encoding

This implementation enables authenticated API calls to Steem blockchain
nodes, allowing access to private/restricted endpoints that require
proof of account ownership.

v0.0.10

25 Nov 02:58
c088f31

Choose a tag to compare

  • Add protocol/asset.go: Implement Asset type supporting STEEM, SBD, VESTS parsing and serialization
  • Add protocol/asset_test.go: Add unit tests for Asset type
  • Fix encoder/encoder.go: Auto-detect asset fields (Amount, AmountToSell, etc.) in encodeStruct, correctly serialize string-format assets to binary format
  • Fix amount field serialization in TransferOperation and other operations, change from string format to correct asset binary format (int64 + uint8 precision + 7 bytes symbol)
  • Add encoder.WriteBytes method for writing raw bytes
  • Fix Asset.String() method to correctly format amounts less than 1 (e.g., 0.001)

Serialization format after fix:

  • int64 amount (little-endian)
  • uint8 precision
  • 7 bytes symbol (null-padded)

This ensures full compatibility with Steem blockchain protocol.

v0.0.9

24 Nov 18:41
057da84

Choose a tag to compare

  • feat(auth): implement auth layer functionality

  • feat(protocol): add API and Broadcast operation metadata definitions

  • feat(protocol): complete all operation type definitions

  • test: improve test files

  • chore: update go.sum

  • docs: add cursor rules

  • update cursor rules

  • feat(make): add test commands to Makefile

  • Add test target to run all unit tests
  • Add test-verbose target for verbose test output
  • Add test-cover target for test coverage
  • Add test-cover-html target to generate HTML coverage report
  • Add test-race target for race detector
  • Add test-short target for short tests