stacks-blockchain-api
stacks-blockchain-api copied to clipboard
Param `signer_key` should work without `0x` prefix
The /extended/v2/pox/cycles/:cycle_number/signers/:signer_key/stackers endpoint (docs) requires the signer key to be provided with a 0x prefix. To match the behavior in other Hiro tools when dealing with hex-encoded strings, such as Stacks.js, the API would accept a hex-encoded string without the 0x prefix.
While investigating, it seems this endpoint already supports the signer key being provided with or without the 0x prefix.
https://github.com/hirosystems/stacks-blockchain-api/blob/32f879f7e934d26b35f869c549a096b4b2fa5af2/src/datastore/pg-store-v2.ts#L891
This may just be an issue of documentation needing a small update to advertise this