Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@metaplex-foundation/amman

Package Overview
Dependencies
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metaplex-foundation/amman

A modern mandatory toolbelt to help test solana SDK libraries and apps on a locally running validator.

  • 0.0.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.6K
decreased by-1.31%
Maintainers
3
Weekly downloads
 
Created
Source

Amman

A m odern man datory toolbelt to help test solana SDK libraries and apps on a locally running validator.

Table of Contents generated with DocToc

API

Aside from providing a CLI for various tasks, amman also provides commonly used actions, transactions, asserts and more via an API. Please find the API docs here.

CLI

amman [command]

Commands:
  amman validator [config]  Launches a solana-test-validator

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]

Commands: validator

amman validator <config.js>

If no config.js is provided amman looks for an .ammanrc.js file in the current directory. If that isn't found either it uses a default config.

The config should be a JavaScript module exporting 'validator' with any of the below properties:

  • killRunningValidators: if true will kill any solana-test-validators currently running on the system.
  • programs: bpf programs which should be loaded into the test validator
  • jsonRpcUrl: the URL at which the test validator should listen for JSON RPC requests
  • websocketUrl: for the RPC websocket
  • ledgerDir: where the solana test validator writes the ledger
  • resetLedger: if true the ledger is reset to genesis at startup
  • verifyFees: if true the validator is not considered fully started up until it charges transaction fees
Sample Validator Config

Below is an example validator config with all values set to the defaults except for an added program.

import { LOCALHOST, tmpLedgerDir } from 'amman'

module.exports = {
  validator: {
    killRunningValidators: true,
    programs: [
      { programId: programIds.metadata, deployPath: localDeployPath('mpl_token_metadata') },
    ],
    jsonRpcUrl: LOCALHOST,
    websocketUrl: '',
    commitment: 'confirmed',
    ledgerDir: tmpLedgerDir(),
    resetLedger: true,
    verifyFees: false,
  }
}

LICENSE

Apache-2.0

Keywords

FAQs

Package last updated on 27 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc