POST /api/v1/smart-accounts/onboarding-challenges
Request body
| Field | Type | Details | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
owner | value required | |||||||||||||||||||
address | value required | |||||||||||||||||||
manifestId | string required | |||||||||||||||||||
nonce | value required | |||||||||||||||||||
issuedAt | integer required | No more than 30 seconds ahead of server time. | ||||||||||||||||||
expiresAt | integer required | Future Unix seconds, after issuedAt and no more than 300 seconds later. | ||||||||||||||||||
grant | object required | Browser-selected lowercase UUID v4 and distinct browser API key. Scopes must be exactly read, plan, relay in that order; no onchain signing or spending authority.Fields
|
JSON schema
{
"type": "object",
"properties": {
"owner": {
"allOf": [
{
"$ref": "#/components/schemas/Address"
},
{
"not": {
"enum": [
"0x0000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000001"
]
}
}
]
},
"address": {
"allOf": [
{
"$ref": "#/components/schemas/Address"
},
{
"not": {
"enum": [
"0x0000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000001"
]
}
}
]
},
"manifestId": {
"type": "string",
"pattern": "^[a-zA-Z0-9:_-]{1,192}$"
},
"nonce": {
"allOf": [
{
"$ref": "#/components/schemas/Hash"
},
{
"not": {
"const": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
}
]
},
"issuedAt": {
"$ref": "#/components/schemas/UnixSeconds",
"description": "No more than 30 seconds ahead of server time."
},
"expiresAt": {
"$ref": "#/components/schemas/UnixSeconds",
"description": "Future Unix seconds, after issuedAt and no more than 300 seconds later."
},
"grant": {
"$ref": "#/components/schemas/SmartOnboardingGrant"
}
},
"required": [
"owner",
"address",
"manifestId",
"nonce",
"issuedAt",
"expiresAt",
"grant"
],
"additionalProperties": false,
"description": "Public read for one canonically deployed sole-owner Base Safe without spending sessions. Owner, wallet and browser key must be distinct. All fields are required; unknown fields are rejected. This read neither enrolls an account nor consumes the nonce."
}Response 200
| Field | Type | Details | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
state | object required | Fields
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
digest | string required | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
typedData | object required | Fields
|
JSON schema
{
"type": "object",
"properties": {
"state": {
"$ref": "#/components/schemas/SmartAccountState"
},
"digest": {
"$ref": "#/components/schemas/Hash"
},
"typedData": {
"type": "object",
"properties": {
"domain": {
"type": "object",
"properties": {
"name": {
"type": "string",
"const": "Juicebox Center Account Setup"
},
"version": {
"type": "string",
"const": "1"
},
"chainId": {
"type": "integer",
"const": 8453
},
"verifyingContract": {
"$ref": "#/components/schemas/Address"
},
"salt": {
"$ref": "#/components/schemas/Hash"
}
},
"required": [
"name",
"version",
"chainId",
"verifyingContract",
"salt"
],
"additionalProperties": false
},
"primaryType": {
"type": "string",
"const": "SetupAccount"
},
"types": {
"type": "object",
"const": {
"SetupAccount": [
{
"name": "accountId",
"type": "string"
},
{
"name": "owner",
"type": "address"
},
{
"name": "manifestId",
"type": "string"
},
{
"name": "manifestRevision",
"type": "bytes32"
},
{
"name": "initializerHash",
"type": "bytes32"
},
{
"name": "stateHash",
"type": "bytes32"
},
{
"name": "nonce",
"type": "bytes32"
},
{
"name": "issuedAt",
"type": "uint64"
},
{
"name": "expiresAt",
"type": "uint64"
},
{
"name": "grantId",
"type": "string"
},
{
"name": "botAddress",
"type": "address"
},
{
"name": "scopes",
"type": "string[]"
},
{
"name": "grantExpiresAt",
"type": "uint64"
},
{
"name": "label",
"type": "string"
}
]
}
},
"message": {
"type": "object",
"properties": {
"accountId": {
"$ref": "#/components/schemas/AccountId"
},
"owner": {
"allOf": [
{
"$ref": "#/components/schemas/Address"
},
{
"not": {
"enum": [
"0x0000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000001"
]
}
}
]
},
"manifestId": {
"type": "string",
"pattern": "^[a-zA-Z0-9:_-]{1,192}$"
},
"manifestRevision": {
"$ref": "#/components/schemas/Hash"
},
"initializerHash": {
"$ref": "#/components/schemas/Hash"
},
"stateHash": {
"$ref": "#/components/schemas/Hash"
},
"nonce": {
"allOf": [
{
"$ref": "#/components/schemas/Hash"
},
{
"not": {
"const": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
}
]
},
"issuedAt": {
"type": "string",
"pattern": "^(?:0|9007199254740991|[1-9][0-9]{0,14}|[1-8][0-9]{15}|900[0-6][0-9]{12}|90070[0-9]{11}|90071[0-8][0-9]{10}|900719[0-8][0-9]{9}|9007199[0-1][0-9]{8}|90071992[0-4][0-9]{7}|900719925[0-3][0-9]{6}|9007199254[0-6][0-9]{5}|90071992547[0-3][0-9]{4}|9007199254740[0-8][0-9]{2}|90071992547409[0-8][0-9]{1}|9007199254740990[0-9]{0})$",
"description": "Typed-data uint64 serialized as a decimal string. Request timestamps use JSON integers in Unix seconds."
},
"expiresAt": {
"type": "string",
"pattern": "^(?:0|9007199254740991|[1-9][0-9]{0,14}|[1-8][0-9]{15}|900[0-6][0-9]{12}|90070[0-9]{11}|90071[0-8][0-9]{10}|900719[0-8][0-9]{9}|9007199[0-1][0-9]{8}|90071992[0-4][0-9]{7}|900719925[0-3][0-9]{6}|9007199254[0-6][0-9]{5}|90071992547[0-3][0-9]{4}|9007199254740[0-8][0-9]{2}|90071992547409[0-8][0-9]{1}|9007199254740990[0-9]{0})$",
"description": "Typed-data uint64 serialized as a decimal string. Request timestamps use JSON integers in Unix seconds."
},
"grantId": {
"type": "string",
"format": "uuid",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"botAddress": {
"allOf": [
{
"$ref": "#/components/schemas/Address"
},
{
"not": {
"enum": [
"0x0000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000001"
]
}
}
]
},
"scopes": {
"type": "array",
"const": [
"read",
"plan",
"relay"
]
},
"grantExpiresAt": {
"type": "string",
"pattern": "^(?:0|9007199254740991|[1-9][0-9]{0,14}|[1-8][0-9]{15}|900[0-6][0-9]{12}|90070[0-9]{11}|90071[0-8][0-9]{10}|900719[0-8][0-9]{9}|9007199[0-1][0-9]{8}|90071992[0-4][0-9]{7}|900719925[0-3][0-9]{6}|9007199254[0-6][0-9]{5}|90071992547[0-3][0-9]{4}|9007199254740[0-8][0-9]{2}|90071992547409[0-8][0-9]{1}|9007199254740990[0-9]{0})$",
"description": "Typed-data uint64 serialized as a decimal string. Request timestamps use JSON integers in Unix seconds."
},
"label": {
"type": "string",
"pattern": "^[^\\u0000-\\u001f\\u007f]*$",
"x-maxUtf8Bytes": 120
}
},
"required": [
"accountId",
"owner",
"manifestId",
"manifestRevision",
"initializerHash",
"stateHash",
"nonce",
"issuedAt",
"expiresAt",
"grantId",
"botAddress",
"scopes",
"grantExpiresAt",
"label"
],
"additionalProperties": false
}
},
"required": [
"domain",
"primaryType",
"types",
"message"
],
"additionalProperties": false
}
},
"required": [
"state",
"digest",
"typedData"
],
"additionalProperties": false
}