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

TypeError: bundlrStorage is not a function #547

Open
NetGodFather opened this issue Mar 17, 2024 · 2 comments
Open

TypeError: bundlrStorage is not a function #547

NetGodFather opened this issue Mar 17, 2024 · 2 comments

Comments

@NetGodFather
Copy link

const web3 = require('@solana/web3.js');
const { Metaplex, keypairIdentity, bundlrStorage } = require('@metaplex-foundation/js');

const connection = new web3.Connection(web3.clusterApiUrl('devnet'));
const wallet = web3.Keypair.generate();

async function createNFT() {
    const metaplex = Metaplex.make(connection)
        .use(keypairIdentity(wallet))
        .use(bundlrStorage());

    const { nft } = await metaplex.nfts().create({
        uri: 'https://example.com/my-nft-metadata.json',
        name: 'My NFT',
        sellerFeeBasisPoints: 500, // 5%
    }).run();

    console.log(nft);
}

createNFT().catch(console.error);

Error reported:

TypeError: bundlrStorage is not a function
    at createNFT (/Users/tallone/Documents/Umi/index.js:10:14)
    at Object.<anonymous> (/Users/tallone/Documents/Umi/index.js:21:1)
    at Module._compile (node:internal/modules/cjs/loader:1378:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1437:10)
    at Module.load (node:internal/modules/cjs/loader:1212:32)
    at Module._load (node:internal/modules/cjs/loader:1028:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12)
    at node:internal/main/run_main_module:28:49
@Superlukec
Copy link

Superlukec commented Apr 20, 2024

import { Metaplex, keypairIdentity, toMetaplexFile, toBigNumber, irysStorage } from "@metaplex-foundation/js";

const METAPLEX = Metaplex.make(SOLANA_CONNECTION)
    .use(keypairIdentity(WALLET))
    .use(irysStorage({
        address: 'https://devnet.irys.xyz',
        providerUrl: QUICKNODE_RPC,
        timeout: 120000,
 }));

@anisurrahman072
Copy link

Use irysStorage instead of bundlrStorage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants