This file contains 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
// salt miner for https://address-market.com | |
package main | |
import ( | |
"encoding/hex" | |
"fmt" | |
"log" | |
"math/big" | |
"math/rand" |
This file contains 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 keccak256 from "keccak256"; | |
import cluster from "cluster"; | |
import os from "os"; | |
const numCPUs = os.cpus().length; | |
const COLOR_TEXT_PREFIX = '\x1b[35m\x1b[1m'; | |
const RESET_TEXT_SUFFIX = '\x1b[0m'; | |
const getValue = (value: string) => `memology_${value}(address,uint256,uint256)`; |
This file contains 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 * as crypto from 'crypto'; | |
// https://www.tinkoff.ru/kassa/develop/api/request-sign/ | |
// считает и дописывает свойство Token в существующий объект | |
const SignData = (data: Record<string, unknown>) => { | |
const { Shops, Receipt, DATA, Token, ...payload } = data; // исключаем неучитываемое - см. доки | |
payload.Password = TinkoffConfig.password; // надо дописать пароль в объект; TinkoffConfig - импорт из конфиг-файла например | |
const entries = Object.entries(payload); // надо будет отсортитровать по ключу, поэтому так | |
entries.sort((a, b) => a[0] > b[0] ? 1 : -1); |