Skip to main content

sign

The sign method calculates an Jumbochain specific signature with: sign(keccak256("\x19Jumbochain Signed Message:\n" + len(message) + message))).

By adding a prefix to the message makes the calculated signature recognisable as an Jumbochain specific signature. This prevents misuse where a malicious DApp can sign arbitrary data (e.g. transaction) and use the signature to impersonate the victim.

note

the address to sign with must be unlocked.

Returns code at a given address.

Parameters

account,message

DATA, 20 Bytes

address

DATA, N Bytes

message to sign

Returns

DATA

signature

Requests

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://testnode.jumbochain.org");
var content = new StringContent("{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"jumbo_sign\",\n\t\"params\":[\n\t\t\"0x9b2055d370f73ec7d8a03e965129118dc8f5bf83\", \n\t\t\"0xdeadbeaf\"\n\t],\n\t\"id\":1\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());