All Projects → brunobar79 → eth-commerce

brunobar79 / eth-commerce

Licence: MIT license
Javascript library to accept ethereum payments on any website

Programming Languages

CSS
56736 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to eth-commerce

ar-nft
👾 A React Native app to visualize your NFTs in AR
Stars: ✭ 71 (+195.83%)
Mutual labels:  dapp, web3, metamask
NFT-Dapp-Boilerplate
A highly scalable NFT and DEFI boilerplate with pre added web3 and different wallets with a focus on performance and best practices
Stars: ✭ 51 (+112.5%)
Mutual labels:  dapp, web3, metamask
Web3swift
Elegant Web3js functionality in Swift. Native ABI parsing and smart contract interactions.
Stars: ✭ 237 (+887.5%)
Mutual labels:  crypto, dapp, web3
openzeppelin-network.js
An easy to use and reliable library that provides one line access to Web3 API.
Stars: ✭ 45 (+87.5%)
Mutual labels:  dapp, web3, metamask
starter-kit-gsn
An OpenZeppelin starter kit focused on GSN.
Stars: ✭ 39 (+62.5%)
Mutual labels:  dapp, web3, metamask
micro-stacks
Tiny libraries for building the next generation of Stacks apps.
Stars: ✭ 56 (+133.33%)
Mutual labels:  crypto, web3
colonyDapp
Colony dApp client
Stars: ✭ 52 (+116.67%)
Mutual labels:  dapp, web3
vue-web3
🐙 Web3 blockchain bindings for Vue.js (inspired by Vuefire and Drizzle)
Stars: ✭ 63 (+162.5%)
Mutual labels:  dapp, web3
foodprint
Algorand dApp for blockchain-enabled food transparency and traceability in local food supply chains. For use by smallholder farmers, food co-operatives and consumers.
Stars: ✭ 43 (+79.17%)
Mutual labels:  dapp, web3
create-react-native-dapp
Your next Ethereum application starts here. ⚛️ 💪 🦄
Stars: ✭ 410 (+1608.33%)
Mutual labels:  dapp, web3
court
The Kleros court user interface.
Stars: ✭ 19 (-20.83%)
Mutual labels:  dapp, web3
kleros-api-DEPRECATED
A Javascript library that makes it easy to build relayers and other DApps that use the Kleros protocol. DEPRECATED use https://github.com/kleros/archon for interfacing with standard arbitration contracts.
Stars: ✭ 20 (-16.67%)
Mutual labels:  dapp, web3
LunDAO
LunDAO 是一個鼓勵撰寫與 Ethereum 社群相關的中深度的中文文章,透過一個短期的實驗專案嘗試 DAO 可以如何進行社群治理以及回饋社群貢獻。
Stars: ✭ 50 (+108.33%)
Mutual labels:  dapp, web3
dtube
Decentralized video sharing & social media platform on Ethereum blockchain.
Stars: ✭ 70 (+191.67%)
Mutual labels:  dapp, web3
connect-metamask-react-dapp
Build a simple React / Web3 Dapp that replicates a small portion of the Uniswap v2 interface
Stars: ✭ 204 (+750%)
Mutual labels:  web3, metamask
sign-in-with-ethereum
Minimal example of sign in with Ethereum. Compatible with web3 browsers.
Stars: ✭ 25 (+4.17%)
Mutual labels:  web3, metamask
tiddlywiki-ipfs
IPFS with TiddlyWiki
Stars: ✭ 50 (+108.33%)
Mutual labels:  dapp, metamask
ton-client-js
Everscale Javascript SDK
Stars: ✭ 60 (+150%)
Mutual labels:  dapp, web3
SkyGallery
Create galleries by uploading images and videos. Powered by Sia Skynet.
Stars: ✭ 23 (-4.17%)
Mutual labels:  dapp, web3
zksync-dapp-checkout
zkCheckout — trustable permissionless DeFi payment gateway. Brand new zkSync dApp w/t all L2 perks: fast&cheap transfers / simple&quick withdrawal
Stars: ✭ 37 (+54.17%)
Mutual labels:  dapp, web3

ETHcommerce

Peer to Peer (P2P) transactions between you and your customers. This means that you pay ZERO FEES, all this powered by a lightweight (~30kb) and easy to integrate Javascript library

You can find usage examples here

Available on NPM

Installation

npm install eth-commerce --save

Usage

const ethCommerce = new EthCommerce();
ethCommerce.render(
    {
        targetElement: 'pay-button',
        type: 'PAY',
        amount: 10,
        currency: 'USD',
        address: '0x11A7Ca870700f284e4647E55DeD9040f0F86D4D4'
    }, (e)=>{
        console.log('error callback', e);
    },(tx)=>{
        console.log('success callback', tx);
    }
);

Methods

render(options, errorCallback, successCallback)

options, errorCallback and successCallback are required

Renders a button based on the options and executes the corresponding callbacks after placing and confirm transaction

getEtherPriceIn(currency)

Returns a promise with the current ethereum value in the corresponding currency. Example values for currency are (USD, EUR, CNY, JPY, etc.)

sendTransaction(account, address, amount)

Returns a promise after sending a transaction from the available account in web3 (account) to address with the corresponding amount

waitForConfirmation(tx, minConfirmations, interval)

Keeps polling the current block every ${interval} seconds until receiving ${minConfirmations} Then executes the success callback

TODO LIST:

  • Add support for React Native
  • Add tests
  • Store the current state in localStorage to be able to restore it in case of page reload
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].