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

Method sign_message

python/ccxt/async_support/pacifica.py:3052–3060  ·  view source on GitHub ↗
(self, header: dict, payload: dict, privateKey: str)

Source from the content-addressed store, hash-verified

3050 return self.json(sorted)
3051
3052 def sign_message(self, header: dict, payload: dict, privateKey: str) -> str:
3053 message = self.prepare_message(header, payload)
3054 messageBytes = self.encode(message)
3055 secretBytes = self.base58_to_binary(privateKey)
3056 seed = self.array_slice(secretBytes, 0, 32)
3057 signatureBase64 = self.eddsa(messageBytes, seed, 'ed25519')
3058 signatureBinary = self.base64_to_binary(signatureBase64)
3059 signatureBase58 = self.binary_to_base58(signatureBinary)
3060 return signatureBase58
3061
3062 def post_action_request(self, operationType: Str, sigPayload: dict, params: dict) -> dict:
3063 self.check_required_credentials() # check credentials every post action

Callers 2

create_sub_accountMethod · 0.95
post_action_requestMethod · 0.95

Calls 7

prepare_messageMethod · 0.95
base58_to_binaryMethod · 0.80
array_sliceMethod · 0.80
base64_to_binaryMethod · 0.80
binary_to_base58Method · 0.80
encodeMethod · 0.45
eddsaMethod · 0.45

Tested by

no test coverage detected