Create @solana/offchain-message
for signing and verifying offchain messages
#33
Labels
enhancement
New feature or request
Motivation
There's a protocol for signing non-transaction messages. Let's create
@solana/offchain-message
helpers to sign and verify messages with modernCryptoKeys
.Example use case
Details
We can argue in the PR whether
publicKey
should be aCryptoKey
or anAddress
, whether the return type ofgetOffchainMessageSignature()
should beUint8Array
orSignature
, but preferably not thatmessage
should be astring
. Each decision that gets us further from JS primitives trades ergonomics for added dependencies.The use case above is also missing details about configuring the message version, the application domain. Also, the decision needs to be made whether to auto-determine the message format or allow the user to explicitly choose a format then validate that the message conforms to the choice. Lots to chew on here.
Related Rust CLI PR: solana-labs/solana#27456
The text was updated successfully, but these errors were encountered: