Skip to content

⚡️ Transaction

NameDescriptionMethodRequired
targetUrlAPI endpoint return a list of transactions to executePOSTtrue
postUrlWeb page where user will be redirected once the transaction has been executedGETtrue
Notes:
  • Target URL should return a JSON like this
typescript
interface TxTargetURLResponse {
    chainId: string;
    to: string;
    data: string;
    value: string;
}
 
const response: TxTargetURLResponse[] = [
	{
	    chainId: "8453",
	    to: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
	    data: "<calldata>",
	    value: "<numeric>",
	},
	...,
	{
	    chainId: "8453",
	    to: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
	    data: "<calldata>",
	    value: "<numeric>",
	}
]
  • Post URL redirect will include a “txHash” as query parameter
typescript
GET https://example.com/tx-success?txHash=0xfdb03edd08492bee7dd261e3975f78350d7119a85a3016c7bd3e266e079ccf8f

🖋️ Signature

NameDescriptionMethodRequired
targetUrlAPI endpoint return the message to signPOSTtrue
postUrlAPI endpoint executing tasks with the signaturePOSTtrue
Notes:
  • Target URL should return a JSON like this
typescript
interface SignatureTargetURLResponse {
    message: string | Object;
}
 
const response: SignatureTargetURLResponse = {
    message: "Please sign this message"
    // or an object following eth_signTypedData_v4
    message: {
	    ...
    }
}
  • Post URL API call will include the following body parameters
typescript
POST https://example.com/signature-success
{
	"signature":"signedMessage"
	"message": "Please sign this message",
	"address": "0x1358155a15930f89eBc787a34Eb4ccfd9720bC62"
}

🪄 1-click login

NameDescriptionMethodRequired
targetUrlAPI endpoint where to fetch the SIWE login message to signPOSTtrue
postUrlURL of the app where we want the user to loginGETtrue
Notes:
  • Target URL should return a JSON supporting
typescript
interface OCLTargetURLResponse {
    message: string; // message should support SIWE standard
}
 
const response: OCLTargetURLResponse = {
    message: "messageToSign"
}
  • Post URL call will include the following body parameters and return an URL where to redirect the user
typescript
POST https://example.com/api/one-click-login
{
  "signedMessage": "0x73dad687b4b384543119a61842b079fc8aecc27ce25e8abb8a8bf6430f799ad56774e7574d3038ed10a6a905994223aa2ac38efe54c17277b91b2905ec6839d71b",
  "messageToSign":"messageToSign",
  "address":"0x02489791e27a36b9C314c2c70d9d4103eB5ba415"
}
 
{
	"url":"https://example.com"
}

🔗 Link

NameDescriptionMethodRequired
targetUrlURL where to redirect the userGETtrue