stacks-archive / stacks-transactions-js

The JavaScript library for generating Stacks 2.0 transactions
19 stars 17 forks source link

feat: Clarity Strings #118

Closed reedrosenbluth closed 3 years ago

reedrosenbluth commented 3 years ago

This PR adds support for the new Clarity string types string-ascii and string-utf8. It does so by introducing corresponding typescript interfaces (StringAsciiCV and StringUtf8CV ), constructor functions to build them, and serialization/deserialization functions. It also adds support for validating ABIs of contracts that deal with string types.

Issue: #110

Type of Change

Does this introduce a breaking change?

No

Checklist

codecov[bot] commented 3 years ago

Codecov Report

Merging #118 into master will increase coverage by 0.18%. The diff coverage is 88.31%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #118      +/-   ##
==========================================
+ Coverage   83.11%   83.30%   +0.18%     
==========================================
  Files          27       28       +1     
  Lines        2079     2156      +77     
  Branches      422      444      +22     
==========================================
+ Hits         1728     1796      +68     
- Misses        347      356       +9     
  Partials        4        4              
Impacted Files Coverage Δ
src/clarity/types/stringCV.ts 58.33% <58.33%> (ø)
src/contract-abi.ts 76.17% <85.18%> (+1.17%) :arrow_up:
src/clarity/clarityValue.ts 100.00% <100.00%> (ø)
src/clarity/deserialize.ts 93.44% <100.00%> (+1.13%) :arrow_up:
src/clarity/index.ts 100.00% <100.00%> (ø)
src/clarity/serialize.ts 97.82% <100.00%> (+0.45%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update fce7593...758c0d1. Read the comment docs.