Closed Stevein5280 closed 2 years ago
What is the log output? Not sure what the issue is without the specific error.
(node:1522) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
(Use node --trace-warnings ...
to show where the warning was created)
(node:1522) ExperimentalWarning: buffer.Blob is an experimental feature. This feature could change at any time
/Users/saga/Desktop/Solana-NFT-Generator/metaplex/js/node_modules/tweetnacl/nacl-fast.js:2320
throw new Error('bad secret key size');
^
Error: bad secret key size
at Function.fromSecretKey (/Users/saga/Desktop/Solana-NFT-Generator/metaplex/js/node_modules/tweetnacl/nacl-fast.js:2320:11)
at Function.fromSecretKey (/Users/saga/Desktop/Solana-NFT-Generator/metaplex/js/node_modules/@solana/web3.js/src/keypair.ts:64:39)
at loadWalletKey (/Users/saga/Desktop/Solana-NFT-Generator/metaplex/js/packages/cli/src/helpers/accounts.ts:595:26)
at Command.
And When I enter this command without the '.json' on the public_key file here is the command. I have two different files with the public key one in json and the other in plain text. .
ts-node js/packages/cli/src/candy-machine-v2-cli.ts upload \
-e devnet \
-k TWallet_Keypair/public-key \
-cp js/packages/cli/upload-config.json \
-c example \
./assets
(node:1477) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
(Use node --trace-warnings ...
to show where the warning was created)
(node:1477) ExperimentalWarning: buffer.Blob is an experimental feature. This feature could change at any time
/Users/saga/Desktop/Solana-NFT-Generator/metaplex/js/packages/cli/src/helpers/accounts.ts:596
new Uint8Array(JSON.parse(fs.readFileSync(keypair).toString())),
^
SyntaxError: Unexpected token H in JSON at position 0
at JSON.parse (
That key file has to point to the private key file. The json is invalid. You need to either regenerate it or fix it.
I appreciate it!
I regenerated a new cli keypair and then tried running the command with the new key pair.
.
metaplex % ts-node js/packages/cli/src/candy-machine-v2-cli.ts upload \
-e devnet \
-k Demo_Wallet/demo_cli_wallet.json \
-cp js/packages/cli/upload-config.json \
-c example \
./assets
wallet public key: 6QHmXLTajUQJpwmXTRoasNZHsXZnR56DHNJWLeiwgyVa
(node:3378) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
(Use node --trace-warnings ...
to show where the warning was created)
(node:3378) ExperimentalWarning: buffer.Blob is an experimental feature. This feature could change at any time
Beginning the upload for 5 (img+json) pairs
started at: 1646597989506
initializing candy machine
Error deploying config to Solana network. Error: Invalid public key input
On this one I used the private key from the phantom wallet.
.
metaplex % ts-node js/packages/cli/src/candy-machine-v2-cli.ts upload \
-e devnet \
-k Demo_Wallet/demo_private_key.json \
-cp js/packages/cli/upload-config.json \
-c example \
./assets
(node:3858) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
(Use node --trace-warnings ...
to show where the warning was created)
(node:3858) ExperimentalWarning: buffer.Blob is an experimental feature. This feature could change at any time
/Users/steveninzurriaga/Desktop/Solana-NFT-Generator/metaplex/js/node_modules/tweetnacl/nacl-fast.js:2320
throw new Error('bad secret key size');
^
Error: bad secret key size
I have the cli json file in an array how I get it and the private json file in quotations "private key address"
and here is the upload_config.json file . { "price": 0.01, "number": 5, "gatekeeper": { "gatekeeperNetwork": "ignREusXmGrscGNUesoU9mxfds9AiYTezUKex2PsZV6", "expireOnUse": true }, "solTreasuryAccount": "6QHmXLTajUQJpwmXTRoasNZHsXZnR56DHNJWLeiwgyVa", "splTokenAccount": null, "splToken": null, "goLiveDate": "03 Mar 2022 00:00:00 GMT", "endSettings": null, "whitelistMintSettings": null, "hiddenSettings": null, "storage": "nft-storage", "ipfsInfuraProjectId": null, "ipfsInfuraSecret": null, "awsS3Bucket": null, "nftStorageKey": null, "noRetainAuthority": false, "noMutable": false }
Any advice tho
This Issue has received no activity for 30 days. We will close it in 2 days, please reopen if you are still experiencing this issue.
@Stevein5280 how to use the same command to mint a token to a public solana address or airdroping the NFT in a given wallet ?
I tried to modify mint.ts and I obtained the same error. That's why I am here.
anyone found a solution for this ?
Which package is this bug report for?
other
Issue description
I'm not sure what I'm doing wrong
Command
Relevant log output
No response
Operating system
MacOS
Priority this issue should have
Medium (should be fixed soon)
Check the Docs First