Skip to content

Instantly share code, notes, and snippets.

View taurenshaman's full-sized avatar
💤
lore:> hi knowledge

Jerin taurenshaman

💤
lore:> hi knowledge
View GitHub Profile
I am attesting that this GitHub handle taurenshaman is linked to the Tezos account tz1VKYBtk8TGqXcThm4APEimyvUdAipAbKQB for tzprofiles
sig:edsigu4J1aNH9oRFUk3tYc1apYp4M8V5PjfqhMsQYDMqVsfatzYey2rHsSQ7gEFm43tfYnDBLTAarQfSFh3tVvtqEeNWfB8HEBb
Verify Github on Galaxy. gid:AiJywjVvcWdXpDitc9iSDX
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreifq6fa7gz5w65lkul5qbjsbiflu5geuzo5o5dzo7cs3dkm2msnqvm ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
@taurenshaman
taurenshaman / raw-provider.ts
Last active March 5, 2021 06:53
F:\Github\pw-core\src\providers\raw-provider.ts
import { Provider, Platform } from './provider';
import { Address, AddressType } from '..';
import { Blake2bSigner } from '../signers/blake2b-signer';
// 基于DummyProvider修改
export class RawProvider extends Provider {
secret: string;
signer: Blake2bSigner;
sign(message: string): Promise<string> {
@taurenshaman
taurenshaman / blake2b-signer.ts
Created March 5, 2021 06:43
pw-core/src/signers/blake2b-signer.ts
import { Signer, Message } from '.';
import { Blake2bHasher } from '../hashers';
import { Provider } from '../providers';
export class Blake2bSigner extends Signer {
constructor(public readonly provider: Provider, key: string = null) {
super(new Blake2bHasher(key));
}
@taurenshaman
taurenshaman / blake2b-signer.ts
Created March 5, 2021 06:40
pw-core/src/signers/blake2b-signer.ts
import { Hasher } from '.';
import { Reader } from 'ckb-js-toolkit';
import blake2b from 'blake2b';
export class Blake2bHasher extends Hasher {
constructor(key: string = null) {
const keyData = !key || key.length === 0 ? null : Buffer.from(key);
const h = blake2b(
32,
keyData,
@taurenshaman
taurenshaman / disable-tab-nav.js
Created June 5, 2020 11:27
Disable Tab navigation
document.onkeydown = function (evt) {
if (evt.which === 9) {
//console.log(evt);
return false;
}
}
// source: https://www.sanwebcorner.com/2016/07/how-to-disable-tab-key-in-web-page.html
// if wanna disable a spesific element:
//<input tabindex="-1" placeholder="NoTabIndex" />
class KatexModule {
constructor({ data, api }) {
this.data = data;
this.api = api;
this.wrapper = undefined;
this.settings = [
{
name: 'edit',
title: 'Edit',
did:3:bafyreifq6fa7gz5w65lkul5qbjsbiflu5geuzo5o5dzo7cs3dkm2msnqvm