npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@veive-io/verifier-p256

v1.0.0

Published

p-256 signature contract verifier

Downloads

53

Readme

Veive p256 verifier CPP

This is the "verifier" contract within the Veive project.

The project consists of providing koinos users with transparent onboarding and usage through the implementation of the WebauthN protocol.

"Verifier" is a smart contract in C++ format that implements the p-256 signature verification method which is the most used algorithm in the webauthn standard.

The "verify" method requires only 3 parameters (signature, public_key, msg) and provides a boolean as output.

It is called directly from the user's smart wallet contract for transaction verification and general authentication.

Building

Dependencies

It is recommended to place all dependencies in the ~/opt directory. You must have python3-venv installed on your system. For example you can use the command sudo apt install python3-venv on Ubuntu.

When all dependencies are properly installed your ~/opt directory should look like this;

❯ ls ~/opt
EmbeddedProto  koinos-sdk  protobuf-3.17.3  wasi-sdk-12.0

Koinos SDK and WASI SDK

To build the nub verifier, you must first build and install the SDK. Follow the instructions on the README.

Protobuf 3.17.3

Clone, build, and install protobuf-3.17.3 from the Protobuf repository.

git clone --recursive https://github.com/protocolbuffers/protobuf.git
cd protobuf
git checkout v3.17.3
git submodule update --init --recursive
git clean -df
cd cmake
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/opt/protobuf-3.17.3
make -j install

EmbeddedProto

Clone the repo (EmbeddedProto)[https://github.com/koinos/EmbeddedProto.git] and checkout the negative-enums branch.

git clone --recursive https://github.com/koinos/EmbeddedProto.git
cd EmbeddedProto
git checkout negative-enums

Environment variables

Prior to invoking the build command, set the following variables:

export KOINOS_WASI_SDK_ROOT=~/opt/wasi-sdk-12.0
export KOINOS_SDK_ROOT=~/opt/koinos-sdk
export KOINOS_PROTOBUF_ROOT=~/opt/protobuf-3.17.3
export KOINOS_EMBEDDED_PROTO_ROOT=~/opt/EmbeddedProto

Or simply source .env from inside the project directory.

Executing the build with CMake

Run the following commands to do an out of source cmake build.

mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=${KOINOS_SDK_ROOT}/cmake/koinos-wasm-toolchain.cmake -DCMAKE_BUILD_TYPE=Release ..
make -j

.wasm binaries are in your build directory and are ready to be uploaded to Koinos.

Assembly usage

The assembly interfaces, abi and wasm are published in npm package @veive/verifier-p256. You can use the interfaces inside your assemblyscript smart contract.

import { verifier, IVerifier } from "@veive/verifier-p256-cpp"