Reference
Test vectors
Exact inputs and outputs, so anyone can check another implementation against this one.
Generated by the engine each time the docs are built, from fixed test keys. The on-chain program is tested against the same logic, so a vector that the engine produces is one the program accepts.
Keys
attester 1 seed 0x0b repeated 32 times public key 7v54NWdBtkjuAFJrLGsS2SXnuk8nKam81mZJeeYxVFi9
attester 2 seed 0x0c repeated 32 times public key mBKqcnGotbsSb5vNrdyhzZ5EhqZdids9QYiTRckvi7v
wallet seed 0x0e repeated 32 times public key oapfTk8FG2np1vSoGANkbijWiQApHZMFAytSdCoass9
other wallet seed 0x0f repeated 32 times public key FezWPm3UEFa4nbF76D45V3gg9eZzhSxfw3tUES1Gr3o1
mint 7e5pxK83ceXb2iWXBizF1U8MdL7C5VcVBBXpDWaYo3x1
Codes
sha256("upstream:v1|code|" + mint + "|" + platform + "|" + id + "|" + wallet), first 60 bits, Crockford base32:
| Platform | Account id | Code for the wallet above |
|---|---|---|
| twitch | 1042 | up1-HBC5-3WZR-8DFS |
| kick | 676 | up1-QRT0-VFDA-D578 |
| github | repo:2325298 | up1-Z19W-NN64-7X98 |
| youtube | UCLA_DiR1FfKNvjuUpBHmylQ | up1-07C0-YTXJ-7RTV |
The same twitch account with the other wallet gives up1-8G40-HTGE-0AQ6. A different wallet always gives a different code.
An attestation
Message, signed as UTF-8 bytes with Ed25519 by attester 1:
upstream:v1:attest|7e5pxK83ceXb2iWXBizF1U8MdL7C5VcVBBXpDWaYo3x1|twitch|1042|oapfTk8FG2np1vSoGANkbijWiQApHZMFAytSdCoass9|up1-HBC5-3WZR-8DFS|0|1760000000000
Signature (base58):
3foWSrydygubFvgDWxQNdx2LUYx5m784zWxepY52Ti5Su4DHbVqEtNSR8ETkw6mYLbJuA7RTTt4kF545Nbi3EXgw
As JSON, the bundle entry the vault and the client exchange:
{
"mint": "7e5pxK83ceXb2iWXBizF1U8MdL7C5VcVBBXpDWaYo3x1",
"platform": "twitch",
"id": "1042",
"wallet": "oapfTk8FG2np1vSoGANkbijWiQApHZMFAytSdCoass9",
"code": "up1-HBC5-3WZR-8DFS",
"epoch": 0,
"issuedAt": 1760000000000,
"attester": "7v54NWdBtkjuAFJrLGsS2SXnuk8nKam81mZJeeYxVFi9",
"signature": "3foWSrydygubFvgDWxQNdx2LUYx5m784zWxepY52Ti5Su4DHbVqEtNSR8ETkw6mYLbJuA7RTTt4kF545Nbi3EXgw"
}
Rules the vectors do not show
- The message is rejected if any field contains
|, if the code is notup1-plus three groups of four Crockford characters, or if a number has a sign or a leading zero. - Fields allowed in an account id: letters, digits and
: _ @ . / -, 1 to 64 characters. - An attestation is valid for 15 minutes after
issuedAtand not more than 60 seconds before it.