Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
210 lines (177 sloc) 6.24 KB
id title
Signed Intent reference

A SignedIntent is the complete definition of Intent in the Marmo ecosystem, it has a unique ID and can be attached as a dependency of other intents.

Sign an Intent

The last step in building a valid Intent is Signing; it generates an object containing the Intent, ID, wallet, and signature.

from marmopy import Wallet

wallet = Wallet("<your private key here>")

signed_intent = wallet.sign(intent)
import { Wallet } from "marmojs";

const wallet = new Wallet("<private key here>");

signedIntent = wallet.sign(intent)
import network.marmoj.builder.SignedIntentBuilder;

SignedIntent signedIntent = SignedIntentBuilder.aSignedIntent()

Signed Intent ID

The ID of a Signed Intent is generated using the address of the wallet, the address of the Marmo implementation and the data of the Intent.

id = keccak(wallet, implementation, data)

An intent only has an ID when paired with a wallet, for that reason the ID is only available in a signed intent object.

signed_intent = wallet.sign(intent)
signedIntent = wallet.sign(intent)


To execute a SignedIntent it has to be sent to a relayer; the relayer wraps the intent in a transaction calling the wallet contract.

signed_intent = wallet.sign(intent)
signedIntent = wallet.sign(intent)

A provider has to be provided or defined as global, is neither is fulfilled the operation will fail.

The same Signed intent can be relayed to multiple relayers, with the only risk being the duplicated operational cost.

Using a custom provider

signed_intent = wallet.sign(intent)
signedIntent = wallet.sign(intent)


The relayer exposes a POST \relay endpoint that accepts a JSON Object with the following scheme.



Provides a receipt containing the state of execution of a relayed signed Intent, there are three possible states:

Status code - pending

The Intent is pending of execution.

status = signed_intent.status()
# pending

Status code - settling / completed

The Intent was already executed, if the status code is 'settling' it may revert to pending, but if the code is 'completed' it can be considered final.

status = signed_intent.status()
   "receipt": {
      "result": {
         "output": [
Key Type Description
tx_hash String Hash of the transaction that executed the Intent.
relayer String Address of the relayer that executed the Intent.
block_number Number Number of the block when executed the transaction.
success Boolean true If the execution of the Intent didn't throw an error
result Dictionary Result of the execution of the Intent
You can’t perform that action at this time.