cURL
curl --request POST \
--url http://localhost:4100/v1/projects/{projectId}/gas-policies/{gasPolicyId}/children/prepare \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent": "<string>",
"transfer": {
"recipients": [
"<string>"
],
"maxPerActionBaseUnits": "<string>",
"maxTotalBaseUnits": "<string>"
},
"mandate": {
"validFrom": 140737488355328,
"expiresAt": 140737488355328,
"approvalExpiresAt": 140737488355328,
"salt": "<string>"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent: '<string>',
transfer: {
recipients: ['<string>'],
maxPerActionBaseUnits: '<string>',
maxTotalBaseUnits: '<string>'
},
mandate: {
validFrom: 140737488355328,
expiresAt: 140737488355328,
approvalExpiresAt: 140737488355328,
salt: '<string>'
}
})
};
fetch('http://localhost:4100/v1/projects/{projectId}/gas-policies/{gasPolicyId}/children/prepare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"draftId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"draftExpiresAt": "2023-11-07T05:31:56Z",
"gasPolicyId": "<string>",
"rootMandateId": "<string>",
"parentMandateId": "<string>",
"parentAgent": "<string>",
"review": {
"agent": "<string>",
"recipients": [
"<string>"
],
"maxPerActionBaseUnits": "<string>",
"maxTotalBaseUnits": "<string>",
"validFrom": 1,
"expiresAt": 1,
"depth": 1,
"maxDepth": 1,
"maxActiveDescendants": 1
},
"authority": {
"mandateTerms": {
"parentId": "<string>",
"account": "<string>",
"agent": "<string>",
"accountProfileId": "<string>",
"installEpoch": "<string>",
"projectId": "<string>",
"mode": 1,
"policyVersion": 1,
"policyHash": "<string>",
"validFrom": 1,
"expiresAt": 1,
"maxDepth": 1,
"maxActiveDescendants": 1,
"approvalExpiresAt": 1,
"salt": "<string>"
},
"mandatePolicy": "<string>",
"mandateId": "<string>"
},
"signing": {
"signer": "<string>",
"method": "eth_signTypedData_v4",
"typedData": {
"domain": {},
"types": {},
"primaryType": "<string>",
"message": {}
},
"expectedHash": "<string>"
},
"submission": {
"to": "<string>",
"functionName": "createChildMandate"
},
"observedBlockNumber": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}gas-policies
Post v1projects gas policies childrenprepare
cURL
curl --request POST \
--url http://localhost:4100/v1/projects/{projectId}/gas-policies/{gasPolicyId}/children/prepare \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent": "<string>",
"transfer": {
"recipients": [
"<string>"
],
"maxPerActionBaseUnits": "<string>",
"maxTotalBaseUnits": "<string>"
},
"mandate": {
"validFrom": 140737488355328,
"expiresAt": 140737488355328,
"approvalExpiresAt": 140737488355328,
"salt": "<string>"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent: '<string>',
transfer: {
recipients: ['<string>'],
maxPerActionBaseUnits: '<string>',
maxTotalBaseUnits: '<string>'
},
mandate: {
validFrom: 140737488355328,
expiresAt: 140737488355328,
approvalExpiresAt: 140737488355328,
salt: '<string>'
}
})
};
fetch('http://localhost:4100/v1/projects/{projectId}/gas-policies/{gasPolicyId}/children/prepare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"draftId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"draftExpiresAt": "2023-11-07T05:31:56Z",
"gasPolicyId": "<string>",
"rootMandateId": "<string>",
"parentMandateId": "<string>",
"parentAgent": "<string>",
"review": {
"agent": "<string>",
"recipients": [
"<string>"
],
"maxPerActionBaseUnits": "<string>",
"maxTotalBaseUnits": "<string>",
"validFrom": 1,
"expiresAt": 1,
"depth": 1,
"maxDepth": 1,
"maxActiveDescendants": 1
},
"authority": {
"mandateTerms": {
"parentId": "<string>",
"account": "<string>",
"agent": "<string>",
"accountProfileId": "<string>",
"installEpoch": "<string>",
"projectId": "<string>",
"mode": 1,
"policyVersion": 1,
"policyHash": "<string>",
"validFrom": 1,
"expiresAt": 1,
"maxDepth": 1,
"maxActiveDescendants": 1,
"approvalExpiresAt": 1,
"salt": "<string>"
},
"mandatePolicy": "<string>",
"mandateId": "<string>"
},
"signing": {
"signer": "<string>",
"method": "eth_signTypedData_v4",
"typedData": {
"domain": {},
"types": {},
"primaryType": "<string>",
"message": {}
},
"expectedHash": "<string>"
},
"submission": {
"to": "<string>",
"functionName": "createChildMandate"
},
"observedBlockNumber": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Default Response
Pattern:
^0x[0-9a-fA-F]{64}$Pattern:
^0x[0-9a-fA-F]{64}$Pattern:
^0x[0-9a-fA-F]{64}$Pattern:
^0x[0-9a-fA-F]{40}$Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Pattern:
^(0|[1-9][0-9]{0,77})$