Skip to content

Instantly share code, notes, and snippets.

View tjanez's full-sized avatar

Tadej Janež tjanez

View GitHub Profile
@tjanez
tjanez / sapphire 2024.md
Created January 30, 2026 09:29 — forked from lukaw3d/sapphire 2024.md
end of 2024 notes on how to start using Sapphire on Oasis

end of 2024 notes on how to start using Sapphire on Oasis

Sapphire ParaTime is like a rollup on top of Oasis Consensus chain. Consensus handles governance. Sapphire handles solidity contracts with private variables/storage.

Setup an EVM wallet

Install MetaMask. Then click "Add to MetaMask" under "sapphire.oasis.io" https://docs.oasis.io/dapp/sapphire/network#rpc-endpoints

#!/bin/bash
CONFIG_PATH=~/.config/Code
for i in $CONFIG_PATH/User/workspaceStorage/*; do
if [ -f $i/workspace.json ]; then
folder="$(python3 -c "import sys, json; print(json.load(open(sys.argv[1], 'r'))['folder'])" $i/workspace.json 2>/dev/null | sed 's#^file://##;s/+/ /g;s/%\(..\)/\\x\1/g;')"
if [ -n "$folder" ] && [ ! -d "$folder" ]; then
echo "Removing workspace $(basename $i) for deleted folder $folder of size $(du -sh $i|cut -f1)"
import { eddsa } from 'elliptic';
import { sha512 } from 'js-sha512';
import { sha256 } from 'js-sha256';
import * as BN from 'bn.js';
export interface Ed25519Node {
kL: Uint8Array;
kR: Uint8Array;
A: Buffer;
c: Uint8Array;