-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into aaronmgdr/build4
* master: (61 commits) [Wallet] Handle `/v/<code` deep links for phone verifications (#1776) Patch tslint auto fix for macOS Catalina until tslint#6.x is out (#1802) Fix typos (#1855) Update documentation sidebar (#1861) [Wallet] Update forno dev documentation (#1818) [Docs] Correct typo Validator UX docs for baklava network (#1688) (#1849) Various improvements to the CLI, allow voters to revote for a group (#1840) Serialize to hex string (#1848) Update faucet to pull from the reserve when possible (#1844) Fix elect validators migration, deploy integration (#1847) Configurable genesis balances (#1838) Deploy new version of Celostats and minnor change from celo-blockchain (#1714) Make default node URL consistent in celocli (#1805) Onboarding feedback (#1811) return at least true, when the function is returning bool (#1825) Minor Contractkit changes (#1819) Point end-to-end tests back to master (#1824) Update migration config to correct protocol parameters (#1822) Update with new istanbul lookback window size flag (#1820) ... # Conflicts: # yarn.lock
- Loading branch information
Showing
374 changed files
with
9,436 additions
and
8,978 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Attestation Service | ||
|
||
A service run by validators on the Celo network to send SMS messages, enabling attestations of user phone numbers and their accounts on the Celo network. | ||
|
||
### Configuration | ||
|
||
You can use the following environment variables to configure the attestation service: | ||
|
||
- `DATABASE_URL` - The URL under which your database is accessible, currently supported are `postgres://`, `mysql://` and `sqlite://` | ||
- `CELO_PROVIDER` - The URL under which a celo blockchain node is reachable, i.e. something like `https://integration-forno.celo-testnet.org` | ||
- `ACCOUNT_ADDRESS` - The address of the account on the `Accounts` smart contract | ||
- `ATTESTATION_KEY` - The private key with which attestations should be signed. You could use your account key for attestations, but really you should authorize a dedicated attestation key | ||
- `APP_SIGNATURE` - The hash with which clients can auto-read SMS messages on android | ||
- `SMS_PROVIDERS` - A comma-separated list of providers you want to configure, we currently support: | ||
|
||
`nexmo` | ||
|
||
- `NEXMO_KEY` - The API key to the Nexmo API | ||
- `NEXMO_SECRET` - The API secret to the Nexmo API | ||
- `NEXMO_BLACKLIST` - A comma-sperated list of country codes you do not want to serve | ||
|
||
`twilio` | ||
|
||
- `TWILIO_ACCOUNT_SID` - The SID of your Twilio account | ||
- `TWILIO_MESSAGE_SERVICE_SID` - The SID of the messaging service you want to use. The messaging service should have at least 1 phone number associated with it. | ||
- `TWILIO_AUTH_TOKEN` - The auth token for your Twilio account | ||
|
||
### Operations | ||
|
||
This service uses `bunyan` for structured logging with JSON lines. You can pipe STDOUT to `yarn run bunyan` for a more human friendly output. The `LOG_LEVEL` environment variable can specify desired log levels. With `LOG_FORMAT=stackdriver` you can get stackdriver specific format to recover information such as error traces etc. | ||
|
||
This service exposes prometheus metrics under `/metrics`. | ||
|
||
### Running locally | ||
|
||
After checking out the source, you should create a local sqlite database by running: | ||
|
||
```sh | ||
yarn run db:create:dev | ||
yarn run db:migrate:dev | ||
``` | ||
|
||
You will also have to set the environment variables in `.env.development` | ||
|
||
Then start the service with `yarn run dev` (you'll have to add the appropriate credentials for the text providers) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
declare module 'nexmo' | ||
declare module 'express-request-id' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"ignore": ["**/*.test.ts", "**/*.spec.ts", ".git", "node_modules"], | ||
"watch": ["src"], | ||
"exec": "yarn start", | ||
"exec": "yarn start-ts", | ||
"ext": "ts" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.