metaplex-foundation / js

A JavaScript SDK for interacting with Metaplex's programs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Any way to make the { payer } be a publicKey

kevinfaveri opened this issue · comments

I found a workaround for this already, but my use case is the following: want to use the transaction builder to generate the txn on the BE and then send to the FE the partially signed txn so that the payer will be the public key on the FE.

Currently, transaction builder expects a payer of type Signer, as it does sign on itself. Would be cool to have a feature where you can just build the transaction, and then set the payer, but don't sign the transaction in advance inside the builder algorithm.

For now, I have been using this:

 let metaplex = Metaplex.make(connection)
      .use(walletAdapterIdentity({
        publicKey: new PublicKey("..."),
        signTransaction: async (tx) => tx
      }));

For now, I have been using this:

 let metaplex = Metaplex.make(connection)
      .use(walletAdapterIdentity({
        publicKey: new PublicKey("..."),
        signTransaction: async (tx) => tx
      }));

Yep. I have been doing the same. Thanks for sharing tho! Would be nice to have the library supporting this use case tho.

Hi there, using a "noop" signer is expected here to ensure proper typing on the SDK.

I've taken that into consideration in the new JS Solana client framework I'm building by providing a createNoopSigner helper method.