JustaName
API ReferenceSDK Reference
API Reference
API Reference
  • Overview
  • API reference
    • Siwe
      • Request challenge
      • Verify message
      • Mapp
        • Add permission
        • Append field
        • Revoke permission
    • Subname
      • Accept
      • Reserve
      • Add
      • Update
      • Revoke
      • Reject
      • Subname
      • Ens
      • Address
      • Records
      • Available
      • Search
      • Ens list
    • Primary name
      • Address
      • Set primary name
  • Specification
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. API reference
  2. Siwe
  3. Mapp

Append field

PreviousAdd permissionNextRevoke permission

Was this helpful?

Request a challenge to append mApp field

post

Request a challenge to append mApp field.

Body
domainstringRequired

Domain name

Example: justaname
addressstringRequired

Address

Example: 0x1234567890123456789012345678901234567890
originstringRequired

Origin

Example: https://justaname.id
chainIdnumberRequired

Chain id, we only support Ethereum Mainnet and Sepolia Testnet (1 for mainnet, 11155111 for sepolia)

Example: 11155111
ttlnumberOptional

Time to Live (TTL) in milliseconds (ms), default is 2 minutes (2 * 60 * 1000 = 120000 ms)

Default: 120000Example: 120000
subnamestringRequired

Subname requesting the mApp Permission

Example: test.justan.id
mAppstringRequired

Subname requesting the mApp Permission

Example: justan.id
Responses
201
The challenge was requested successfully.
application/json
post
POST /ens/v1/siwe/mapp/append-field HTTP/1.1
Host: api.justaname.id
Content-Type: application/json
Accept: */*
Content-Length: 189

{
  "domain": "justaname",
  "address": "0x1234567890123456789012345678901234567890",
  "origin": "https://justaname.id",
  "chainId": "11155111",
  "ttl": 120000,
  "subname": "test.justan.id",
  "mApp": "justan.id"
}
201

The challenge was requested successfully.

{
  "statusCode": 200,
  "result": {
    "data": {
      "challenge": "domain wants you to sign in with your Ethereum account:\nAddress\n\nPlease sign this message to verify that you want to add/update your subdomain provided by justawallet to your account Address using JustAName\n\nURI: uri\nVersion: 1\nChain ID: ChainId\nNonce: nonce\nIssued At: Date\nExpiration Time: Date"
    },
    "error": "text"
  }
}