This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| def lcm(a, b): | |
| return abs(a*b) // math.gcd(a, b) | |
| def egcd(a, b): | |
| if a == 0: | |
| return (b, 0, 1) | |
| else: | |
| g, y, x = egcd(b % a, a) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function validateBtcAddress(address) { | |
| if (typeof address !== 'string') return false; | |
| if (address.length < 26 || address.length > 35) return false; | |
| return /^1/.test(address) || /^3/.test(address) || /^bc1/.test(address); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0x05AD1f8389a77c1968bb8b40052af4a7Ba4A0cF3 |