Skip to content

Commit f638108

Browse files
Merge pull request #9 from iExecBlockchainComputing/release/0.0.1-alpha
Release/0.0.1 alpha
2 parents 0679e5b + 31d44fa commit f638108

File tree

177 files changed

+43393
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+43393
-1
lines changed

.drone.yml

Lines changed: 1293 additions & 0 deletions
Large diffs are not rendered by default.

.eslintignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
**/coverage/
2+
**/dapp/
3+
**/deployment-dapp/
4+
**/examples/
5+
**/dist/
6+
**/node_modules/

.eslintrc.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"plugins": ["@typescript-eslint", "import", "sonarjs", "jest"],
4+
"parserOptions": {
5+
"ecmaVersion": "latest",
6+
"project": "./tsconfig.eslint.json",
7+
"sourceType": "module"
8+
},
9+
"extends": [
10+
"airbnb-typescript/base",
11+
"plugin:@typescript-eslint/recommended",
12+
"prettier",
13+
"plugin:sonarjs/recommended",
14+
"plugin:jest/recommended"
15+
],
16+
"rules": {
17+
"sonarjs/cognitive-complexity": "warn",
18+
"@typescript-eslint/no-explicit-any": "warn",
19+
"@typescript-eslint/no-use-before-define": ["error", { "functions": false }]
20+
},
21+
"overrides": [
22+
{
23+
"files": ["./tests/**/*.ts"],
24+
"rules": {
25+
"import/no-extraneous-dependencies": [
26+
"error",
27+
{
28+
"devDependencies": true
29+
}
30+
],
31+
"@typescript-eslint/no-explicit-any": "off",
32+
"sonarjs/no-duplicate-string": "off"
33+
}
34+
}
35+
]
36+
}

.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Compiled output
2+
/dist
3+
4+
# Dependency directories
5+
**/node_modules/
6+
7+
# IDE files
8+
/.vscode
9+
/.idea
10+
11+
# Miscellaneous
12+
/.DS_Store
13+
/.env
14+
/*.log
15+
/*.env
16+
17+
# TypeScript specific
18+
*.tsbuildinfo
19+
20+
# tests output
21+
/coverage
22+
# CI
23+
# .drone.yml
24+
25+
26+
# sonar output
27+
.scannerwork
28+
29+
#dist
30+
**/dist/

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18

.prettierrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"printWidth": 80,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"semi": true,
6+
"singleQuote": true,
7+
"trailingComma": "es5",
8+
"bracketSpacing": true,
9+
"arrowParens": "always",
10+
"endOfLine": "lf"
11+
}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
## [0.0.1-alpha] Initial release

README.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<p align="center">
2+
<a href="https://iex.ec/" rel="noopener" target="_blank"><img width="150" src="./logo-iexec.png" alt="iExec logo"/></a>
3+
</p>
4+
5+
<h1 align="center">Web3Telegram</h1>
6+
7+
**Web3Telegram** offers developers methods to create apps that:
8+
9+
- enable an entity (such as a (d)app provider or an end-user) to message an Ethereum account holder without knowing her/his chatId or telegram username.
10+
- eliminate the need for end-users to share their chatId or telegram username with multiple third-parties, reducing the risk of data breaches and spam.
11+
12+
Web3Telegram is composed of 2 methods:
13+
14+
- **fetchMyContacts** — that enables an entity to retrieve a list of Ethereum accounts whose owners have authorized the entity to message them
15+
- **fetchUserContacts** — that enables an entity to retrieve a list of Ethereum accounts whose owners have authorized the provided user to message them
16+
- **sendTelegram** — that allows an entity to message a user on telegram (previously fetched via the fetchMyContacts method) knowing only her/his Ethereum account.
17+
18+
<div align="center">
19+
20+
[![npm](https://img.shields.io/npm/v/@iexec/web3telegram)](https://www.npmjs.com/package/@iexec/web3telegram)[![license](https://img.shields.io/badge/license-Apache%202-blue)](/LICENSE)
21+
22+
</div>
23+
24+
## Installation
25+
26+
Web3Telegram will be available as an [npm package](https://www.npmjs.com/package/@iexec/web3telegram).
27+
28+
**npm:**
29+
30+
```sh
31+
npm install @iexec/web3telegram
32+
```
33+
34+
**yarn:**
35+
36+
```sh
37+
yarn add @iexec/web3telegram
38+
```
39+
40+
## Get started
41+
42+
### Browser
43+
44+
```ts
45+
import { IExecWeb3telegram } from '@iexec/web3telegram';
46+
47+
const web3Provider = window.ethereum;
48+
const web3telegram = new IExecWeb3telegram(web3Provider);
49+
```
50+
51+
### NodeJS
52+
53+
```ts
54+
import { IExecWeb3telegram, getWeb3Provider } from '@iexec/web3telegram';
55+
56+
const { PRIVATE_KEY } = process.env;
57+
58+
const web3Provider = getWeb3Provider(PRIVATE_KEY);
59+
const web3telegram = new IExecWeb3telegram(web3Provider);
60+
```
61+
62+
## Documentation
63+
64+
- [Web3telegram documentation](https://tools.docs.iex.ec/tools/web3telegram)
65+
- [Web3telegram technical design](./technical-design/index.md)
66+
- [iExec Protocol documentation](https://protocol.docs.iex.ec)
67+
68+
## License
69+
70+
This project is licensed under the terms of the [Apache 2.0](/LICENSE).

dapp/.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.env
2+
.env.schema

dapp/.env.override

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
IEXEC_IN=/path/to/input/directory
2+
IEXEC_OUT=/path/to/output/directory
3+
IEXEC_DATASET_FILENAME="protectedData.zip"
4+
IEXEC_APP_DEVELOPER_SECRET='{"TELEGRAM_BOT_TOKEN":"7045386731:AAGSmPQQ_t2Po5eDob7rUEWEZ25W-s2t9fg"}'
5+
IEXEC_REQUESTER_SECRET_1='{"chatId":"chatId","message":"message","telegramContentEncryptionKey":"telegramContentEncryptionKey"}'

0 commit comments

Comments
 (0)