1
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
/** | |
* api.js - client for interracting with the steam client | |
* https://github.com/jonajosejg/steamclient | |
* Copyright (C) 2024, Jonathan Gonzales (MIT License) | |
*/ | |
'use strict'; | |
const assert = require('bsert'); | |
const {Client} = require('bcurl'); |
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
01000000 - version | |
0000000000000000000000000000000000000000000000000000000000000000 - prevblock | |
8a6be158deb38d5cc20aa8612ac303bb7ae59520d3b22213df5e88434f36b18e - merkleblock | |
2d87ce6000000000000000000000000000000000000000000000000000000000 - withdrawalBundle | |
0000000000000000000000000000000000000000000000000000000000000000 - mainchainBlock | |
00000000 - timestamp | |
ffff7f20 - bits | |
02000000 - nonce | |
01 - number of tx | |
01000000 - version |
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
/*! | |
* sidechain.js - a sidechain template for bitcoin | |
* Copyright (C) 2023, Jonathan Gonzalies (MIT License). | |
* https://github.com/rojii/sidechain | |
*/ | |
'use strict'; | |
const assert = require('bsert'); | |
const layout = require('./blockchain/layout'); |
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
'use strict'; | |
const assert = require('bsert'); | |
const EventEmitter = require('events'); | |
const WEB3 = require('web3-eth'); | |
const {endpoint} = require('./constants'); | |
/** |
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
'use strict'; | |
const assert = require('assert'); | |
const bcoin = require('bcoin'); | |
const MTX = bcoin.MTX; | |
const Keyring = bcoin.wallet.WalletKey; | |
const Outpoint = bcoin.Outpoint; | |
const Script = bcoin.Script; | |
const Coin = bcoin.Coin; |
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
0x42C6A98F84fec35d50c0188989817d5A535bB214 |
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
/* eslint-env mocha */ | |
'use strict'; | |
const {NodeClient, WalletClient} = require('../lib/client'); | |
const assert = require('bsert'); | |
const consensus = require('../lib/protocol/consensus'); | |
const FullNode = require('../lib/node/fullnode'); | |
const Network = require('../lib/protocol/network'); | |
const Mnemonic = require('../lib/hd/mnemonic'); |
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
var alnilam = Number.EPSILON * illai * 0.4503599627370496 | |
var e = Number.EPSILON * 2 ** 52; |
If ECDH is used to establish a shared session secret for an encrypted connection, two elliptic curve points need to be transmitted (one in each direction) before encryption starts. In order to avoid being identifiable as a (specific) ECDH negotiation, ideally those two points are sent in a way that is indistinguishable from random.
This problem is easily addressed by using curves that support Elligator-style encodings: functions that encode a (subset of) elliptic curve points as sequences of bytes with no observable bias: (almost) every byte sequence corresponds to exactly one point, and the others correspond to none.
Unfortunately, no Elligator-style encoding is known for secp256k1.
NewerOlder