Skip to content

Instantly share code, notes, and snippets.

View S3bb1's full-sized avatar

Sebastian Dechant S3bb1

  • Eisenach, Germany
  • 11:00 (UTC +02:00)
View GitHub Profile
@S3bb1
S3bb1 / testcore.json
Created May 10, 2021 14:07
testcore.spec
{
"name": "evan.network testcore",
"engine": {
"authorityRound": {
"params": {
"stepDuration": "3",
"validators": {
"multi": {
"0": {
"list": [
const {
BbsBlsSignature2020,
BbsBlsSignatureProof2020,
deriveProof
} = require("@mattrglobal/jsonld-signatures-bbs");
const { extendContextLoader, sign, verify, purposes } = require("jsonld-signatures");
const { resolver } = require('@transmute/did-key.js');
const { documentLoaders } = require("jsonld");
const bs58 = require('bs58');
@S3bb1
S3bb1 / Links.md
Last active July 17, 2020 10:59
evan.network digital identities presentation
@S3bb1
S3bb1 / Links
Last active September 6, 2019 07:06
@S3bb1
S3bb1 / createTwin.js
Created May 19, 2019 12:05
Create a digital twin
// require blockchain-core dependencies
const IpfsApi = require('ipfs-api');
const Web3 = require('web3');
// require blockchain-core
const { Ipfs, createDefaultRuntime, PropertyType, ModificationType } = require('@evan.network/api-blockchain-core');
// ipfs configuration for evan.network testnet storage
const ipfsConfig = {host: 'ipfs.test.evan.network', port: '443', protocol: 'https'};
// web3 provider config (currently evan.network testcore)
@S3bb1
S3bb1 / sendFunds.js
Created May 14, 2019 12:14
send transaction
// require blockchain-core dependencies
const IpfsApi = require('ipfs-api');
const Web3 = require('web3');
const fs = require('fs')
// require blockchain-core
const { Ipfs, createDefaultRuntime, Executor } = require('@evan.network/api-blockchain-core');
const runtimeConfig = {
// account map to blockchain accounts with their private key
@S3bb1
S3bb1 / VerificationCheck.sol
Created May 10, 2019 09:50
Solidity - check verification for a given identity
pragma solidity ^0.4.20;
// interface for identity, that holds verifications
interface VerificationHolder {
function getVerification(bytes32 _verificationId)
external
view
returns(
uint256 topic,
uint256 scheme,
@S3bb1
S3bb1 / dt-create.js
Created July 4, 2018 19:30
Digital Twin How To
(async () => {
// require blockchain-core dependencies
const IpfsApi = require('ipfs-api');
const Web3 = require('web3');
// require blockchain-core
const { Ipfs, createDefaultRuntime, ModificationType, PropertyType } = require('@evan.network/blockchain-core');
const accountId = '0xD5c4b30B3c80E01B7eF3E7067Ce13733Df11d8A1';
// configure the runtime object
const runtimeConfig = {
{
"name": "validatortest",
"engine": {
"authorityRound": {
"params": {
"stepDuration": "3",
"validators": {
"multi": {
"0": {
"list": [
//! Copyright 2017 Peter Czaban, Parity Technologies Ltd.
//!
//! Licensed under the Apache License, Version 2.0 (the "License");
//! you may not use this file except in compliance with the License.
//! You may obtain a copy of the License at
//!
//! http://www.apache.org/licenses/LICENSE-2.0
//!
//! Unless required by applicable law or agreed to in writing, software
//! distributed under the License is distributed on an "AS IS" BASIS,