Skip to content

ChainSafe/near-snap

Repository files navigation

NearSnap - MetaMask Snap for NEAR Protocol

Table of Contents

  1. Introduction
  2. Prerequisites
  3. Getting Started
  4. Building and Running the Snap
  5. Testing
  6. Linting and Formatting

Introduction

NearSnap is a MetaMask Snap that enables MetaMask users to interact with NEAR Protocol-powered dApps.

This project is a monorepo containing the MetaMask Snap package, managed by Yarn 3 Workspaces. The goal of this project is to provide native interaction with the NEAR Protocol inside MetaMask using the Snaps system.

Prerequisites

Before you can start working with the project, make sure you have the following software installed:

Or (recommended):

Getting Started

To get started with the project:

  1. Clone the repository:
git clone https://github.com/ChainSafe/near-snap
  1. Navigate to the project root:
cd near-snap
  1. Install the dependencies:
When using nvm and corepack - click here
nvm use
corepack enable
yarn install

Building and Running the Snap

To build and run the project, follow these steps:

  1. Build all packages:
yarn build
  1. Run the MetaMask Snap:
yarn start:snap

Testing

To run tests for all packages:

yarn test

Linting and Formatting

This project uses ESLint to enforce code style and formatting. To check code quality with the linter, run:

yarn lint

To lint and format the code, run:

yarn lint:style:fix