Document the Solana signing flow for marketplace offers - #692
Open
Pierre-Michard wants to merge 1 commit into
Open
Document the Solana signing flow for marketplace offers#692Pierre-Michard wants to merge 1 commit into
Pierre-Michard wants to merge 1 commit into
Conversation
The marketplace sections of the README described the AuthorizationRequest flow in StarkEx terms only, so the Solana and Base examples were undiscoverable when building offers, and nothing said where the Solana signing key comes from. - Add an "Authorization request types" table mapping each request type to its example and approval field, and cross-reference it from "Bidding on auction", "Creating offers" and "Accepting offers". - Document deriving the Solana key pair from the exported Sorare private key (SLIP-0010, m/44'/501'/0'/0'), with a new solanaKeyPair.js example. The derived address is the request's senderAddress, which is the quickest way to check the derivation. - Spell out the signed message, and the three silent failure modes: signing the string instead of the SHA-256 hash, and assuming assetId or senderAddress are part of the message. - State that @sorare/crypto is StarkEx-only. - Fix solanaTokenTransfer.js, which built a solanaBankTransferApproval. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
piedup
approved these changes
Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A developer spent 9 days blocked signing a
SolanaTokenTransferAuthorizationRequestfor aSINGLE_SALE_OFFER, and concluded the docs only covered StarkEx. Two support investigations agreed with him. They were wrong —examples/solanaTokenTransfer.jsalready documented it — but the example is unreachable from the sections a developer actually reads when building offers, and it omitted the one step he could not work out for himself: where the Solana signing key comes from.What changed
Discoverability. The README now has an "Authorization request types" section stating plainly that
prepareBid/prepareOffer/prepareAcceptOfferreturn different request types depending on the asset and payment rail, with a table mapping each type to its example file and approval field. "Bidding on auction", "Creating offers" and "Accepting offers" each point at it. The StarkEx material is untouched — it is still valid for legacy flows.The actual gap. Nothing said where the Solana key comes from. It is derived from the exported Sorare (Ethereum) private key via SLIP-0010 on
m/44'/501'/0'/0'. New exampleexamples/solanaKeyPair.jsdoes the derivation and links back to the existing private key export screenshot as the starting point. The derived address equals the request'ssenderAddress, which is documented as the fastest way to confirm a derivation before debugging signatures —solanaTokenTransfer.jsnow asserts exactly that.Failure modes. The three things that produce a well-formed but always-rejected signature are called out in both the README and the example: you sign the SHA-256 hash rather than the string;
assetIdis not in the signed message (the card ismerkleTreeAddress+leafIndex);senderAddressis not either, whiletransferProxyProgramAddressandoriginatorare. Also noted that'0x'is a literal empty data field, not a placeholder.Bug fix.
solanaTokenTransfer.jswas building asolanaBankTransferApproval— the wrong approval field for that request type.@sorare/crypto. Now stated explicitly to be StarkEx-only; the user asked this directly and the docs left it ambiguous.Verification
signature/nonce/expirationTimestamp) and the request fields checked against the GraphQL types.node --checkpasses on every example touched.solanaKeyPair.jsderives8ixw6XQW2tuZhc1xgbhh6bq6YvL5K5nXLsN9LjrzMrxqfrom the Ethereum key already used inbaseBankTransfer.js— which is exactly thesenderAddressinsolanaBankTransfer.js, so the worked example is self-consistent across the repo.micro-key-produceradded toexamples/package.json;@solana/kitstays on the^5.0.0already in use.🤖 Generated with Claude Code