I'm creating a n umi instance and can't find info on how to define the mySigner const to use in creating the instance. Here's what I got.
import { createUmi } from "@metaplex-foundation/umi-bundle-defaults";
import { mplCandyMachine } from "@metaplex-foundation/mpl-candy-machine";
import { publicKey, signerIdentity, KeypairSigner } from "@metaplex-foundation/umi";
const mySigner = ???;
// Use the RPC endpoint of your choice.
export const umi = createUmi(endpoint)
.use(signerIdentity(mySigner))
.use(mplCandyMachine());
thank you, in advanced.
It depends on what you want to use. There are different options:
This results in a newly generated keypair:
you can also import a keypair like this:
If you want to use a wallet (like phantom, backback, Solflare) you should use the normal wallet adapter:
while this creates a dummy Signer based on a public key. (Attention: it can not actually sign but is only a helper
You can find more info on the signer topic in the umi readme.