Submit RedeemScript for Staking Transaction
POSThttps://staking-api.coredao.org//staking/helper/redeemscript
Submit a RedeemScript so Core relayers can help transmit the staking transaction. This API is optional if the RedeemScript is already provided in the op_return
field of the staking transaction.
Request
- application/json
Bodyrequired
txIdstringrequired
The transaction ID of the staking transaction.
apiKeystringrequired
The API key for authentication.
redeemScriptstringrequired
The RedeemScript for the staking transaction.
Responses
- 200
- 400
RedeemScript submitted successfully.
- application/json
- Schema
- Example (auto)
Schema
codestring
Status code indicating the result of the operation.
messagestring
Additional information or message about the response.
data object
{
"code": "string",
"message": "string",
"data": {
"result": true
}
}
Invalid request data or an error occurred while processing the RedeemScript.
- application/json
- Schema
- Example (auto)
Schema
codestring
Error code indicating the result of the operation.
messagestring
Error message explaining the issue.
{
"code": "string",
"message": "string"
}
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://staking-api.coredao.org/staking/helper/redeemscript");
request.Headers.Add("Accept", "application/json");
var content = new StringContent("{\n \"txId\": \"string\",\n \"apiKey\": \"string\",\n \"redeemScript\": \"string\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear