Code Monkey home page Code Monkey logo

solana-contract-wallet's Introduction

Solana Multi-Sig Wallet Program

The project comprises of:

  • An on-chain multi-sig wallet program
  • A client library that helps construct requests to the multi-sig wallet program

Specs & Features

The multi-sig wallet program provides the following instructions:

  • Initialize wallet and add initial key
  • Add new owner public key with corresponding weight (requires authorization)
  • Remove owner (requires authorization)
  • Invoke any instruction to another program (requires authorization)

Each owner public key has its own weight (0~1000). Any authorized instruction requires the total signature weight to be at least 1000.

Quick Start

The following dependencies are required to build and run this example, depending on your OS, they may already be installed:

Start local Solana cluster

This example connects to a local Solana cluster by default.

Enable on-chain program logs:

$ export RUST_LOG=solana_runtime::system_instruction_processor=trace,solana_runtime::message_processor=debug,solana_bpf_loader=debug,solana_rbpf=debug

Start a local Solana cluster:

$ npm run localnet:update
$ npm run localnet:up

View the cluster logs:

$ npm run localnet:logs

Note: To stop the local Solana cluster later:

$ npm run localnet:down

Build the on-chain program

$ npm run build:program

Run the client

$ npm run start

Pointing to a public Solana cluster

Solana maintains three public clusters:

  • devnet - Development cluster with airdrops enabled
  • testnet - Tour De Sol test cluster without airdrops enabled
  • mainnet-beta - Main cluster

Use npm scripts to configure which cluster.

To point to devnet:

$ npm run cluster:devnet

To point back to the local cluster:

$ npm run cluster:localnet

Information about Solana

For more information about programming on Solana, visit Solana Docs

solana-contract-wallet's People

Contributors

midas92 avatar dependabot-preview[bot] avatar

Watchers

 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.