Hostile 99% javascript Download

@ton/core 0.57.0

“Core TypeScript library that implements low level primitives for TON blockchain.”

Basename is uppercase README.mdCaret or XOR operation token in source
SHA-25610649ed76229c6e084fb7c0a19f7928f445606165a89276637ad8eafe89f8d22

Evidence

Markdown-style heading precedes a code fence README.md · lines 1–25
1# 💎 @ton/core
2
3Core TypeScript library that implements low level primitives for TON blockchain.
4
5## How to install
6
7```bash
8yarn add @ton/core
9```
10```bash
⋯8 lines
19## Acknowledgements
20
21This library is developed by the [Whales Corp.](https://tonwhales.com/) and maintained by [Dan Volkov](https://github.com/dvlkv).
22
23# License
24
25MIT
CommonJS-style exports property assignment ADNLAddress.js · lines 1–48
1"use strict";
2/**
3 * Copyright (c) Whales Corp.
4 * All Rights Reserved.
5 *
6 * This source code is licensed under the MIT license found in the
7 * LICENSE file in the root directory of this source tree.
8 */
9var __importDefault = (this && this.__importDefault) || function (mod) {
10 return (mod && mod.__esModule) ? mod : { "default": mod };
11};
12var _a;
13Object.defineProperty(exports, "__esModule", { value: true });
14exports.ADNLAddress = void 0;
15const symbol_inspect_1 = __importDefault(require("symbol.inspect"));
16const base32_1 = require("../utils/base32");
17const crc16_1 = require("../utils/crc16");
18class ADNLAddress {
19 static parseFriendly(src) {
⋯4 lines
24 src = 'f' + src;
25 let decoded = (0, base32_1.base32Decode)(src);
26 if (decoded[0] !== 0x2d) {
27 throw Error('Invalid address');
28 }
29 let gotHash = decoded.slice(33);
30 let hash = (0, crc16_1.crc16)(decoded.slice(0, 33));
31 if (!hash.equals(gotHash)) {
32 throw Error('Invalid address');
33 }
34 return new ADNLAddress(decoded.slice(1, 33));
35 }
36 static parseRaw(src) {
37 const data = Buffer.from(src, 'base64');
38 return new ADNLAddress(data);
39 }
40 constructor(address) {
41 this.toRaw = () => {
42 return this.address.toString('hex').toUpperCase();
43 };
44 this.toString = () => {
⋯4 lines
JavaScript invokes a Base64 decoder Address.js · lines 22–27
22:38… ess type');
23 }
24 const data = Buffer.isBuffer(src) ? src : Buffer.from(src, 'base64');
25 // 1byte tag + 1byte workchain + 32 bytes hash + 2 byte crc
26 if (data.length !== 36) {
27 throw new Error('Unknow …
Subarray split at decimal offsets Address.js · lines 27–34
27:66… equal to 36');
28 }
29 // Prepare data
30 const addr = data.subarray(0, 34);
31 const crc = data.subarray(34, 36);
32 const calcedCrc = (0, crc16_1.crc16)(addr);
33 if (!(calcedCrc[0] === crc[0] && calcedCrc[1] === crc[1])) {
34 throw …
Caret or XOR operation token in source Address.js · lines 34–46
34:33… checksum: ' + src);
35 }
36 // Parse tag
37 let tag = addr[0];
38 let isTestOnly = false;
39 let isBounceable = false;
40 if (tag & test_flag) {
41 isTestOnly = true;
42 tag = tag ^ test_flag;
43 }
44 if ((tag !== bounceable_tag) && (tag !== non_bounceable_tag))
45 throw "Unknown address tag";
46 isBou …

Showing the top 5 files — 7 more files (50 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.