0

Hi i using openbook sdk to open order on it and this required owner as Account type with secret and public keys can you help me to get this?

 const s = await market.placeOrder(connection, {
      owner: // Here !!! ,
      payer: publicKey,
      side: sidebarForm.tab === "buy" ? "buy" : "sell",
      price: sidebarForm.limit_price,
      size: sidebarForm.amount,
      orderType: "limit", // 'limit', 'ioc', 'postOnly'
    });

1 Answer 1

1

The wallet adapter is meant to be used by frontends, they do not give you access to the private key of the connected wallet. However, they allow you to send an unsigned transaction to the wallet using signTransaction, the wallet then prompts the transaction to the user who can sign it. Then the wallet would return the signed transaction to the frontend.

In your case, if you are building a frontend, you need to build the transaction using the Anchor IDL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.