Skip to content

Instantly share code, notes, and snippets.

View Tommytrg's full-sized avatar
🔮
Focusing

Tomás Ruiz Tommytrg

🔮
Focusing
View GitHub Profile
@Tommytrg
Tommytrg / verify_signature.py
Created October 18, 2023 11:25 — forked from parodyBit/verify_signature.py
Verify Witnet Signed Message in Python
from dataclasses import dataclass
from typing import List, AnyStr, Union, Tuple
import hashlib
import random
import unicodedata
'''
Transformation tools
'''
Bytes = List[int]
interface CacheState<T> {
counter: number
cache: { [key: number]: T }
}
function getLastIndex<T>(state: CacheState<T>) {
return {
getLastIndex: (): number => state.counter + 1,
}
}

Keybase proof

I hereby claim:

  • I am tommytrg on github.
  • I am tommytrg (https://keybase.io/tommytrg) on keybase.
  • I have a public key ASC0CWsWrZMRPD8VdbxtFx6YTFKPMAlbeVzVY_6aQWcFBAo

To claim this, I am signing this object: