Skip to content

blocto/solana-contract-wallet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build status Gitpod Ready-to-Code

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

Open in Gitpod

If you decide to open in Gitpod then refer to README-gitpod.md, otherwise continue reading.

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

If this is your first time using Docker or Rust, these Installation Notes might be helpful.

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

About

Solana contract wallet used in Blocto wallet & SDK

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages