#include "bip21.hpp" using namespace sk::bip21; auto main() -> int { // Decoding std::string s{"bitcoin:1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH"}; auto [res, err] = decode(s); std::cout << res; // Encoding Component c = { {"amount", "0.23"}, {"label", "foobar"}, {"message", "donation"} }; const auto encoded = encode("1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH", std::nullopt, c); std::cout << encoded; // bitcoin:1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH?amount=0.23&label=foobar&message=donation }- Notifications
You must be signed in to change notification settings - Fork 2
sdmg15/bip21-cpp
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
A header only BIP21 compatible URL encoding utility library
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published