stacks.js icon indicating copy to clipboard operation
stacks.js copied to clipboard

feat!: Make serialize methods return hex-encoded strings, instead of bytes

Open janniks opened this issue 1 year ago • 2 comments

Make serialize methods return hex-encoded strings, instead of bytes

Reasoning: Most people shouldn't need to know what buffers/bytes are, they know hex from seeing strings around though. They expect txs, keys, etc. to be a hex string.

Also, renames AssetInfo to Asset for less confusion. With more strongly typed strings.

Closes #1655

Migration

- const bytes = serializePostCondition(pc);
+ const bytes = serializePostConditionBytes(pc);

New behavior

const hexString = serializePostCondition(pc);

janniks avatar Mar 11 '24 17:03 janniks

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
stacksjs-docs ❌ Failed (Inspect) Jun 10, 2024 0:25am

vercel[bot] avatar Mar 11 '24 17:03 vercel[bot]

Codecov Report

Attention: Patch coverage is 82.30088% with 40 lines in your changes missing coverage. Please review.

Project coverage is 66.37%. Comparing base (922e037) to head (b3d3921). Report is 53 commits behind head on next.

:exclamation: Current head b3d3921 differs from pull request most recent head faae503

Please upload reports for the commit faae503 to get more accurate results.

Files Patch % Lines
packages/transactions/src/types.ts 71.05% 33 Missing :warning:
packages/transactions/src/signature.ts 75.00% 4 Missing :warning:
packages/transactions/src/keys.ts 66.66% 3 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             next    #1657      +/-   ##
==========================================
- Coverage   66.37%   66.37%   -0.01%     
==========================================
  Files         119      124       +5     
  Lines        8717     8871     +154     
  Branches     1920     1979      +59     
==========================================
+ Hits         5786     5888     +102     
+ Misses       2806     2743      -63     
- Partials      125      240     +115     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 11 '24 17:03 codecov[bot]