MCPcopy Index your code
hub / github.com/ccxt/ccxt / signHash

Method signHash

java/lib/src/main/java/io/github/ccxt/exchanges/DydxCore.java:1324–1334  ·  view source on GitHub ↗
(Object hash, Object privateKey)

Source from the content-addressed store, hash-verified

1322 }
1323
1324 public Object signHash(Object hash, Object privateKey)
1325 {
1326 Object signature = ecdsa(Helpers.slice(hash, Helpers.opNeg(64), null), Helpers.slice(privateKey, Helpers.opNeg(64), null), secp256k1(), null);
1327 Object r = Helpers.GetValue(signature, "r");
1328 Object s = Helpers.GetValue(signature, "s");
1329 return new java.util.HashMap<String, Object>() {{
1330 put( "r", Helpers.padStart((String)r, ((Number)64).intValue(), ((String)"0").charAt(0)) );
1331 put( "s", Helpers.padStart((String)s, ((Number)64).intValue(), ((String)"0").charAt(0)) );
1332 put( "v", DydxCore.this.sum(27, Helpers.GetValue(signature, "v")) );
1333 }};
1334 }
1335
1336 public Object signMessage(Object message, Object privateKey)
1337 {

Callers 2

signMessageMethod · 0.95
signDydxTxMethod · 0.95

Calls 7

sliceMethod · 0.95
opNegMethod · 0.95
GetValueMethod · 0.95
padStartMethod · 0.95
ecdsaMethod · 0.45
secp256k1Method · 0.45
sumMethod · 0.45

Tested by

no test coverage detected