mirror of
https://github.com/fluencelabs/eip712-validation-node
synced 2025-05-27 23:21:20 +00:00
Add sample KeyPair usage
This commit is contained in:
parent
4108191023
commit
32d4e6c822
@ -20,6 +20,7 @@
|
||||
"@fluencelabs/fluence": "0.10.4-async-457.0",
|
||||
"@fluencelabs/fluence-network-environment": "1.0.10",
|
||||
"@types/sqlite3": "^3.1.7",
|
||||
"base64-js": "^1.5.1",
|
||||
"ethers": "^5.4.7",
|
||||
"ethers-eip712": "^0.2.0",
|
||||
"got": "^11.8.2",
|
||||
|
@ -6,6 +6,7 @@ import { TypedDataUtils } from 'ethers-eip712'; // https://github.com/0xsequenc
|
||||
import { eip_validation, Response } from "./eip_processor";
|
||||
import { get_db, create_table, insert_event, DBRecord, select_events, select_event } from './local_db';
|
||||
import got from 'got';
|
||||
import { base64 } from "ethers/lib/utils";
|
||||
|
||||
|
||||
|
||||
@ -80,8 +81,12 @@ class DataProvider implements DataProviderDef {
|
||||
|
||||
async function main_0() {
|
||||
|
||||
const skBase64 = 'z1x3cVXhk9nJKE1pZaX9KxccUBzxu3aGlaUjDdAB2oY=';
|
||||
const skBytes = base64.decode(skBase64);
|
||||
|
||||
await Fluence.start({
|
||||
connectTo: krasnodar[0],
|
||||
KeyPair: await KeyPair.fromEd25519SK(skBytes)
|
||||
});
|
||||
|
||||
// const peer_data = Fluence.getPeer();
|
||||
|
Loading…
x
Reference in New Issue
Block a user