We shouldn't use _IS_BIPF_ENCODED, that's an internal implementation detail. Instead, here's isIdempotent(), and another nice util markIdempotent() which takes a ready-encoded bipf buffer and tags it.
I also fixed the return value of encodeIdempotent(). It was wrong (compare e.g. with what the readme promised), it should return a length just like encode() returns.
We shouldn't use
_IS_BIPF_ENCODED
, that's an internal implementation detail. Instead, here'sisIdempotent()
, and another nice utilmarkIdempotent()
which takes a ready-encoded bipf buffer and tags it.I also fixed the return value of
encodeIdempotent()
. It was wrong (compare e.g. with what the readme promised), it should return a length just likeencode()
returns.