This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const BN = require('bn.js'); | |
const EC = require('elliptic').ec; | |
const keccak256 = require('js-sha3').keccak256; | |
const sk = new BN('616E6769652E6A6A706572657A616775696E6167612E6574682E6C696E6B0D0A', 16); | |
const ec = new EC('secp256k1'); // Elliptic curve used by Ethereum | |
const G = ec.g; // Elliptic curve generator point | |
// console.log(G.getX()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id 'com.android.application' | |
} | |
android { | |
compileSdkVersion 29 | |
defaultConfig { | |
applicationId "com.example.testawsiot" | |
minSdkVersion 26 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
repositories { | |
google() | |
jcenter() | |
} | |
dependencies { | |
classpath "com.android.tools.build:gradle:4.1.0" | |
// NOTE: Do not place your application dependencies here; they belong | |
// in the individual module build.gradle files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![recursion_limit = "512"] | |
use cpp::cpp; | |
use cpp::cpp_class; | |
use std::ffi::{CString, CStr}; | |
use std::os::raw::c_char; | |
cpp!{{ | |
#include <iostream> | |
#include "src/Test.cpp" | |
using std::string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Operations { | |
count: u32, | |
} | |
impl Operations { | |
pub fn new() -> Self { | |
Operations{ | |
count: 0, | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use cpp::cpp; | |
use cpp::cpp_class; | |
cpp!{{ | |
#include <iostream> | |
using std::string; | |
class Test { | |
public: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use cpp::cpp; | |
use cpp::cpp_class; | |
cpp!{{ | |
#include <iostream> | |
class Test { | |
public: | |
void fireEvent() { | |
std::cout << "fireEvent called" << std::endl; | |
onEvent(100, 200); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use cpp::cpp; | |
use cpp::cpp_class; | |
cpp!{{ | |
#include <iostream> | |
class Test { | |
public: | |
void method() { | |
std::cout << "method called" << std::endl; | |
methodImpl(); |
NewerOlder