An open API service indexing awesome lists of open source software.

https://github.com/aptos-labs/petra-vault

Non-custodial multisig wallet solution on the Aptos blockchain
https://github.com/aptos-labs/petra-vault

aptos blockchain multisig petra web3

Last synced: 8 months ago
JSON representation

Non-custodial multisig wallet solution on the Aptos blockchain

Awesome Lists containing this project

README

          



petra logo



Petra Vault



Multisig wallet solution on the Aptos blockchain



Apache 2.0 License

---

### 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](https://vault.petra.app)!

## Documentation

For documentation, please refer to the [petra.app/vault](https://petra.app/vault).

## Audits

Petra Vault has been audited by [Hacken](https://hacken.io/audits/petra-vault).

## Getting Started

### Prerequisites

- Node.js
- pnpm

Runtime versions are defined in the [`.tool-versions`](../.tool-versions) file. You can install these runtimes using [mise](https://mise.jdx.dev/).

### Installation

1. Clone the repository:

```bash
git clone https://github.com/aptos-labs/petra-vault.git
cd petra-vault
```

2. Install dependencies:

```bash
pnpm install
```

3. Start the development server:

```bash
pnpm dev
```

4. Open [http://localhost:3000](http://localhost:3000) in your browser to see the application.

### No-Code Indexer

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

### Environment Variables

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

```bash
cp .env.example .env.local
```

Required environment variables:

```bash
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=
NEXT_PUBLIC_APTOS_TESTNET_API_KEY=

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

# Sentry Auth Token (obtain from https://sentry.io)
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](https://vitest.dev/) for unit testing and [playwright](https://playwright.dev/) for end-to-end testing.

### Unit Tests

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

```bash
pnpm test
```

### End-to-End (E2E) Tests

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

```bash
pnpx playwright install --with-deps chromium
```

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

```bash
pnpm test:e2e
```

![End-to-End Tests](./assets/e2e_tests.png)

> **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](https://vault.petra.app). The application is deployed onto [Vercel](https://vercel.com) 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](./CONTRIBUTING.md) file for more information.