Skip to content

aptos-labs/petra-vault

Repository files navigation

petra logo

Petra Vault

Multisig wallet solution on the Aptos blockchain


Features

Petra Vault enables you to create and manage multisig vaults on the Aptos blockchain.

Create or Import Vaults: Quickly create a new vault or import an existing one (including those created from other platforms).

Onboarding Flow

Proposal Presets: Packed with presets with seamless experiences for common transactions (e.g. sending coins, adding/removing owners, publishing modules, etc.)

Proposal Presets

Transaction Simulations: Preview the effects of transactions before sending them.

Proposal Page

And that's not it, explore the rest of the features yourself at vault.petra.app!

Documentation

For documentation, please refer to the petra.app/vault.

Audits

Petra Vault has been audited by Hacken.

Getting Started

Prerequisites

  • Node.js
  • pnpm

Runtime versions are defined in the .tool-versions file. You can install these runtimes using mise.

Installation

  1. Clone the repository:

    git clone https://github.com/aptos-labs/petra-vault.git
    cd petra-vault
  2. Install dependencies:

    pnpm install
  3. Start the development server:

    pnpm dev
  4. Open http://localhost:3000 in your browser to see the application.

No-Code Indexer

Petra Vault uses the No-Code Indexing (NCI) service from Geomi in order to index multisig transactions and ownership discovery. In order to run the indexer, please follow the instructions in the indexer README.

Environment Variables

Create a .env.local file in the apps/web directory by copying the example file:

cp .env.example .env.local

Required environment variables:

NEXT_PUBLIC_ENABLE_REACT_SCAN=0
NEXT_PUBLIC_ENABLE_EMBEDDED=1

# API Keys for Aptos networks (obtain from https://geomi.dev/)
NEXT_PUBLIC_APTOS_MAINNET_API_KEY=<api_key>
NEXT_PUBLIC_APTOS_TESTNET_API_KEY=<api_key>

# Google Analytics ID (obtain from https://analytics.google.com)
NEXT_PUBLIC_GA4_ID=<ga4_id>

# Sentry Auth Token (obtain from https://sentry.io)
SENTRY_AUTH_TOKEN=<sentry_auth_token>

CI=false

Note: Make sure to obtain the necessary API keys from the provided links to avoid rate limiting issues.

Testing

The monorepo uses vitest for unit testing and playwright for end-to-end testing.

Unit Tests

To run the unit tests, you can use the following command:

pnpm test

End-to-End (E2E) Tests

To get started with E2E tests, you must first install the Playwright dependencies:

pnpx playwright install --with-deps chromium

Then, you can run the E2E tests using the following command:

pnpm test:e2e

End-to-End Tests

Note: Running it from the root directory will automatically do any necessary builds steps. If done in a subdirectory, make sure to manually build the project using pnpm build before running the tests.

Deployments

The deployment points to https://vault.petra.app. The application is deployed onto Vercel using the main branch. Deployments are automatically triggered when a push is made to the main branch.

Contributing

Contributions are welcome! Please refer to the CONTRIBUTING.md file for more information.

About

Non-custodial multisig wallet solution on the Aptos blockchain

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •  

Languages