Coder Social home page Coder Social logo

did-stellar-registry's Introduction

Stellar DID Registry

DID Specification

Overview

DID method registry for Stellar Network, built using the Soroban Rust SDK

This Stellar DID registry contract is intended for use with:

  1. Stellar Resolver Library
  2. Stellar DID Method Library

It is a low level library and is not intended for direct use by end users.

For information about the Stellar DID method please consult the Stellar DID Method Specification

DID Format

did:stllr:<stellar_account_id>

Contract Deployments

Network Address
Mainnet Soroban is not yet available on mainnet
Testnet CADVHUKFQ5HF5SANSUARZO5QBGZSCYFFLICDCY5T2PHYLFQA32SA5QNG
Futurenet CDF7ETQM2PJKTJRMR4EZGMDYTRAU34WAPXQCM44ZMRELP6XYLB4NQTDP

Development

Building

cargo build --target wasm32-unknown-unknown --release

To build with logs

cargo build --target wasm32-unknown-unknown --release-with-logs

NOTE: if you build with logs then all future calls should use the wasm path target/wasm32-unknown-unknown/release-with-logs/stellar_did_registry.wasm

Tests

cargo test

Deploying and Invoking the contract

Option 1: run on local Soroban sandbox

soroban contract invoke \                                                                                                                                                                                                                        Py base 01:55:41 PM
--wasm target/wasm32-unknown-unknown/release/stellar_did_registry.wasm \
--id 1 \
-- \
-- FUNCTION_NAME \
--PARAM_NAME_1 PARAM_VALUE_1 \
--PARAM_NAME_2 PARAM_VALUE_2

Option 2: deploy to local docker network

Run local network using Docker:

docker run --rm -it \
  -p 8000:8000 \
  --name stellar \
  stellar/quickstart:soroban-dev@sha256:57e8ab498bfa14c65595fbb01cb94b1cdee9637ef2e6634e59d54f6958c05bdb \
  --standalone \
  --enable-soroban-rpc

Generate Account:

go to Stellar Laboratory, for the rest of the commands replace G with your pubkey and S with your secret key

curl "http://localhost:8000/friendbot?addr=G..."

Deploy contract:

soroban contract deploy \
    --wasm target/wasm32-unknown-unknown/release/[project-name].wasm \
    --source S... \
    --rpc-url http://localhost:8000/soroban/rpc \
    --network-passphrase 'Standalone Network ; February 2017'

did-stellar-registry's People

Contributors

mkhraisha avatar

Stargazers

Danilo Lessa Bernardineli avatar

Watchers

Yinghui (Vivien) Fan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.