Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Installation


Table of contents

  1. Anchor installation
  2. Frontend installation

Sol Cerberus integration is divided into two parts, installing the Sol Cerberus crate into your Anchor program and the Javascript SDK in the frontend to facilitate the interaction with the Sol Cerberus program, allowing the use of a succinct syntax to perform authenticated requests.

Anchor installation

Add the following dependencies into the Cargo.toml file of your Anchor program located at ./programs/NAME-OF-YOUR-PROGRAM/Cargo.toml:

[dependencies]
anchor-spl = { version = "0.29.0", features = ["metadata"] }
sol-cerberus = { version = "0.1.12", features = ["cpi"] }
solana-program = "1.16.20"

idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"]

And also the idl-build into the features section:

[features]
idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"]

Frontend installation

The Sol Cerberus Javascript SDK package is used to facilitate the interaction with the Sol Cerberus program.

To install the package add the following dependencies into the package.json file of your frontend:

{
  "dependencies": {
    "sol-cerberus-js": "latest",
    "@metaplex-foundation/js": "^0.20.1" // Optional (if planning to use NFTs)
  },
}

The @metaplex-foundation/js package is actually optional and only necessary if you intend to use NFT authentication.