Skip to content

Commit 29c9b74

Browse files
jrag0xgitbook-bot
authored andcommitted
GitBook: [master] 4 pages and 12 assets modified
1 parent 5894f42 commit 29c9b74

10 files changed

+99
-79
lines changed

integrations/integration-tools/escrow-sdk.md

Lines changed: 70 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
description: A class that lets you create and manage Kleros Escrow transactions.
33
---
44

5-
65
# Escrow SDK
76

87
This class lets you create and manage Kleros Escrow transactions. Use this Kleros Escrow SDK to easily integrate on-chain escrow features on your platform.
98

10-
```js
9+
```javascript
1110
import KlerosEscrow from "@kleros/components/kleros-escrow";
1211

1312
//...
@@ -19,183 +18,183 @@ import KlerosEscrow from "@kleros/components/kleros-escrow";
1918

2019
Constructs a `KlerosEscrow` instance.
2120

22-
#### Params `(web3, archon)`
21+
### Params `(web3, archon)`
2322

24-
| Name | Type | Description | Default |
25-
| ------ | -------- | ----------------------------------------------------- | ------------------------------------------------------------ |
26-
| web3\* | `Web3` | A Web3 instance. | |
23+
| Name | Type | Description | Default |
24+
| :--- | :--- | :--- | :--- |
25+
| web3\* | `Web3` | A Web3 instance. | |
2726
| archon | `Archon` | An [Archon](https://archon.readthedocs.io/) instance. | `new Archon(web3.currentProvider, "https://ipfs.kleros.io")` |
2827

29-
#### Returns `(KlerosEscrow)`
28+
### Returns `(KlerosEscrow)`
3029

3130
A `KlerosEscrow` instance.
3231

3332
## `klerosEscrow.getAccount`
3433

35-
#### Returns `(Promise<object>)`
34+
### Returns `(Promise<object>)`
3635

3736
A promise for the current account of the set Web3 instance or the one chosen in the prompt to connect when none is set.
3837

3938
## `klerosEscrow.setCourtAndCurrency`
4039

4140
Sets the court and currency that escrow transactions will use.
4241

43-
#### Params `(court = "blockchain-non-technical", currency)`
42+
### Params `(court = "blockchain-non-technical", currency)`
4443

45-
| Name | Type | Description | Default |
46-
| -------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
47-
| court | `string` | The court that will rule over any disputes arising from a transaction. `"general"` or `"blockchain-non-technical"`, or a custom [arbitrable transaction contract](https://github.com/kleros/escrow-contracts) address. | `"blockchain-non-technical"` |
48-
| currency | `string` | The address of the token the transaction should be paid in. Leave this undefined to use ETH. | |
44+
| Name | Type | Description | Default |
45+
| :--- | :--- | :--- | :--- |
46+
| court | `string` | The court that will rule over any disputes arising from a transaction. `"general"` or `"blockchain-non-technical"`, or a custom [arbitrable transaction contract](https://github.com/kleros/escrow-contracts) address. | `"blockchain-non-technical"` |
47+
| currency | `string` | The address of the token the transaction should be paid in. Leave this undefined to use ETH. | |
4948

50-
#### Returns `(Promise)`
49+
### Returns `(Promise)`
5150

5251
A promise that resolves when the court and currency are set.
5352

5453
## `klerosEscrow.upload`
5554

5655
Uploads files to Kleros' IPFS node.
5756

58-
#### Params `(fileName, bufferOrJSON)`
57+
### Params `(fileName, bufferOrJSON)`
5958

60-
| Name | Type | Description | Default |
61-
| -------------- | -------- | ------------------------------------ | ------- | ------------------- | --- |
62-
| fileName\* | `string` | The file name of the file to upload. | |
63-
| bufferOrJSON\* | `string | Buffer | object` | The file to upload. | |
59+
| Name | Type | Description | Default | | |
60+
| :--- | :--- | :--- | :--- | :--- | :--- |
61+
| fileName\* | `string` | The file name of the file to upload. | | | |
62+
| bufferOrJSON\* | \`string | Buffer | object\` | The file to upload. | |
6463

65-
#### Returns `(Promise<string>)`
64+
### Returns `(Promise<string>)`
6665

6766
A promise for the uploaded's file IPFS URI.
6867

6968
## `klerosEscrow.getTransactions`
7069

7170
Gets the list of transactions an address is involved in.
7271

73-
#### Params `(address)`
72+
### Params `(address)`
7473

75-
| Name | Type | Description | Default |
76-
| ------- | -------- | ------------------------------------ | ----------------------------------- |
74+
| Name | Type | Description | Default |
75+
| :--- | :--- | :--- | :--- |
7776
| address | `string` | The address to get transactions for. | `(await web3.eth.getAccounts())[0]` |
7877

79-
#### Returns `(Promise<object[]>)`
78+
### Returns `(Promise<object[]>)`
8079

8180
A promise for the list of transactions.
8281

8382
## `klerosEscrow.isSender`
8483

8584
Checks if the current Web3 account is the sender of a transaction.
8685

87-
#### Params `(transactionID)`
86+
### Params `(transactionID)`
8887

89-
| Name | Type | Description | Default |
90-
| --------------- | -------- | -------------------------- | ------- |
91-
| transactionID\* | `string` | The ID of the transaction. | |
88+
| Name | Type | Description | Default |
89+
| :--- | :--- | :--- | :--- |
90+
| transactionID\* | `string` | The ID of the transaction. | |
9291

93-
#### Returns `(Promise<boolean>)`
92+
### Returns `(Promise<boolean>)`
9493

9594
A promise for the answer.
9695

9796
## `klerosEscrow.createTransaction`
9897

9998
Creates an escrow transaction.
10099

101-
#### Params `(amount, recipient, timeout, metaEvidence)`
100+
### Params `(amount, recipient, timeout, metaEvidence)`
102101

103-
| Name | Type | Description | Default |
104-
| -------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------------------------------------------------------------- | --- |
105-
| amount\* | `number | string | BN` | The amount escrowed. | |
106-
| recipient\* | `string` | The address of the recipient. | |
107-
| timeout\* | `number | string | BN` | The time in seconds until the transaction becomes executable. | |
108-
| metaEvidence\* | `object` | The [meta evidence object](https://github.com/ethereum/EIPs/issues/1497) for any potential disputes arising. You can add an additional `file` property with a buffer, string, or object, and it will be uploaded to IPFS and `fileURI` will be set appropiately. | |
102+
| Name | Type | Description | Default | | |
103+
| :--- | :--- | :--- | :--- | :--- | :--- |
104+
| amount\* | \`number | string | BN\` | The amount escrowed. | |
105+
| recipient\* | `string` | The address of the recipient. | | | |
106+
| timeout\* | \`number | string | BN\` | The time in seconds until the transaction becomes executable. | |
107+
| metaEvidence\* | `object` | The [meta evidence object](https://github.com/ethereum/EIPs/issues/1497) for any potential disputes arising. You can add an additional `file` property with a buffer, string, or object, and it will be uploaded to IPFS and `fileURI` will be set appropiately. | | | |
109108

110-
#### Returns `(Promise<object>)`
109+
### Returns `(Promise<object>)`
111110

112111
A promise for the transaction's creation transaction.
113112

114113
## `klerosEscrow.pay`
115114

116115
Pays an amount of an escrowed transaction the current account is a sender in, to the recipient.
117116

118-
#### Params `(transactionID, amount)`
117+
### Params `(transactionID, amount)`
119118

120-
| Name | Type | Description | Default |
121-
| --------------- | -------- | -------------------------- | ------- | ------------------ | --- |
122-
| transactionID\* | `string` | The ID of the transaction. | |
123-
| amount\* | `number | string | BN` | The amount to pay. | |
119+
| Name | Type | Description | Default | | |
120+
| :--- | :--- | :--- | :--- | :--- | :--- |
121+
| transactionID\* | `string` | The ID of the transaction. | | | |
122+
| amount\* | \`number | string | BN\` | The amount to pay. | |
124123

125-
#### Returns `(Promise<object>)`
124+
### Returns `(Promise<object>)`
126125

127126
A promise for the payment's transaction.
128127

129128
## `klerosEscrow.reimburse`
130129

131130
Pays an amount of an escrowed transaction the current account is a recipient in, to the sender.
132131

133-
#### Params `(transactionID, amount)`
132+
### Params `(transactionID, amount)`
134133

135-
| Name | Type | Description | Default |
136-
| --------------- | -------- | -------------------------- | ------- | ------------------ | --- |
137-
| transactionID\* | `string` | The ID of the transaction. | |
138-
| amount\* | `number | string | BN` | The amount to pay. | |
134+
| Name | Type | Description | Default | | |
135+
| :--- | :--- | :--- | :--- | :--- | :--- |
136+
| transactionID\* | `string` | The ID of the transaction. | | | |
137+
| amount\* | \`number | string | BN\` | The amount to pay. | |
139138

140-
#### Returns `(Promise<object>)`
139+
### Returns `(Promise<object>)`
141140

142141
A promise for the payment's transaction.
143142

144143
## `klerosEscrow.executeTransaction`
145144

146145
Executes a transaction where the timeout has passed.
147146

148-
#### Params `(transactionID)`
147+
### Params `(transactionID)`
149148

150-
| Name | Type | Description | Default |
151-
| --------------- | -------- | -------------------------- | ------- |
152-
| transactionID\* | `string` | The ID of the transaction. | |
149+
| Name | Type | Description | Default |
150+
| :--- | :--- | :--- | :--- |
151+
| transactionID\* | `string` | The ID of the transaction. | |
153152

154-
#### Returns `(Promise<object>)`
153+
### Returns `(Promise<object>)`
155154

156155
A promise for the execution's transaction.
157156

158157
## `klerosEscrow.timeout`
159158

160159
Timesout the other party of an escrowed transaction the current account is involved in. This is for when they miss the deadline to pay arbitration fees.
161160

162-
#### Params `(transactionID)`
161+
### Params `(transactionID)`
163162

164-
| Name | Type | Description | Default |
165-
| --------------- | -------- | -------------------------- | ------- |
166-
| transactionID\* | `string` | The ID of the transaction. | |
163+
| Name | Type | Description | Default |
164+
| :--- | :--- | :--- | :--- |
165+
| transactionID\* | `string` | The ID of the transaction. | |
167166

168-
#### Returns `(Promise<object>)`
167+
### Returns `(Promise<object>)`
169168

170169
A promise for the timeout's transaction.
171170

172171
## `klerosEscrow.payArbitrationFee`
173172

174173
Pays arbitration fees for a transaction the current account is involved in.
175174

176-
#### Params `(transactionID, amount)`
175+
### Params `(transactionID, amount)`
177176

178-
| Name | Type | Description | Default |
179-
| --------------- | -------- | -------------------------- | ------- | ------------------ | --- |
180-
| transactionID\* | `string` | The ID of the transaction. | |
181-
| amount\* | `number | string | BN` | The amount to pay. | |
177+
| Name | Type | Description | Default | | |
178+
| :--- | :--- | :--- | :--- | :--- | :--- |
179+
| transactionID\* | `string` | The ID of the transaction. | | | |
180+
| amount\* | \`number | string | BN\` | The amount to pay. | |
182181

183-
#### Returns `(Promise<object>)`
182+
### Returns `(Promise<object>)`
184183

185184
A promise for the payment's transaction.
186185

187186
## `klerosEscrow.submitEvidence`
188187

189188
Uploads evidence to Kleros' IPFS node and submits it for a transaction.
190189

191-
#### Params `(transactionID, evidence)`
190+
### Params `(transactionID, evidence)`
192191

193-
| Name | Type | Description | Default |
194-
| --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
195-
| transactionID\* | `string` | The ID of the transaction. | |
196-
| evidence\* | `object` | The [evidence object](https://github.com/ethereum/EIPs/issues/1497) for any potential disputes arising. You can add an additional `file` property with a buffer, string, or object, and it will be uploaded to IPFS and `fileURI` will be set appropiately. | |
192+
| Name | Type | Description | Default |
193+
| :--- | :--- | :--- | :--- |
194+
| transactionID\* | `string` | The ID of the transaction. | |
195+
| evidence\* | `object` | The [evidence object](https://github.com/ethereum/EIPs/issues/1497) for any potential disputes arising. You can add an additional `file` property with a buffer, string, or object, and it will be uploaded to IPFS and `fileURI` will be set appropiately. | |
197196

198-
#### Returns `(Promise<object>)`
197+
### Returns `(Promise<object>)`
199198

200199
A promise for the submission's transaction.
201200

integrations/live-and-upcoming-integrations.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,44 @@ The Kleros ecosystem lives and breathes through the disputes brought back to the
1010

1111
## Live Integrations
1212

13-
### Omen
13+
### ⚖️ Projects using Kleros arbitration directly ⚖️
1414

15-
The [Omen](https://omen.eth.link/) prediction market \(on Ethereum mainnet and xDai\):
15+
### Unslashed Finance
1616

17-
* uses the [Kleros Oracle](https://kleros.gitbook.io/docs/products/oracle) solution \(Reality.eth \(bond escalation\) + Kleros Court \(Arbitration\)\) to rule on the outcome of events that are being predicted in their markets. For example, Kleros jurors rules on famous disputes about the number of Covid deaths in the US in July 2020 \([Case 302](https://thedailychain.com/an-important-case-for-the-decentralized-world-with-kleros/)\) and about the winner of 2020 US presidential election \([Case 532](https://twitter.com/jimmyragosa/status/1341293611682553856?lang=en)\)
18-
* uses a [Kleros Curate](https://curate.kleros.io/tcr/0xb72103eE8819F2480c25d306eEAb7c3382fBA612) list to curate "Verified Markets" that are well written according to acceptance criteria and to display a "Verified" badge next to them on their UI. It allows users to easily be reassured that they are not participating in a "tricky" market designed to fool the outcome shares buyers.
17+
### Other Arbitrable apps
1918

20-
![](../.gitbook/assets/image%20%2863%29.png)
19+
* [Proof of Humanity](https://kleros.gitbook.io/docs/products/proof-of-humanity)
20+
* [Tokens](https://kleros.gitbook.io/docs/products/tokens)
21+
* [Curate](https://kleros.gitbook.io/docs/products/curate)
22+
* [Escrow](https://kleros.gitbook.io/docs/products/escrow)
23+
* [Linguo](https://kleros.gitbook.io/docs/products/linguo)
24+
* [Governor](https://kleros.gitbook.io/docs/products/governor)
25+
* [Reality.eth](https://kleros.gitbook.io/docs/products/oracle)
26+
27+
### 🔮 Projects using Kleros arbitration through Reality.eth oracle 🔮
28+
29+
### Omen
30+
31+
The [Omen](https://omen.eth.link/) prediction market \(on Ethereum mainnet and xDai\) uses the [Kleros Oracle](https://kleros.gitbook.io/docs/products/oracle) solution \(Reality.eth \(bond escalation\) + Kleros Court \(Arbitration\)\) to rule on the outcome of events that are being predicted in their markets. For example, Kleros jurors rules on famous disputes about the number of Covid deaths in the US in July 2020 \([Case 302](https://thedailychain.com/an-important-case-for-the-decentralized-world-with-kleros/)\) and about the winner of 2020 US presidential election \([Case 532](https://twitter.com/jimmyragosa/status/1341293611682553856?lang=en)\)
2132

2233
### Gnosis Safe SafeSnap
2334

2435
The [Gnosis Safe](https://gnosis-safe.io/) multi-sig wallet can be used for DAO governance purposes thanks to the [SafeSnap](https://blog.gnosis.pm/introducing-safesnap-the-first-in-a-decentralized-governance-tool-suite-for-the-gnosis-safe-ea67eb95c34f) module. This module is using the [Kleros Oracle](https://kleros.gitbook.io/docs/products/oracle) solution \(Reality.eth \(bond escalation\) + Kleros Court \(Arbitration\)\) to effectively enforce on-chain the implementation and triggering of the proposals voted on by the DAO on Snapshot.
2536

37+
### 📝 Projects using Kleros arbitration through Curate TCRs 📝
38+
2639
### CLR.fund
2740

2841
The [clr.fund](https://clr.fund/) public goods funding protocol uses a [Kleros Curate](https://curate.kleros.io/tcr/0x2E3B10aBf091cdc53cC892A50daBDb432e220398) list to curate public goods projects that are eligible to receive donations through quadratic funding. It enables the open and fair filtering of non-public goods projects that would diminish the matching of donations for compliant projects.
2942

43+
### Omen
44+
45+
The [Omen](https://omen.eth.link/) prediction market \(on Ethereum mainnet and xDai\) uses a [Kleros Curate](https://curate.kleros.io/tcr/0xb72103eE8819F2480c25d306eEAb7c3382fBA612) list to curate "Verified Markets" that are well written according to acceptance criteria and to display a "Verified" badge next to them on their UI. It allows users to easily be reassured that they are not participating in a "tricky" market designed to fool the outcome shares buyers.
46+
47+
![](../.gitbook/assets/image%20%2863%29.png)
48+
49+
### 📝 Projects using Kleros arbitration through Tokens TCR
50+
3051
### Uniswap / Sushiswap
3152

3253
Both [Uniswap](https://uniswap.org/) and [Sushiswap](https://sushi.com/) decentralized exchanges use [Kleros Tokens](https://tokens.kleros.io/tokens) as one of their token lists to be selected to trade on their UIs. This [token list](https://tokenlists.org/token-list?url=t2crtokens.eth) is the only one to be completely open, decentralized, and managed by the community.

integrations/types-of-integrations/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: Have a look at the paths to integration
66

77
Kleros Court is the implementation of an arbitrator as per the [Arbitration standard](https://kleros.gitbook.io/docs/developer/erc-792-arbitration-standard) we developed. Most integrations consist in building or customizing an Arbitrable app so it can request arbitration to Kleros Court. Once you integrate with the Arbitration standard, you \(or your users\) will be able to choose any arbitrator that follows the standard to solve disputes, including Kleros.
88

9-
![](../../.gitbook/assets/image%20%2848%29%20%283%29%20%283%29%20%283%29.png)
9+
![](../../.gitbook/assets/image%20%2848%29%20%283%29%20%283%29%20%283%29%20%282%29.png)
1010

1111
Integrating with Kleros Court can be done today by:
1212

0 commit comments

Comments
 (0)