cURL
curl --request POST \
--url http://localhost:4100/v1/account/devices/threshold \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"threshold": 1
}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({threshold: 1})
};
fetch('http://localhost:4100/v1/account/devices/threshold', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"intentType": "device_add",
"userOp": {
"chainId": 8453,
"sender": "<string>",
"nonce": "<string>",
"callData": "<string>",
"signature": "0x",
"entryPoint": "<string>",
"callGasLimit": "<string>",
"verificationGasLimit": "<string>",
"preVerificationGas": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>",
"factory": null,
"factoryData": null,
"paymaster": null,
"paymasterData": null,
"paymasterVerificationGasLimit": "<string>",
"paymasterPostOpGasLimit": "<string>"
},
"userOpHash": "<string>",
"humanSummary": "<string>",
"riskReducing": true,
"instant": true,
"gasless": true
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}Account devices
Post v1accountdevicesthreshold
Returns an unsigned OwnableValidator setThreshold operation. Only a threshold of one is reachable today.
cURL
curl --request POST \
--url http://localhost:4100/v1/account/devices/threshold \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"threshold": 1
}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({threshold: 1})
};
fetch('http://localhost:4100/v1/account/devices/threshold', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"intentType": "device_add",
"userOp": {
"chainId": 8453,
"sender": "<string>",
"nonce": "<string>",
"callData": "<string>",
"signature": "0x",
"entryPoint": "<string>",
"callGasLimit": "<string>",
"verificationGasLimit": "<string>",
"preVerificationGas": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>",
"factory": null,
"factoryData": null,
"paymaster": null,
"paymasterData": null,
"paymasterVerificationGasLimit": "<string>",
"paymasterPostOpGasLimit": "<string>"
},
"userOpHash": "<string>",
"humanSummary": "<string>",
"riskReducing": true,
"instant": true,
"gasless": true
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}