POST
/getSorobanAuthorizationEntrySignedByMpc
Build and MPC-sign the Soroban Authorization Entry for a contract call.
This endpoint prepares the Soroban authorization for require_auth paths,
including any nested sub-invocations discovered during simulation. It
returns both the base64 XDR blob(s) and a human-readable JSON
rendering of the authorization tree.
What this endpoint does:
- Builds an
InvokeHostFunction call for contract_address.function_name(args…).
- Simulates the call to collect every
require_auth on the root and sub-invocations.
- Assembles the Soroban Authorization Entry tree (root + subInvocations).
- Has the MPC signer (
account_id) sign the authorization payload(s) up to max_fee.
- Returns:
- authorization_entry_xdr: list[str] — base64 XDR of the authorization entry/entries.
- authorization_entry_json: list[str] — formatted JSON strings of the same entries.
**Notes & Requirements:
contract_address must be a valid C-address (StrKey starting with C).
- Any
address arguments must be valid G… (account) or C… (contract) StrKeys.
- Map arguments must be canonically sorted by Soroban key rules; the system normalizes order if needed.
specificFromAddress sets the identity that must satisfy require_auth(...). Use it for Hot/Cold patterns:
Cold (G…) authorizes, Hot (G…) submits.
max_fee caps the fee used during simulation and signing.
-------------------- Request --------------------
getSorobanAuthorizationEntrySignedByMpc(
account_id=42,
contract_address="CCOZ5XDWPXVYLIUCLK2YKW5RXPOWINDB2FIQBM5JUXAWLMQW5RRMELNF",
max_fee=4000000,
function_name="execute",
parameters_fields_types_and_values=[
["address", "GBCT2KLG4F4Y7A53KITD4WAM4QW5P5BPBQAFPTUEQWXIROVQU3TNEICW"]
],
structs=None,
specificFromAddress="GBCT2KLG4F4Y7A53KITD4WAM4QW5P5BPBQAFPTUEQWXIROVQU3TNEICW"
):
-------------------- Response --------------------
"FunctionData": [
{
"AuthorizationEntryJson": {
"credentials": {
"type": "SOROBAN_CREDENTIALS_SOURCE_ACCOUNT"
},
"rootInvocation": {
"function": {
"args": [
{
"address": "GAXVR37EQEIRA6DP4WE4JGPBYD4WATJPGWJQ37DEDUFRNPPCYIYLJFKG"
}
],
"contractAddress": "CC2EA6FSS7VOZ3UTITRKGVPDFLO4ZZDVO3X5TNF6UH42ZRO3RXOCJ2XL",
"functionName": "execute",
"type": "CONTRACT_FN"
},
"subInvocations": [
{
"function": {
"args": [
{
"address": "GAXVR37EQEIRA6DP4WE4JGPBYD4WATJPGWJQ37DEDUFRNPPCYIYLJFKG"
}
],
"contractAddress": "CBJTGIHEWP3KPFKJPDZ6UIEGF3BSQC2YYULHS26DZBVHNPLH5MGTTKON",
"functionName": "execute",
"type": "CONTRACT_FN"
},
"subInvocations": [
{
"function": {
"args": [
{
"i32": 1
},
{
"u32": 2
},
{
"u32": 3
}
],
"contractAddress": "CAQ52MD5CUIX6ZL7IQZX5UK3TNQT4ECJHSHCTBWV72FOCZJC5CORVEWS",
"functionName": "execute",
"type": "CONTRACT_FN"
},
"subInvocations": []
}
]
},
{
"function": {
"args": [
{
"i32": 1
},
{
"u32": 2
},
{
"u32": 3
}
],
"contractAddress": "CCQOER2JKX6AC3LBRHFPDI5BGJ4PXR257FFUIVGIODHSIRTXJ62U4LBR",
"functionName": "execute",
"type": "CONTRACT_FN"
},
"subInvocations": []
}
]
}
},
"AuthorizationEntryXdr": "AAAAAAAAAAAAAAABtEB4spfq7O6TROKjVeMq3czkdXbv2bS+ofmsxduN3CQAAAAHZXhlY3V0ZQAAAAABAAAAEgAAAAAAAAAAL1jv5IEREHhv5YnEmeHA+WBNLzWTDfxkHQsWveLCMLQAAAACAAAAAAAAAAFTMyDks/anlUl48+oghi7DKAtYxRZ5a8PIana9Z+sNOQAAAAdleGVjdXRlAAAAAAEAAAASAAAAAAAAAAAvWO/kgREQeG/licSZ4cD5YE0vNZMN/GQdCxa94sIwtAAAAAEAAAAAAAAAASHdMH0VEX9lf0QzftFbm2E+EEk8jimG1f6K4WUi6J0aAAAAB2V4ZWN1dGUAAAAAAwAAAAQAAAABAAAAAwAAAAIAAAADAAAAAwAAAAAAAAAAAAAAAaDiR0lV/AFtYYnK8aOhMnj7x135S0RUyHDPJEZ3T7VOAAAAB2V4ZWN1dGUAAAAAAwAAAAQAAAABAAAAAwAAAAIAAAADAAAAAwAAAAA="
}
],
"Meta": {
"AccessToken": "f192762c...",
"Destination": "045bd19d...",
"Source": "6f8fd2e8...",
"Time": "2024-09-29 20:48:21.158"
}
}
Returned as a tuple: (authorization_entry_xdr, authorization_entry_json)
account_idinteger<p>Internal MPC account identifier that will sign the authorization (the "Hot" signer).</p>
contract_addressstring<p>Target contract address (C-address, StrKey starting with 'C…').</p>
max_feeinteger<p>Maximum fee to use for building/simulating the transaction that computes the authorization.</p>
function_namestring<p>Contract function to call (e.g., "transfer", "execute").</p>
parameters_fields_types_and_valuesarray<p>Argument list for the function. Each element describes one SCVal argument.
Typical formats we accept:</p>
<ul>
<li><code>["address", "<G…|C…>"]</code></li>
<li><code>["u32", "123"]</code>, <code>["i128", "-42"]</code></li>
<li><code>["symbol", "transfer"]</code></li>
<li><code>["string", "hello"]</code></li>
<li><code>["bytes", "0x…"]</code>, <code>["bytes32", "0x…"]</code></li>
<li>Composite types like <code>["vec<u64>", [ "1","2","3" ]]</code></li>
<li>Maps as <code>["map<symbol,u128>", [[["symbol","USD"],["u128","1000"]], …]]</code>
For complex/named structs, provide the <code>structs</code> mapping below.</li>
</ul>
structsstring<p>(Optional) Schema for user-defined structs used inside parameters.
Example:
{ "MyStruct": [ ["symbol","code"], ["u128","amount"] ] }</p>
specificFromAddressstringThe specific deposit address to send from. Cannot be used if the account is defined as an Omnibus account.
acceptstringGenerated from available response content types
200success
curl --request POST \
--url '/getSorobanAuthorizationEntrySignedByMpc?account_id=1&contract_address=CCOZ5XDWPXVYLIUCLK2YKW5RXPOWINDB2FIQBM5JUXAWLMQW5RRMELNF&max_fee=4000000&function_name=execute¶meters_fields_types_and_values=[%22u32%22%2C%22123%22]&structs=None' \
--header 'accept: application/json'