cURL
curl --request POST \
--url http://localhost:4100/v1/projects/{projectId}/gas-policies/prepare \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account": "<string>",
"family": "safe",
"agent": "<string>",
"transfer": {
"recipients": [
"<string>"
],
"maxPerActionBaseUnits": "<string>",
"maxTotalBaseUnits": "<string>"
},
"mandate": {
"validFrom": 140737488355328,
"expiresAt": 140737488355328,
"approvalExpiresAt": 140737488355328,
"salt": "<string>"
},
"gas": {
"maxPerActionWei": "<string>",
"maxTotalWei": "<string>",
"expiresAt": 140737488355328,
"chargeableOutcomesMask": 4
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account: '<string>',
family: 'safe',
agent: '<string>',
transfer: {
recipients: ['<string>'],
maxPerActionBaseUnits: '<string>',
maxTotalBaseUnits: '<string>'
},
mandate: {
validFrom: 140737488355328,
expiresAt: 140737488355328,
approvalExpiresAt: 140737488355328,
salt: '<string>'
},
gas: {
maxPerActionWei: '<string>',
maxTotalWei: '<string>',
expiresAt: 140737488355328,
chargeableOutcomesMask: 4
}
})
};
fetch('http://localhost:4100/v1/projects/{projectId}/gas-policies/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",
"environment": "test",
"chainId": 84532,
"core": "<string>",
"account": "<string>",
"family": "safe",
"review": {},
"authority": {
"mandateTerms": {},
"mandatePolicy": "<string>",
"gasPolicy": {},
"mandateId": "<string>",
"gasPolicyId": "<string>",
"combinedDigest": "<string>"
},
"signing": {
"family": "safe",
"method": "eth_signTypedData_v4",
"typedData": {
"domain": {},
"types": {},
"primaryType": "<string>",
"message": {}
},
"expectedHash": "<string>",
"digest": "<string>",
"signatureFormat": "safe_threshold"
},
"submission": {
"to": "<string>",
"functionName": "createMandateWithGas"
}
}{
"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 policiesprepare
cURL
curl --request POST \
--url http://localhost:4100/v1/projects/{projectId}/gas-policies/prepare \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account": "<string>",
"family": "safe",
"agent": "<string>",
"transfer": {
"recipients": [
"<string>"
],
"maxPerActionBaseUnits": "<string>",
"maxTotalBaseUnits": "<string>"
},
"mandate": {
"validFrom": 140737488355328,
"expiresAt": 140737488355328,
"approvalExpiresAt": 140737488355328,
"salt": "<string>"
},
"gas": {
"maxPerActionWei": "<string>",
"maxTotalWei": "<string>",
"expiresAt": 140737488355328,
"chargeableOutcomesMask": 4
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account: '<string>',
family: 'safe',
agent: '<string>',
transfer: {
recipients: ['<string>'],
maxPerActionBaseUnits: '<string>',
maxTotalBaseUnits: '<string>'
},
mandate: {
validFrom: 140737488355328,
expiresAt: 140737488355328,
approvalExpiresAt: 140737488355328,
salt: '<string>'
},
gas: {
maxPerActionWei: '<string>',
maxTotalWei: '<string>',
expiresAt: 140737488355328,
chargeableOutcomesMask: 4
}
})
};
fetch('http://localhost:4100/v1/projects/{projectId}/gas-policies/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",
"environment": "test",
"chainId": 84532,
"core": "<string>",
"account": "<string>",
"family": "safe",
"review": {},
"authority": {
"mandateTerms": {},
"mandatePolicy": "<string>",
"gasPolicy": {},
"mandateId": "<string>",
"gasPolicyId": "<string>",
"combinedDigest": "<string>"
},
"signing": {
"family": "safe",
"method": "eth_signTypedData_v4",
"typedData": {
"domain": {},
"types": {},
"primaryType": "<string>",
"message": {}
},
"expectedHash": "<string>",
"digest": "<string>",
"signatureFormat": "safe_threshold"
},
"submission": {
"to": "<string>",
"functionName": "createMandateWithGas"
}
}{
"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.
Path Parameters
Body
application/json
Pattern:
^0x[0-9a-fA-F]{40}$family
Option 1 · enum<string>Option 2 · enum<string>Option 3 · enum<string>Option 4 · enum<string>
required
Available options:
safe 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
Response
Default Response
Available options:
test Available options:
84532 Pattern:
^0x[0-9a-fA-F]{40}$Pattern:
^0x[0-9a-fA-F]{40}$family
Option 1 · enum<string>Option 2 · enum<string>Option 3 · enum<string>Option 4 · enum<string>
required
Available options:
safe Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes