All Projects → kleros → kleros-api-DEPRECATED

kleros / kleros-api-DEPRECATED

Licence: MIT license
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.

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to kleros-api-DEPRECATED

court
The Kleros court user interface.
Stars: ✭ 19 (-5%)
Mutual labels:  dapp, web3, court
svelte-box
A truffle box for svelte
Stars: ✭ 60 (+200%)
Mutual labels:  dapp, testrpc
circles-myxogastria
Webapp and mobile client for Circles
Stars: ✭ 32 (+60%)
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 (+115%)
Mutual labels:  dapp, web3
airswap-web
AirSwap Web App
Stars: ✭ 94 (+370%)
Mutual labels:  dapp, web3
nft-swap-sdk
Ethereum's missing p2p NFT and token swap library for web3 developers. Written in TypeScript. Powered by 0x.
Stars: ✭ 200 (+900%)
Mutual labels:  dapp, web3
SkyGallery
Create galleries by uploading images and videos. Powered by Sia Skynet.
Stars: ✭ 23 (+15%)
Mutual labels:  dapp, web3
Web3swift
Elegant Web3js functionality in Swift. Native ABI parsing and smart contract interactions.
Stars: ✭ 237 (+1085%)
Mutual labels:  dapp, web3
create-react-native-dapp
Your next Ethereum application starts here. ⚛️ 💪 🦄
Stars: ✭ 410 (+1950%)
Mutual labels:  dapp, web3
dtube
Decentralized video sharing & social media platform on Ethereum blockchain.
Stars: ✭ 70 (+250%)
Mutual labels:  dapp, web3
LunDAO
LunDAO 是一個鼓勵撰寫與 Ethereum 社群相關的中深度的中文文章,透過一個短期的實驗專案嘗試 DAO 可以如何進行社群治理以及回饋社群貢獻。
Stars: ✭ 50 (+150%)
Mutual labels:  dapp, web3
erebos
JavaScript client and CLI for Swarm
Stars: ✭ 47 (+135%)
Mutual labels:  dapp, web3
trystero
🤝 Serverless WebRTC matchmaking for painless P2P — Make any site multiplayer in a few lines — Use BitTorrent, IPFS, or Firebase
Stars: ✭ 512 (+2460%)
Mutual labels:  dapp, web3
vue-web3
🐙 Web3 blockchain bindings for Vue.js (inspired by Vuefire and Drizzle)
Stars: ✭ 63 (+215%)
Mutual labels:  dapp, web3
dxvote
Governance Dapp of DXdao
Stars: ✭ 28 (+40%)
Mutual labels:  dapp, web3
nextjs-dapp-starter-ts
A fullstack monorepo template to develop ethereum dapps
Stars: ✭ 228 (+1040%)
Mutual labels:  dapp, web3
Golden Wallet React Native
Golden - Best Wallet Ever
Stars: ✭ 201 (+905%)
Mutual labels:  dapp, web3
Frame
System-wide Web3 for macOS, Windows and Linux
Stars: ✭ 225 (+1025%)
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 (+85%)
Mutual labels:  dapp, web3
colonyDapp
Colony dApp client
Stars: ✭ 52 (+160%)
Mutual labels:  dapp, web3

Kleros API

NPM Version Build Status Coverage Status Dependencies Dev Dependencies Tested with Jest JavaScript Style Guide Styled with Prettier Conventional Commits Commitizen Friendly

This repository contains a Javascript library that provides methods to interact with Kleros arbitrator and Arbitrable contracts. It can be used to develop Relayers or DApps that use Kleros smart contracts.

Installation

yarn add kleros-api

Basic Usage

See the full API docs here.

The base Kleros object initializes all of the different kleros api's with the contract addresses you pass. This object is useful if your application interacts with both arbitrators, arbitrable contracts and uses an off chain store to provide metadata on the different disputes for the UI.

// pay arbitration fee.
import Kleros from 'kleros-api'

const KlerosInstance = new Kleros(
  ETH_PROVIDER, // ethereum provider object
  KLEROS_STORE_URI, // uri of off chain storage e.g. https://kleros.in
  ARITRATOR_CONTRACT_ADDRESS, // address of a deployed Kleros arbitrator contract
  ARBITRABLE_CONTRACT_ADDRESS // address of a deployed arbitrable transaction contract
)

KlerosInstance.arbitrable.payArbitrationFeeByPartyA() // pay arbitration fee for an arbitrable contract

You can also use the specific api that best suits your needs.

// deploy a new contract and pay the arbitration fee.
import ArbitrableTransaction from 'kleros-api/contracts/implementations/arbitrable/ArbitrableTransaction'

// deploy methods are static
const contractInstance = ArbitrableTransaction.deploy(
    "0x67a3f2BB8B4B2060875Bd6543156401B817bEd22", // users address
    0.15, // amount of ETH to escrow
    "0x0", // hash of the off chain contract
    "0x3af76ef44932695a33ba2af52018cd24a74c904f", // arbitrator address
    3600, // number of seconds until there is a timeout
    "0x0474b723bd4986808366E0DcC2E301515Aa742B4", // the other party in the contract
    "0x0", // extra data in bytes. This can be used to interact with the arbitrator contract
    ETH_PROVIDER, // provider object to be used to interact with the network
  )

const address = contractInstance.address // get the address of your newly created contract

const ArbitrableTransactionInstance = new ArbitrableTransaction(address) // instantiate instance of the api

ArbitrableTransactionInstance.payArbitrationFeeByPartyA() // pay arbitration fee

Development

If you want to contribute to our api or modify it for your usage

Setup

We assume that you have node and yarn installed.

yarn install

Test

yarn ganache
yarn test

Build

yarn run build
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].