Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Possible Payloads

Each response may have one or more of the following signed payloads.

Login

The signature is generated by signing the UTF-8 bytes of payload.message using SR25519.

See Response Payloads: Login for more details.

Example

Sr25519

Example is signed using f6akufkq9Lex6rT8RCEDRuoZQRgo5pWiRzeo81nmKNGWGNJdJ which is the SS58 (Prefix 90) public key from the seed phrase //Bob.

{
  "signature": {
    "algo": "SR25519",
    "encoding": "base16",
    "encodedValue": "0x84a4e03344b07d64087ebdf47b2c8c679aa7de78179689988992609f1b83c34f6086c7de99ef41c5325cce64d148624e716c605d355f22d1281f6d23f546f584"
  },
  "type": "login",
  "payload": {
    "message": "localhost wants you to sign in with your Frequency account:\nf6akufkq9Lex6rT8RCEDRuoZQRgo5pWiRzeo81nmKNGWGNJdJ\n\n\n\nURI: https://testnet.frequencyaccess.com/signin/confirm\nNonce: N6rLwqyz34oUxJEXJ\nIssued At: 2024-03-05T23:18:03.041Z\nExpiration Time: 2060-03-05T23:23:03.041Z"
  }
}

Secp256k1

Example is signed using 0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac which is the Ethereum Address for the secret key 0x5fb92d6e98884f76de468fa3f6278f8807c48bebc13595d45af5bdc4da702133.

{
  "signature": {
    "algo": "SECP256K1",
    "encoding": "base16",
    "encodedValue": "0xcab76cd70bcd911681fd37b060285514a6ca101981d997ff07358acfaeb3030b333a4f50b554a97a0e497ff63303766599508a74f063b4360ad9a8855c0b2c521c"
  },
  "type": "login",
  "payload": {
    "message": "localhost wants you to sign in with your Frequency account:\nf6akufkq9Lex6rT8RCEDRuoZQRgo5pWiRzeo81nmKNGWGNJdJ\n\n\n\nURI: https://testnet.frequencyaccess.com/signin/confirm\nNonce: N6rLwqyz34oUxJEXJ\nIssued At: 2024-03-05T23:18:03.041Z\nExpiration Time: 2060-03-05T23:23:03.041Z"
  }
}

Add Provider

This payload follows the AddProvider type from Frequency. It has the same payload for two different endpoint extrinsics: createSponsoredAccountWithDelegation used for creating a new MSA on chain and grantDelegation which is used to grant a new provider permissions on an existing MSA.

Example

Sr25519

Example is signed using f6akufkq9Lex6rT8RCEDRuoZQRgo5pWiRzeo81nmKNGWGNJdJ which is the SS58 (Prefix 90) public key from the seed phrase //Bob. The signature is generated by signing the SCALE-encoded payload using SR25519.

{
  "signature": {
    "algo": "SR25519",
    "encoding": "base16",
    "encodedValue": "0x94156d570b29e9c4e3a04eefbff56439f40de7fb6bdba1ca31e9017b55e5e773f747d0ab4f0fc2b44ca903aa8fb641f227fac395e74bb1d837d07cfa70fa1e80"
  },
  "endpoint": {
    "pallet": "msa",
    "extrinsic": "grantDelegation"
  },
  "type": "addProvider",
  "payload": {
    "authorizedMsaId": 1,
    "schemaIds": [
      5,
      7,
      8,
      9,
      10
    ],
    "expiration": 24
  }
}
SCALE Payload Type
{
  authorizedMsaId: 'u64',
  schemaIds: 'Vec<u16>',
  expiration: 'u32',
}

Secp256k1

Example is signed using 0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac which is the Ethereum Address for the secret key 0x5fb92d6e98884f76de468fa3f6278f8807c48bebc13595d45af5bdc4da702133.

{
  "signature": {
    "algo": "SECP256K1",
    "encoding": "base16",
    "encodedValue": "0xb3e41e53373649d089455965791c47f695f519eb21bd322febf04bd05f2b50b72c395c4490ac6cd0d108d0a77f625aea8b1f0096befc359936669d620f5aad7e1c"
  },
  "endpoint": {
    "pallet": "msa",
    "extrinsic": "grantDelegation"
  },
  "type": "addProvider",
  "payload": {
    "authorizedMsaId": 1,
    "schemaIds": [
      5,
      7,
      8,
      9,
      10
    ],
    "expiration": 24
  }
}

Claim Handle

This payload follows the ClaimHandlePayload type from Frequency.

Example

Sr25519

