ElementsProject / ElementsProject/libwally-core

Detect bech32 typo position(s)

Open
#116 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
307
Forks
159
Avg merge
2h 56m
Merged PRs (30d)
4

Description

The bech32 address format has pretty neat error detection functions that could really improve a wallet user experience. See it in action [here](http://bitcoin.sipa.be/bech32/demo/demo.html).

Schermafbeelding 2019-06-14 om 10 36 31

We could add something like:

```c
`wally_validate_bech32(const char *addr, const char *addr_family, uint32_t flags, unsigned char *bytes_out, size_t len, size_t *written
```

where `bytes_out` is be an array with the position(s) of invalid characters.

I'm not sure how this would be implemented.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.