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

Method pow

python/ccxt/lighter.py:560–571  ·  view source on GitHub ↗
(self, n: str, m: str)

Source from the content-addressed store, hash-verified

558 return token
559
560 def pow(self, n: str, m: str):
561 r = Precise.string_mul(n, '1')
562 c = self.parse_to_int(m)
563 if c < 0:
564 raise BadRequest(self.id + ' pow() requires m > 0.')
565 if c == 0:
566 return '1'
567 if c > 100:
568 raise BadRequest(self.id + ' pow() requires m < 100.')
569 for i in range(1, c):
570 r = Precise.string_mul(r, n)
571 return r
572
573 def hash_message(self, message: str):
574 binaryMessage = self.encode(message)

Callers 5

create_order_requestMethod · 0.95
edit_orderMethod · 0.95
transferMethod · 0.95
withdrawMethod · 0.95
set_marginMethod · 0.95

Calls 4

BadRequestClass · 0.90
string_mulMethod · 0.80
parse_to_intMethod · 0.80
rangeFunction · 0.50

Tested by

no test coverage detected