Submit a secret for order fill after SrcEscrow and DstEscrow deployed and DstChain finality lock passed
Supported on: Ethereum Base BNB Chain Polygon Linea Sonic Unichain Arbitrum Avalanche ZKsync Gnosis Optimism
Parameters
This request doesn’t have any parameters.
Request Body
Input for submitting a secret to reveal
secret
* string A secret for the fill hashlock
orderHash
* string Hash of the order this secret belongs to
JavaScript
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const axios = require('axios');
async function httpCall() {
const url = 'https://api.1inch.com/fusion-plus/relayer/v1.2/submit/secret';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {},
paramsSerializer: {
indexes: null,
},
};
const body = {
secret:
'0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
orderHash:
'0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890',
};
try {
const response = await axios.post(url, body, config);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Returns
201
201 response doesn’t have payload.