GithubHelp home page GithubHelp logo

mingderwang / etherspot-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from etherspot/etherspot-sdk

0.0 2.0 0.0 1.48 MB

Etherspot SDK

Home Page: https://docs.etherspot.dev

License: MIT License

JavaScript 0.16% TypeScript 78.78% CSS 14.71% Handlebars 6.11% Gherkin 0.05% Shell 0.18%

etherspot-sdk's Introduction

Etherspot SDK

NPM version MIT licensed

Etherspot is a blockchain development framework for EVM-compatible chains that creates direct state channel bridges to provide a seamless user experience across chains and wallets.

With just one deposit you’re able to onboard your users to the entire multichain world.

Developers can use the Buidler and TransactionKit tools to easily include Etherspot features into their dapps.

For more powerful but complex uses, developers can dive deeper into the SDK and explore a number of custom use cases.

More information at etherspot.io

Resources

Installation

$ npm i ethers@^5.5.2 reflect-metadata@^0.1.13 rxjs@^6.6.2 -S
$ npm i etherspot -S
$ npm i ws -s # node.js only

Usage

import { Sdk, randomPrivateKey } from 'etherspot';

const PRIVATE_KEY = randomPrivateKey();

async function main() {
  const sdk = new Sdk(PRIVATE_KEY);

  sdk.notifications$.subscribe(notification => console.log('notification:', notification));
  
  await sdk.computeContractAccount();
  
  const { account } = sdk.state;
  
  console.log('contract account:', account);
  
  // top-up contract account (account.address)
  
  // add transaction to gateway batch
  await sdk.batchExecuteAccountTransaction({
    to: '0xEEb4801FBc9781EEF20801853C1Cb25faB8A7a3b',
    value: 100, // 100 wei
  });
  
  console.log('gateway batch estimation:', await sdk.estimateGatewayBatch());

  console.log('submitted gateway batch:', await sdk.submitGatewayBatch());
}

main().catch(console.error);

Notification of transactions

notification of transactions is not available for fuse

Transaction History on Klaytn

History of transactions would be incomplete only on Klaytn Network due to lack of resources for fetching the required data

License

MIT

etherspot-sdk's People

Contributors

arddluma avatar dependabot[bot] avatar jsidorenko avatar kaushalrajbacancy avatar lbw33 avatar marie-fourier avatar riccardopillar avatar rkreutzer avatar saltycucumber avatar stanislaw-glogowski avatar taylorferran avatar vignesha22 avatar vnovacev avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.