MCPcopy Create free account
hub / github.com/ccxt/ccxt / signMessage

Method signMessage

js/src/pacifica.js:3194–3203  ·  view source on GitHub ↗
(header, payload, privateKey)

Source from the content-addressed store, hash-verified

3192 return this.json(sorted);
3193 }
3194 signMessage(header, payload, privateKey) {
3195 const message = this.prepareMessage(header, payload);
3196 const messageBytes = this.encode(message);
3197 const secretBytes = this.base58ToBinary(privateKey);
3198 const seed = this.arraySlice(secretBytes, 0, 32);
3199 const signatureBase64 = eddsa(messageBytes, seed, ed25519);
3200 const signatureBinary = this.base64ToBinary(signatureBase64);
3201 const signatureBase58 = this.binaryToBase58(signatureBinary);
3202 return signatureBase58;
3203 }
3204 postActionRequest(operationType, sigPayload, params) {
3205 this.checkRequiredCredentials(); // check credentials every post action
3206 if (operationType === 'undefined') {

Callers 2

createSubAccountMethod · 0.95
postActionRequestMethod · 0.95

Calls 7

prepareMessageMethod · 0.95
eddsaFunction · 0.90
encodeMethod · 0.45
base58ToBinaryMethod · 0.45
arraySliceMethod · 0.45
base64ToBinaryMethod · 0.45
binaryToBase58Method · 0.45

Tested by

no test coverage detected