I'm trying to understand how these wallet extensions sign transactions before sending them to the blockchain. With Solana CLI, you can simply reference a keypair.json and transactions go through without the need of the fancy UI. Same thing with Sugar CLI commands. I would like to know how to do that in javascript, I'm looking for something like transaction.signer = pubkey
.
I've dug as far as this on metaplex candy machine ui repo's code, but I can't find how this wallet.signAllTransactions
work technically.