pip install wudder
from wudder import Wudder, Fragment, Event
Wudder.signup('email@example.org', 'p4ssw0rd', private_key_password='k3y_p4ssw0rd')
You can specify a custom GraphQL endpoint with the argument
endpoint
Wudder.signup('email@example.org', 'p4ssw0rd', private_key_password='k3y_p4ssw0rd', endpoint='https://api.pre.wudder.tech/graphql/')
wudder = Wudder('email@example.org', 'p4ssw0rd', private_key_password='k3y_p4ssw0rd')
Again, you can specify a custom GraphQL endpoint with the argument
endpoint
wudder = Wudder('email@example.org', 'p4ssw0rd', private_key_password='k3y_p4ssw0rd', endpoint='https://api.pre.wudder.tech/graphql/')
You can sign the transactions with a custom local private key (e.g., FNMT private key in the
PKCS#12
format). Check the supported protocols and file formats at labteral/digsig-python:
wudder = Wudder('email@example.org', 'p4ssw0rd', private_key_path='private_key.p12', private_key_password='k3y_p4ssw0rd')
trace_evhash = wudder.send('Title', [{'field': 'key', 'value': 'value'}])
evhash = wudder.send('Title', [{'field': 'key', 'value': 'value'}], trace=trace_evhash)
event = wudder.get_event(evhash)
trace = wudder.get_trace(evhash)
proof = wudder.get_proof(evhash)
wudder.check_ethereum_proof(proof['proof'], proof['l1_suffixes']['ethereum']['tx_hash']))
import json
with open('private_key.json', 'w') as output_file:
json.dump(wudder.private_key, output_file)
import json
with open('private_key.json', 'r') as input_file:
private_key = json.load(input_file)
wudder.update_private_key(private_key, 'k3y_p4ssw0rd')
from wudder import utils
new_private_key = utils.generate_private_key('k3y_p4ssw0rd')
wudder.update_private_key(new_private_key, 'k3y_p4ssw0rd')