Skip to content

Instantly share code, notes, and snippets.

@andywer
Last active March 17, 2021 16:02
Show Gist options
  • Save andywer/1984a241e7394684dfde093811f42320 to your computer and use it in GitHub Desktop.
Save andywer/1984a241e7394684dfde093811f42320 to your computer and use it in GitHub Desktop.
SEP-7 Stellar URI extension / custom types

New / Custom SEP-7 URI Types

WHOIS (vendor prefixed)

Stellar URI type to request another party's public key. Can optionally be signed with a HMAC using a secret nonce to protect the response (the data submitted to the callback endpoint) against man-in-the-middle attacks.

web+stellar+solarwallet.io:whois?callback=url:<href>[&secret=<nonce>][&msg][&network_passphrase][&origin_domain][&signature]

The callback parameter is mandatory and must reference an endpoint that accepts the following callback request:

  • POST request
  • pubkey: Public key to share
  • hmac: SHA256-HMAC of this HTTP request body using the secret nonce, set iff the secret parameter is present
POST <path(callback)>
Authorization: STELLAR-HMAC-SHA256 <base64(hmac)>
Content-Type: application/x-www-form-urlencoded

?pubkey=<pubkey>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment