Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating endpoits #323

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ When minting to another wallet using Typescript, there are two main approaches d
### Mint without Guards
For Candy Machines without guards, use `mintFromCandyMachineV2`. This function allows you to directly specify the recipient as the `nftOwner`.

To gain access to the Metaplex Aura network on the Solana and Eclipse blockchains you can visit the Aura App for an endpoint and API key [here](https://aura-app.metaplex.com/).

```js
const candyMachineAccount = await fetchCandyMachine(umi, publicKey("CM Address"));

Expand Down Expand Up @@ -144,7 +146,7 @@ import {

// Configuration
const RECIPIENT_ADDRESS = "Tes1zkZkXhgTaMFqVgbgvMsVkRJpq4Y6g54SbDBeKVV";
const RPC_ENDPOINT = "https://devnet.helius-rpc.com/?api-key=0aa5bfbe-0077-4414-9d87-02ffa09cc50b";
const RPC_ENDPOINT = "https://devnet-aura.metaplex.com/<YOUR_API_KEY>";

(async () => {
try {
Expand Down
4 changes: 3 additions & 1 deletion src/pages/candy-machine/guides/mint-to-another-wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ When minting to another wallet using Typescript, there are two main approaches d
### Mint without guards
For Candy Machines without guards, use `mintFromCandyMachineV2`. This function allows you to directly specify the recipient as the `nftOwner`.

To gain access to the Metaplex Aura network on the Solana and Eclipse blockchains you can visit the Aura App for an endpoint and API key [here](https://aura-app.metaplex.com/).

```js
const candyMachineAccount = await fetchCandyMachine(umi, publicKey("CM Address"));

Expand Down Expand Up @@ -147,7 +149,7 @@ import {

// Configuration
const RECIPIENT_ADDRESS = "Tes1zkZkXhgTaMFqVgbgvMsVkRJpq4Y6g54SbDBeKVV";
const RPC_ENDPOINT = "https://devnet.helius-rpc.com/?api-key=0aa5bfbe-0077-4414-9d87-02ffa09cc50b";
const RPC_ENDPOINT = "https://devnet-aura.metaplex.com/<YOUR_API_KEY>";

(async () => {
try {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/core-candy-machine/fetching-a-candy-machine.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import { fetchCandyMachine, mplCandyMachine as mplCoreCandyMachine } from "@meta
import { publicKey } from "@metaplex-foundation/umi";
import { createUmi } from "@metaplex-foundation/umi-bundle-defaults";

const mainnet = 'https://api.mainnet-beta.solana.com'
const devnet = 'https://api.devnet.solana.com'
const mainnet = "https://mainnet-aura.metaplex.com/<YOUR_API_KEY>"
const devnet = "https://devnet-aura.metaplex.com/<YOUR_API_KEY>"

const umi = createUmi(mainnet)
.use(mplCoreCandyMachine())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ In the Candy Machine Account, data such as the number of Available and Redeemed

To fetch the Candy Machine, the `fetchCandyMachine` function can be used as shown below:

We will be using the Metaplex Aura Devnet endpoint.
To gain access to the Metaplex Aura network on the Solana and Eclipse blockchains you can visit the Aura App for an endpoint and API key [here](https://aura-app.metaplex.com/).

```ts
import {
mplCandyMachine,
Expand All @@ -52,7 +55,8 @@ import {
import { createUmi } from "@metaplex-foundation/umi-bundle-defaults";

// The next two lines are only required if you did not set up umi before
const umi = createUmi("https://api.devnet.solana.com")
// We will be using Solana Devnet from Aura data network as endpoint
const umi = createUmi("https://devnet-aura.metaplex.com/<YOUR_API_KEY>")
.use(mplCandyMachine());

const candyMachineId = "Ct5CWicvmjETYXarcUVJenfz3CCh2hcrCM3CMiB8x3k9";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,17 @@ After setting up your environment, let's start by setting up umi.
While setting up Umi, you can create new wallets for testing, import wallets from you filesystem or even use `walletAdapter` with a UI/frontend.
For this example, we will be creating a Keypair from a json file (wallet.json) containing a secret key.

We will be using the devnet public API node, which is rate-limited. For large-scale use, you can find more information about RPC nodes [here](https://developers.metaplex.com/rpc-providers).
We will be using the devnet Aura endpoint.
To gain access to the Metaplex Aura network on the Solana and Eclipse blockchains you can visit the Aura App for an endpoint and API key [here](https://aura-app.metaplex.com/).

```ts
import { createUmi } from "@metaplex-foundation/umi-bundle-defaults";
import { generateSigner, some, none, createSignerFromKeypair, signerIdentity, transactionBuilder, dateTime } from "@metaplex-foundation/umi";
import { mplCandyMachine as mplCoreCandyMachine } from '@metaplex-foundation/mpl-core-candy-machine';
import * as fs from 'fs';

// We will be using Solana Devnet as endpoint, and loading the mplCoreCandyMachine plugin
const umi = createUmi("https://api.devnet.solana.com")
// We will be using Solana Devnet from the Metaplex Aura data network as the endpoint while also loading the `mplCoreCandyMachine()` plugin.
const umi = createUmi("https://devnet-aura.metaplex.com/<YOUR_API_KEY>")
.use(mplCoreCandyMachine());

// Let's create a Keypair from our wallet json file that contains a secret key, and create a signer based on the created keypair
Expand Down
2 changes: 1 addition & 1 deletion src/pages/core-candy-machine/preparing-assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ For a more indepth look at uploaded files with Umi please visit [Umi Storage.](/
import { createUmi } from '@metaplex-foundation/umi-bundle-defaults'
import { irysUploader } from '@metaplex-foundation/umi-uploader-irys'

const umi = createUmi('https://api.devnet.solana.com').use(irysUploader())
const umi = createUmi("https://devnet-aura.metaplex.com/<YOUR_API_KEY>").use(irysUploader())

const uriUploadArray = await umi.uploader.upload([myFile1, myFile2])

Expand Down
10 changes: 6 additions & 4 deletions src/pages/core/guides/create-soulbound-nft-asset.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Soulbound NFTs are non-fungible tokens that are permanently bound to a specific

In this guide, we'll explore how to create soulbound assets using MPL Core and the Umi Framework. Whether you're a developer looking to implement soulbound NFTs in TypeScript or just want to understand how they work, we'll cover everything from basic concepts to practical implementation. We'll examine different approaches for making assets soulbound and walk through creating your first soulbound NFT within a collection.

To gain access to the Metaplex Aura network on the Solana and Eclipse blockchains you can visit the Aura App for an endpoint and API key [here](https://aura-app.metaplex.com/).

In MPL Core, there are two main approaches to create soulbound NFTs:

### 1. Permanent Freeze Delegate Plugin
Expand Down Expand Up @@ -83,7 +85,7 @@ const DESTINATION_WALLET = publicKey("CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX
(async () => {
// Step 1: Initialize Umi with devnet RPC endpoint
const umi = createUmi(
"YOUR ENDPOINT"
"https://devnet-aura.metaplex.com/<YOUR_API_KEY>"
).use(mplCore());

// Step 2: Create and fund a test wallet
Expand Down Expand Up @@ -188,7 +190,7 @@ const DESTINATION_WALLET = publicKey("CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX
(async () => {
// Step 1: Initialize Umi with devnet RPC endpoint
const umi = createUmi(
"YOUR ENDPOINT"
"https://devnet-aura.metaplex.com/<YOUR_API_KEY>"
).use(mplCore());

// Step 2: Create and fund a test wallet
Expand Down Expand Up @@ -337,7 +339,7 @@ const DESTINATION_WALLET = publicKey("CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX
(async () => {
// Step 1: Initialize Umi with devnet RPC endpoint
const umi = createUmi(
"YOUR ENDPOINT"
"https://devnet-aura.metaplex.com/<YOUR_API_KEY>"
).use(mplCore());

// Step 2: Create and fund a test wallet
Expand Down Expand Up @@ -456,7 +458,7 @@ const DESTINATION_WALLET = publicKey("CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX
(async () => {
// Step 1: Initialize Umi with devnet RPC endpoint
const umi = createUmi(
"YOUR ENDPOINT"
"https://devnet-aura.metaplex.com/<YOUR_API_KEY>"
).use(mplCore());

// Step 2: Create and fund a test wallet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@ import secretKey from "/path/to/your/kepypair.json";
const turbo = TurboFactory.authenticated({
privateKey: bs58.encode(Uint8Array.from(secretKey)),
token: 'solana',
gatewayUrl: `https://api.devnet.solana.com`,
gatewayUrl: `https://devnet-aura.metaplex.com/<YOUR_API_KEY>`,
paymentServiceConfig: { url: "https://payment.ardrive.dev" },
uploadServiceConfig: { url: "https://upload.ardrive.dev" },
});
```

**Note**: In this example, we explicitly provide the `gatewayUrl`, `paymentServiceConfig`, and `uploadServiceConfig` because we want to configure the environment to work on devnet. For mainnet usage, you can leave these fields empty, and Turbo will default to the mainnet endpoints.
To gain access to the Metaplex Aura network on the Solana and Eclipse blockchains you can visit the Aura App for an endpoint and API key [here](https://aura-app.metaplex.com/).

## Upload the Metadata

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ console.log(signature)

```ts
// Create Connection
const connection = new Connection("https://api.devnet.solana.com", "confirmed",);
const connection = new Connection("https://devnet-aura.metaplex.com/<YOUR_API_KEY>", "confirmed",);

// Create your transaction
const transaction = new VersionedTransaction()
Expand All @@ -74,7 +74,7 @@ console.log(res)

```rust
// Create Connection
let rpc_client = rpc_client::RpcClient::new("https://api.devnet.solana.com".to_string());
let rpc_client = rpc_client::RpcClient::new("https://devnet-aura.metaplex.com/<YOUR_API_KEY>".to_string());

// Create your transaction
let transaction = new Transaction()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ You can place the Umi instantiation code inside or outside the code blocks, but
### Generating a New Wallet

```ts
const umi = createUmi("https://api.devnet.solana.com")
const umi = createUmi("https://devnet-aura.metaplex.com/<YOUR_API_KEY>")
.use(mplTokenMetadata())
.use(mplToolbox());

Expand Down
6 changes: 3 additions & 3 deletions src/pages/guides/javascript/how-to-create-a-solana-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ You can place the umi variable and code block either inside or outside the `crea
### Generating a New Wallet

```ts
const umi = createUmi('https://api.devnet.solana.com')
const umi = createUmi("https://devnet-aura.metaplex.com/<YOUR_API_KEY>")
.use(mplCore())
.use(irysUploader())

Expand All @@ -115,7 +115,7 @@ await umi.rpc.airdrop(umi.identity.publickey)
### Use an Existing Wallet Stored Locally

```ts
const umi = createUmi('https://api.devnet.solana.com')
const umi = createUmi("https://devnet-aura.metaplex.com/<YOUR_API_KEY>")
.use(mplTokenMetadata())
.use(mplToolbox())
.use(irysUploader())
Expand Down Expand Up @@ -330,7 +330,7 @@ import fs from 'fs'
import path from 'path'

const createAndMintTokens = async () => {
const umi = createUmi('https://api.devnet.solana.com')
const umi = createUmi("https://devnet-aura.metaplex.com/<YOUR_API_KEY>")
.use(mplTokenMetadata())
.use(irysUploader())

Expand Down
6 changes: 3 additions & 3 deletions src/pages/guides/javascript/how-to-transfer-sol-on-solana.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ This example is going to run through setting up Umi with a `generatedSigner()`.
If you wish to generate a new wallet/private key to test with you generate a new signer with `umi`.

```ts
const umi = createUmi('https://api.devnet.solana.com')
const umi = createUmi("https://devnet-aura.metaplex.com/<YOUR_API_KEY>")
.use(mplCore())
.use(irysUploader())

Expand All @@ -97,7 +97,7 @@ await umi.rpc.airdrop(umi.identity.publickey)
### Use an Existing Wallet Stored Locally

```ts
const umi = createUmi('https://api.devnet.solana.com')
const umi = createUmi("https://devnet-aura.metaplex.com/<YOUR_API_KEY>")
.use(mplToolbox())

// You will need to use fs and navigate the filesystem to
Expand Down Expand Up @@ -139,7 +139,7 @@ import { createUmi } from '@metaplex-foundation/umi-bundle-defaults'
import { base58 } from '@metaplex-foundation/umi/serializers'

const transfer = async () => {
const umi = createUmi('https://api.devnet.solana.com').use(mplToolbox())
const umi = createUmi("https://devnet-aura.metaplex.com/<YOUR_API_KEY>").use(mplToolbox())

const signer = generateSigner(umi)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import fs from 'fs'
import path from 'path'

const transferSplTokens = async () => {
const umi = createUmi('https://api.devnet.solana.com').use(mplToolbox())
const umi = createUmi("https://devnet-aura.metaplex.com/<YOUR_API_KEY>").use(mplToolbox())

// import a wallet that has the SPL Token you want to transfer
const walletFile = fs.readFileSync('./keypair.json')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ In this example the RPC url is hardcoded into the `umiStore` umi state under `sr
```ts
const useUmiStore = create<UmiState>()((set) => ({
// add your own RPC here
umi: createUmi('http://api.devnet.solana.com').use(
umi: createUmi("https://devnet-aura.metaplex.com/<YOUR_API_KEY>").use(
signerIdentity(
createNoopSigner(publicKey('11111111111111111111111111111111'))
)
Expand Down
6 changes: 3 additions & 3 deletions src/pages/token-metadata/guides/javascript/create-an-nft.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ This example is going to run through setting up Umi with a `generatedSigner()`.
### Generating a New Wallet

```ts
const umi = createUmi('https://api.devnet.solana.com')
const umi = createUmi("https://devnet-aura.metaplex.com/<YOUR_API_KEY>")
.use(mplTokenMetadata())
.use(
irysUploader({
Expand All @@ -110,7 +110,7 @@ await umi.rpc.airdrop(umi.identity.publickey)
### Use an Existing Wallet

```ts
const umi = createUmi('https://api.devnet.solana.com')
const umi = createUmi("https://devnet-aura.metaplex.com/<YOUR_API_KEY>")
.use(mplTokenMetadata())
.use(
irysUploader({
Expand Down Expand Up @@ -345,7 +345,7 @@ const createNft = async () => {
// ** Setting Up Umi **
//

const umi = createUmi('https://api.devnet.solana.com')
const umi = createUmi("https://devnet-aura.metaplex.com/<YOUR_API_KEY>")
.use(mplTokenMetadata())
.use(
irysUploader({
Expand Down