Blue Terra is a decentralized protocol for the global democratization of stable and accessible property rights.

Overview

Blue Terra Engineering

🏝️ KYC Program


I. Introduction

Blue Terra is a decentralized protocol for the global democratization of stable and accessible property rights.

Toward this end, we believe in the power of sharing some of the secret sauce that makes Blue Terra possible so that others may build and expand on the core model.

This repo contains the source code for the Blue Terra Civic KYC nonce Solana program.

II. Requirements

  1. Rustup
  2. Solana
  3. Anchor

III. Program IDL

{
  "version": "0.1.0",
  "name": "bt_kyc",
  "instructions": [
    {
      "name": "claimLand",
      "accounts": [
        {
          "name": "gatewayToken",
          "isMut": false,
          "isSigner": false
        },
        {
          "name": "userWallet",
          "isMut": true,
          "isSigner": true
        }
      ],
      "args": [
        {
          "name": "gatekeeperNetwork",
          "type": "publicKey"
        }
      ]
    }
  ]
}

IV. Program Overview

The following is a high level description of the Anchor Program used in our claim land and KYC process.

The program is a minimalist nonce written in Anchor Lang and provides Blue Terra a simple way to keep track of KYC verified wallets and civic tokens on-chain.

In particular, if a Blue Terra NFT holder has a valid KYC, through the posession of a valid civic gatewayToken SPL token, then they will be able to interact with the kyc-program to claim their land and activate the leases embedded within their NFTs.

The program contains one instruction, claimLand. This instruction leverages the Civic Gateway decorator to detect the KYC status of a given walletAddress and gatewayToken.

On detection of a valid Civic KYC status, the program will log the walletAddress and gatewayToken of the user to the program standard output.

V. Building

To build this program run:

anchor build 

On successful build you will have a target directory in your top level.

VI. Deployment

To deploy the program follow the steps below:

Find the program's address by running:

solana address -k ./target/deploy/bt_kyc-keypair.json

Copy and paste this address into ./Anchor.toml and ./programs/bt-kyc

Finally run the following:

anchor deploy 

VII. Client Side Instrumentation

To interact with the program from a NodeJS client we recommend using:

  1. @project-serum/anchor to instrument program rpc requests from the client.
  2. @solana/web3.js for NodeJS Solana libraries.
  3. @civic/solana-gateway-react for Civic's KYC Libraries and React Providers.
  4. @solana/wallet-adapter for Solana React wallet adapter components.


A high level sketch of this interaction can be found below. Using the included React hooks from the packages above is often useful.

You might also like...
Terra liquid staking derivative

Terra liquid staking derivative. Of the community, by the community, for the community.

Outp0st is an open-source UI tool to enable next-level team collaboration on dApp development over Terra blockchain
Outp0st is an open-source UI tool to enable next-level team collaboration on dApp development over Terra blockchain

Outp0st is an open-source UI tool to enable next-level team collaboration on dApp development over Terra blockchain

Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.
Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.

Building 1. Install rustc, cargo and rustfmt. $ curl https://sh.rustup.rs -sSf | sh $ source $HOME/.cargo/env $ rustup component add rustfmt When buil

The Decentralized and Scaled Blockchain

Massa: The Decentralized and Scaled Blockchain Massa is a truly decentralized blockchain controlled by thousands of people. With the breakthrough mult

Nym provides strong network-level privacy against sophisticated end-to-end attackers, and anonymous transactions using blinded, re-randomizable, decentralized credentials.

The Nym Privacy Platform The platform is composed of multiple Rust crates. Top-level executable binary crates include: nym-mixnode - shuffles Sphinx p

Demo: Connect Phala's Fat Contract to external storage services, both centralized (Amazon s3) and decentralized .

This demo shows how to connect Phala's Fat Contract to external storage services, both centralized (Amazon s3) and decentralized (Arweave/Filecoin thr

Kryptokrona SDK in Rust for building decentralized private communication and payment systems.

Kryptokrona Rust SDK Kryptokrona is a decentralized blockchain from the Nordic based on CryptoNote, which forms the basis for Monero, among others. Cr

An infrastructure for peer-to-peer, decentralized, and collaborative software.

karyon An infrastructure for peer-to-peer, decentralized, and collaborative software. In molecular biology, a Karyon is essentially "a part of the cel

Dank - The Internet Computer Decentralized Bank - A collection of Open Internet Services - Including the Cycles Token (XTC)
Dank - The Internet Computer Decentralized Bank - A collection of Open Internet Services - Including the Cycles Token (XTC)

Dank - The Internet Computer Decentralized Bank Dank is a collection of Open Internet Services for users and developers on the Internet Computer. In t

Releases(beta-1.0.0)
Owner
Blue Terra
Blue Terra is the world’s first NFT tied to plots of physical land. We love Engineering, Opensource and Solana.
Blue Terra
The Polkadot Hackathon Global Series North America edition is the second in a series of hackathons that brings the cutting edge of blockchain to a global community.

Polkadot Hackathon Project We are translating Uniswap v2 to Ink. Dependencies Install cargo-contract for building Ink contracts: cargo install dylint-

Kristiyan Dilov 3 Jun 28, 2022
All the data an IC app needs to make seamless experiences, accessible directly on the IC. DAB is an open internet service for NFT, Token, Canister, and Dapp registries.

DAB ?? Overview An Internet Computer open internet service for data. All the data an IC app needs to make a seamless experience, accessible directly o

Psychedelic 58 Oct 6, 2022
Smart contracts powering Spectrum Protocol on Terra

Spectrum Core Contracts This monorepository contains the source code for the core smart contracts implementing Spectrum Protocol on the Terra blockcha

Spectrum Protocol 38 Dec 19, 2022
This monorepository contains the source code for the smart contracts implementing bAsset Protocol on the Terra blockchain.

Crll bAsset Contracts This monorepository contains the source code for the smart contracts implementing bAsset Protocol on the Terra blockchain. You c

null 3 Mar 29, 2024
Open source Rust implementation of the Witnet decentralized oracle protocol, including full node and wallet backend 👁️🦀

witnet-rust is an open source implementation of the Witnet Decentralized Oracle Network protocol written in Rust. Components witnet-rust implements ma

The Witnet Project 155 Nov 21, 2022
Helper library for interacting with Terra assets (SDK coins and CW20 tokens)

terra-asset Helpers for interacting with Terra assets, including native coins and CW20 tokens Usage This crate contains two struct types: AssetInfo st

larry 9 Jan 3, 2022
The NFT smart contract powering xyz on Terra

xyz NFT Contract This repository contains the core NFT smart contract that implements xyz, a base layer for metaverses on the Terra blockchain. The xy

null 16 Sep 25, 2022
My code for the terra.academy course on CosmWasm smart contracts

CosmWasm Starter Pack This is a template to build smart contracts in Rust to run inside a Cosmos SDK module on all chains that enable it. To understan

Alex Incerti 0 Nov 7, 2021
Smart Contract for Terra Name Service

TERRA NAME SERVICE CONTRACTS Terra Name Service is to create easy-to-remember names for your Terra address like ‘dokwon.ust’ instead of ‘terra1...whez

null 12 Nov 23, 2022
A CosmWasm Tutorial by Terra Academy.

CosmWasm Starter Pack This is a template to build smart contracts in Rust to run inside a Cosmos SDK module on all chains that enable it. To understan

Tantatorn Suksangwarn 1 Dec 24, 2021