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
wget http://archive.ubuntu.com/ubuntu/pool/universe/s/sblim-cmpi-devel/libcmpicppimpl0_2.0.3-0ubuntu2_amd64.deb | |
wget http://archive.ubuntu.com/ubuntu/pool/multiverse/s/sblim-sfcb/sfcb_1.4.9-0ubuntu5_amd64.deb | |
wget http://archive.ubuntu.com/ubuntu/pool/universe/s/sblim-sfc-common/libsfcutil0_1.0.1-0ubuntu4_amd64.deb | |
wget http://archive.ubuntu.com/ubuntu/pool/multiverse/c/cim-schema/cim-schema_2.48.0-0ubuntu1_all.deb | |
wget http://archive.ubuntu.com/ubuntu/pool/universe/o/openwsman/openwsman_2.6.5-0ubuntu3_amd64.deb | |
wget http://archive.ubuntu.com/ubuntu/pool/universe/s/sblim-sfcc/libcimcclient0_2.2.8-0ubuntu2_amd64.deb | |
wget http://archive.ubuntu.com/ubuntu/pool/universe/o/openwsman/libwsman-server1_2.6.5-0ubuntu3_amd64.deb | |
wget http://archive.ubuntu.com/ubuntu/pool/universe/o/openwsman/libwsman1_2.6.5-0ubuntu3_amd64.deb | |
wget http://archive.ubuntu.com/ubuntu/pool/universe/o/openwsman/libwsman-client4_2.6.5-0ubuntu3_amd64.deb | |
wget http://archive.ubuntu.com/ubuntu/pool/universe/o/openwsman/libwsman-curl-client-trans |
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
// Shelly: Scripts - create prtg.js with contents below - Start - Scripts main page: "Run on start" | |
// Call with (assuming the first script): http://{shellyip}/script/1/prtg | |
// PRTG: Import HTTP Data Advanced sensor. | |
HTTPServer.registerEndpoint('prtg', function (request, response) { | |
response.headers = [ | |
['content-type', 'application/json'] | |
] | |
const em = Shelly.getComponentStatus('em', 0) |
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 fetch from 'node-fetch' | |
import { hookStateXLFtoBigNumber } from './xfl.mjs' | |
// Credits: https://github.com/tequdev/xahau-reward-claim/blob/main/src/app/ClaimReward.tsx | |
const account = 'rTeLeproT3BVgjWoYrDYpKbBLXPaVMkge' | |
const RPC_ENDPOINT = 'https://xahau.network' | |
const toUnixTimestamp = ts => ts + 946684800 |
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 { getPubKey, xflHexToString } from "./statelib.mjs"; | |
const main = async () => { | |
console.log(getPubKey(process.argv[2])); | |
const options = { | |
method: "POST", | |
headers: { | |
"Content-Type": "application/json", | |
}, | |
body: JSON.stringify({ |
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 { createECDH } from 'crypto' | |
import elliptic from 'elliptic' | |
import { deriveAddress } from 'ripple-keypairs' | |
const curve = 'secp256k1' | |
const secp256k1 = elliptic.ec(curve) | |
const bytesToHex = a => a.map(byteValue => ('0' + byteValue.toString(16)).slice(-2)).join('') | |
const getPublic = echdObj => bytesToHex(secp256k1.keyFromPrivate(echdObj.getPrivateKey()).getPublic().encodeCompressed()) |
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 { | |
enableEmit, | |
getState, | |
setState, | |
prepareEmit, | |
doEmit, | |
log, | |
AnyJson, | |
} from '@xahau/hooks' |
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 accountlib from 'xrpl-accountlib' | |
import assert from 'assert' | |
const requiredBits = 256 | |
const requiredThrows = Math.ceil(requiredBits / Math.log2(10)) | |
// Adapted from validator keypair dice tool by RichardAH | |
// https://github.com/RichardAH/validator-keys-from-dice/blob/main/dice.js | |
// Random (BAD RANDOM! BAD BAD BAD RANDOM! DO NOT EVER USE THIS!! TESTING PURPOSES ONLY!) |
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 accountlib from 'xrpl-accountlib' | |
import elliptic from 'elliptic' | |
import assert from 'assert' | |
const ec = new elliptic.eddsa('ed25519') | |
// Adapted from validator keypair dice tool by RichardAH | |
// https://github.com/RichardAH/validator-keys-from-dice/blob/main/dice.js | |
// Random (BAD RANDOM! BAD BAD BAD RANDOM! DO NOT EVER USE THIS!! TESTING PURPOSES ONLY!) | |
const dicerolls = Array(78).fill().map(r => Math.floor(Math.random() * 10)) |
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 { derive, utils, prefilledSignAndSubmit, XrplClient } from "xrpl-accountlib" | |
const sample = 'xahauTestnet' | |
const sampleValues = { | |
xahauTestnet: { | |
account: derive.familySeed('sstWn1vCjnf6vFT87QHoYJpzYrdu9'), | |
nodes: [ | |
new XrplClient('wss://xahau-test.net'), | |
new XrplClient('wss://hooks-testnet-v3.xrpl-labs.com'), |
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
<! -- Demo here: https://zoq4jb3.dlvr.cloud/index.html --> | |
<html> | |
<head> | |
<style> | |
pre { | |
border: 1px solid red; | |
padding: 10px; | |
margin: 10px; | |
} | |
</style> |
NewerOlder