cURL
curl --request POST \
--url http://localhost:4100/v1/mandate-requests/{id}/transaction \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"transactionHash": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({transactionHash: '<string>'})
};
fetch('http://localhost:4100/v1/mandate-requests/{id}/transaction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"schemaVersion": 1,
"id": "<string>",
"status": "pending",
"intent": {
"schemaVersion": 1,
"kind": "mandate.gas-policy.approve",
"chainId": 84532,
"agentAddress": "<string>",
"recipients": [
"<string>"
],
"maxPerActionBaseUnits": "<string>",
"maxTotalBaseUnits": "<string>",
"maxGasPerActionWei": "<string>",
"maxGasTotalWei": "<string>",
"expiresAt": 2,
"idempotencyKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"account": {
"id": "<string>",
"address": "<string>",
"chainId": 84532
},
"agent": {
"id": "<string>",
"address": "<string>"
},
"preparation": {
"schemaVersion": 1,
"preparationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requestId": "<string>",
"intentHash": "<string>",
"preparedAt": "2023-11-07T05:31:56Z",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"prepared": {
"draftId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"draftExpiresAt": "2023-11-07T05:31:56Z",
"environment": "test",
"chainId": 84532,
"core": "<string>",
"account": "<string>",
"family": "safe",
"review": {
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contractProjectId": "<string>",
"agent": "<string>",
"asset": "<string>",
"assetDecimals": 6,
"recipients": [
"<string>"
],
"maxPerActionBaseUnits": "<string>",
"maxTotalBaseUnits": "<string>",
"relayerMode": "gol",
"submitter": "<string>",
"gasRecipient": "<string>",
"attester": "<string>",
"maxGasPerActionWei": "<string>",
"maxGasTotalWei": "<string>",
"chargeableOutcomesMask": 1,
"maxDepth": 1,
"maxActiveDescendants": 1,
"mandateValidFrom": 1,
"mandateExpiresAt": 1,
"gasExpiresAt": 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>",
"gasPolicy": {
"mandateId": "<string>",
"account": "<string>",
"projectId": "<string>",
"accountProfileId": "<string>",
"installEpoch": "<string>",
"feeAsset": "<string>",
"submitter": "<string>",
"recipient": "<string>",
"attester": "<string>",
"maxPerAction": "<string>",
"maxTotal": "<string>",
"expiresAt": 1,
"chargeableOutcomes": 1,
"formulaVersion": 1,
"nonce": "<string>"
},
"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"
}
}
},
"confirmation": {
"gasPolicyId": "<string>",
"mandateId": "<string>",
"account": "<string>",
"family": "safe",
"agent": "<string>",
"status": "active",
"maxPerActionWei": "<string>",
"maxTotalWei": "<string>",
"spentWei": "<string>",
"remainingWei": "<string>",
"expiresAt": 123,
"chargeableOutcomesMask": 123,
"recipient": "<string>",
"attester": "<string>",
"relayerMode": "gol",
"submitter": "<string>",
"formulaVersion": 123,
"maxDepth": 123,
"maxActiveDescendants": 123,
"activeDescendants": 123,
"approvalTransactionHash": "<string>",
"revocationTransactionHash": "<string>",
"observedBlockNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"transactionHash": "<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>"
}
}Canonical mandate requests
Post v1mandate requests transaction
Owning browser only. Transaction hash is an observation hint. Successful independently verified on-chain approval alone establishes confirmed status.
cURL
curl --request POST \
--url http://localhost:4100/v1/mandate-requests/{id}/transaction \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"transactionHash": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({transactionHash: '<string>'})
};
fetch('http://localhost:4100/v1/mandate-requests/{id}/transaction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"schemaVersion": 1,
"id": "<string>",
"status": "pending",
"intent": {
"schemaVersion": 1,
"kind": "mandate.gas-policy.approve",
"chainId": 84532,
"agentAddress": "<string>",
"recipients": [
"<string>"
],
"maxPerActionBaseUnits": "<string>",
"maxTotalBaseUnits": "<string>",
"maxGasPerActionWei": "<string>",
"maxGasTotalWei": "<string>",
"expiresAt": 2,
"idempotencyKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"account": {
"id": "<string>",
"address": "<string>",
"chainId": 84532
},
"agent": {
"id": "<string>",
"address": "<string>"
},
"preparation": {
"schemaVersion": 1,
"preparationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requestId": "<string>",
"intentHash": "<string>",
"preparedAt": "2023-11-07T05:31:56Z",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"prepared": {
"draftId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"draftExpiresAt": "2023-11-07T05:31:56Z",
"environment": "test",
"chainId": 84532,
"core": "<string>",
"account": "<string>",
"family": "safe",
"review": {
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contractProjectId": "<string>",
"agent": "<string>",
"asset": "<string>",
"assetDecimals": 6,
"recipients": [
"<string>"
],
"maxPerActionBaseUnits": "<string>",
"maxTotalBaseUnits": "<string>",
"relayerMode": "gol",
"submitter": "<string>",
"gasRecipient": "<string>",
"attester": "<string>",
"maxGasPerActionWei": "<string>",
"maxGasTotalWei": "<string>",
"chargeableOutcomesMask": 1,
"maxDepth": 1,
"maxActiveDescendants": 1,
"mandateValidFrom": 1,
"mandateExpiresAt": 1,
"gasExpiresAt": 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>",
"gasPolicy": {
"mandateId": "<string>",
"account": "<string>",
"projectId": "<string>",
"accountProfileId": "<string>",
"installEpoch": "<string>",
"feeAsset": "<string>",
"submitter": "<string>",
"recipient": "<string>",
"attester": "<string>",
"maxPerAction": "<string>",
"maxTotal": "<string>",
"expiresAt": 1,
"chargeableOutcomes": 1,
"formulaVersion": 1,
"nonce": "<string>"
},
"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"
}
}
},
"confirmation": {
"gasPolicyId": "<string>",
"mandateId": "<string>",
"account": "<string>",
"family": "safe",
"agent": "<string>",
"status": "active",
"maxPerActionWei": "<string>",
"maxTotalWei": "<string>",
"spentWei": "<string>",
"remainingWei": "<string>",
"expiresAt": 123,
"chargeableOutcomesMask": 123,
"recipient": "<string>",
"attester": "<string>",
"relayerMode": "gol",
"submitter": "<string>",
"formulaVersion": 123,
"maxDepth": 123,
"maxActiveDescendants": 123,
"activeDescendants": 123,
"approvalTransactionHash": "<string>",
"revocationTransactionHash": "<string>",
"observedBlockNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"transactionHash": "<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>"
}
}Authorizations
Response
Canonical mandate request.