Skip to content

nunchuk-io/bc-ur-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BC-UR-CPP

This is a C++ implementation of BCR-0004 and BCR-0005.

Use this library to interface with airgapped hardware wallets such as Cobo Vault using QR codes.

Installation

Add bc-ur-cpp as a submodule in your CMake project.

$ cd your_project/
$ git submodule add https://github.com/nunchuk-io/bc-ur-cpp
$ git submodule update --init --recursive

Add the following to your CMakeLists.txt.

add_subdirectory(bc-ur-cpp)
target_link_libraries("${PROJECT_NAME}" PUBLIC ur)

Usage

Include <bc32.h> to encode or decode BC32 data encoding format.

#include <bc32.h>

using namespace nunchuk::bcr;
 
std::string bc32Data = EncodeBc32Data(HexToBytes("..."));
std::vector<uint8_t> raw = DecodeBc32Data(bc32Data);

Include <ur.h> to encode or decode Uniform Resources.

#include <ur.h>

using namespace nunchuk::bcr;
 
std::vector<std::string> payload = EncodeUniformResource(HexToBytes("...");
std::vector<uint8_t> raw = DecodeUniformResource(payload);

License

bc-ur-cpp is released under the terms of the MIT license. See COPYING for more information or see https://opensource.org/licenses/MIT.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published