The signature is generated by signing the SCALE-encoded payload using SR25519. Example is signed using f6akufkq9Lex6rT8RCEDRuoZQRgo5pWiRzeo81nmKNGWGNJdJ which is the SS58 (Prefix 90) public key from the seed phrase //Bob.

{
  "signature": {
    "algo": "SR25519",
    "encoding": "base16",
    "encodedValue": "0xc8c7587ef80b6bd64295d63b69f97196a9a0b635bd8f1974156d7e3c7206134bb9838d29978a2f91c18a6592aff180f2314db7528b6aac796f0073d758406e81"
  },
  "endpoint": {
    "pallet": "handles",
    "extrinsic": "claimHandle"
  },
  "type": "claimHandle",
  "payload": {
    "baseHandle": "ExampleHandle",
    "expiration": 24
  }
}

SCALE Payload Type

{
  baseHandle: 'Bytes',
  expiration: 'u32',
}

Secp256k1

Example is signed using 0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac which is the Ethereum Address for the secret key 0x5fb92d6e98884f76de468fa3f6278f8807c48bebc13595d45af5bdc4da702133.

{
  "signature": {
    "algo": "SECP256K1",
    "encoding": "base16",
    "encodedValue": "0xeaa194e6f0074d777633522370fc0f74b200d933e1f1219bc8379ace1fb42759463e7b71d796abf839f2c1f78ecd0af4872010300afac4fbdb44d584c4686e041b"
  },
  "endpoint": {
    "pallet": "handles",
    "extrinsic": "claimHandle"
  },
  "type": "claimHandle",
  "payload": {
    "baseHandle": "ExampleHandle",
    "expiration": 24
  }
}

User Item Actions

This payload follows the ItemizedSignaturePayloadV2 type from Frequency.

Example

Sr25519

The signature is generated by signing the SCALE-encoded payload using SR25519. Example is signed using f6akufkq9Lex6rT8RCEDRuoZQRgo5pWiRzeo81nmKNGWGNJdJ which is the SS58 (Prefix 90) public key from the seed phrase //Bob.

{
  "signature": {
    "algo": "SR25519",
    "encoding": "base16",
    "encodedValue": "0x86bdd46a5f91ed3f259374f5856fdc48ee00b8eced10eecd05af8d7637c51d17df6252f617feacbce1cf91cc57ca036c69773ab9b0c31d6843344704b4fb898d"
  },
  "endpoint": {
    "pallet": "statefulStorage",
    "extrinsic": "applyItemActionsWithSignatureV2"
  },
  "type": "itemActions",
  "payload": {
    "schemaId": 7,
    "targetHash": 0,
    "expiration": 20,
    "actions": [
      {
        "type": "addItem",
        "payloadHex": "0x40eea1e39d2f154584c4b1ca8f228bb49ae5a14786ed63c90025e755f16bd58d37"
      }
    ]
  }
}

SCALE Payload Types

{
  PalletStatefulStorageItemActionEnumAdd: {
    data: 'Bytes',
  },
  PalletStatefulStorageItemActionEnumDelete: {
    index: 'u16',
  },
  PalletStatefulStorageItemAction: {
    _enum: {
      Add: '<PalletStatefulStorageItemActionEnumAdd>',
      Delete: '<PalletStatefulStorageItemActionEnumDelete>',
    },
  },
  PalletStatefulStorageItemizedSignaturePayloadV2: {
    schemaId: 'Compact<u16>',
    targetHash: 'Compact<u32>',
    expiration: 'u32',
    actions: 'Vec<PalletStatefulStorageItemAction>',
  },
}

Secp256k1

Example is signed using 0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac which is the Ethereum Address for the secret key 0x5fb92d6e98884f76de468fa3f6278f8807c48bebc13595d45af5bdc4da702133.

{
  "signature": {
    "algo": "SECP256K1",
    "encoding": "base16",
    "encodedValue": "0xfd1d273752f6494cf64bc7091b37fce35f1bdd861b676c7f5ee392675453764f2e322797b6a5f676e6716738c5ba8fabe82de83dbe5bf9d9e771ef717ff036241c"
  },
  "endpoint": {
    "pallet": "statefulStorage",
    "extrinsic": "applyItemActionsWithSignatureV2"
  },
  "type": "itemActions",
  "payload": {
    "schemaId": 7,
    "targetHash": 0,
    "expiration": 20,
    "actions": [
      {
        "type": "addItem",
        "payloadHex": "0x40eea1e39d2f154584c4b1ca8f228bb49ae5a14786ed63c90025e755f16bd58d37"
      }
    ]
  }
}