Coder Social home page Coder Social logo

interledger / testnet Goto Github PK

View Code? Open in Web Editor NEW
45.0 8.0 19.0 7.3 MB

An open-source test application that aims to utilize Rafiki's functionalities and demonstrate its advantages in real-world scenarios.

Home Page: https://rafiki.money

License: Apache License 2.0

JavaScript 2.66% TypeScript 97.23% CSS 0.08% HTML 0.03%
hacktoberfest ilp interledger open-payments rafiki

testnet's Introduction

Test Network

Test wallet picture

What is Test Network?

Test Network is an open Interledger network working with test money designed for account servicing entities to test their Interledger integration.

Test Network currently includes an Interledger Test Wallet application, an e-commerce application and in the near future, a bank application.

If you are curious about the Interledger Test Wallet architecture diagram, then follow this link.

See Test Network in action:

What is Rafiki?

Rafiki is an open-source package that exposes a comprehensive set of Interledger APIs. It's intended to be run by wallet providers, allowing them to offer Interledger functionality to their users.

New to Interledger?

Never heard of Interledger before, or you would like to learn more? Here are some good places to start:

Contributing

Please read the contribution guidelines before submitting contributions. All contributions must adhere to our code of conduct.

Local Development Environment

Prerequisites

Environment Setup

# Install Node 20
nvm install lts/iron
nvm use lts/iron

# Install pnpm using Corepack
corepack enable

If you do not have corepack installed locally you can use npm or yarn to install pnpm:

npm install pnpm -g
# or
yarn install pnpm -g

For alternative methods of installing pnpm, you can refer to the official pnpm documentation.

To install dependencies, execute:

pnpm i

Environment Variables

In order for the Test Wallet and Test e-commerce playground to function, it is necessary to configure the environment variables appropriately. You must duplicate the example environment file, .env.example, into your local environment file, .env.

Note The local environment file (.env) is NOT tracked in the version control system, and should NOT be included in any commits.

Navigate to the project's root directory and enter the following command:

cp ./docker/dev/.env.example ./docker/dev/.env

Using your preferred text editor, open the ./docker/dev/.env file and configure the necessary environment variables. The RAPYD_ACCESS_KEY and RAPYD_SECRET_KEY variables values can be found in your Rapyd Sandbox account (you need to create an account at rapyd.net), under the Developers menu item. The RAPYD_SETTLEMENT_EWALLET variable value can be found in your Rapyd Sandbox account details.

To create a new Interledger Test Wallet account, a verification email will be sent to the provided email address. If you want to send emails within the development environment, you will need to have a personal Sendgrid account and update the following environment variables: SEND_EMAIL to true, SENDGRID_API_KEY and FROM_EMAIL. If you prefer not to send emails in the development environment, simply set SEND_EMAIL to false and use the verification link found in the Docker wallet-backend container logs to finalize the registration process for a new user.

Cross-currency transactions are supported. To enable this functionality, you will need to register at freecurrencyapi.com/ and update the RATE_API_KEY environment variable with your own API key. Currencies can be added in the admin environment. For example assetCode is EUR, assetScale is 2, and you will need to add an amount to liquidity.

To have everything ready for DEV environment, we already set up some default values for Interledger Test Wallet, this way developers are ready to login without validation, and test e-commerce application without any additional setup:

  • a USD asset set by default in the admin environment
  • a user with email address [email protected] and password 123456, with a USD account, payment pointer and test money
  • a user with email address [email protected] and password 123456, with a USD account and a payment pointer boutique, which is used as a receiver payment pointer at the e-commerce application
  • developer keys for the boutique payment pointer, these values will be copied to .env file from .env.example, as mentioned above

If you would like to set up e-commerce application manually for another payment pointer, you will need to create a USD payment pointer, then generate public and private key for the payment pointer in the Developer Keys found in the Settings menu of Interledger Test Wallet. You also need to update the following environment variables: PRIVATE_KEY to the generated base64 encoded private key, KEY_ID to the payment pointer key id and PAYMENT_POINTER to the created payment pointer address.

Local Playground

Navigate to the project's root directory and execute:

pnpm dev

Upon executing the above command, the following will be available

testnet's People

Contributors

aayushborkar14 avatar alexlakatos avatar beniaminmunteanu avatar cryptofan1013 avatar cyberdad68 avatar daniloff200 avatar devcer avatar dragosp1011 avatar farukhs52 avatar fsalker avatar golobitch avatar heetvekariya avatar huijing avatar lengyel-arpad85 avatar mkurapov avatar raducristianpopa avatar renovate[bot] avatar rico191013 avatar sobanejaz avatar tymmmy avatar umeshsinghverma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

testnet's Issues

Rapyd Identity Verification (Backend)

Rapyd doc

When the customer provides the selfie and document images, you send an identity verification request to Rapyd.
For that, you'll use Verify Identity with the following parameters:

  • country: Enter US as the country code for the customer's country of residence.
  • document_type: Enter PA as the code for the customer's identification document - his passport.
  • ewallet_id: Enter the wallet 'id' that you received when you created the wallet in your sandbox. For purposes of this use case lesson, we are using ewallet_4250f5f5f9492a9425cb2061fac8c2f1, which is the wallet ID we created in our sandbox.
  • face_image: Enter the base-64 encoded image of the customer's face. In the example below, we show just the first few bytes of the multi-megabyte image. You can use the test image that appears in the Test Image tab, below.
  • front_side_image: Enter the base-64 encoded image of the identification page of the customer's passport. In the example below, we show just the first few bytes of the multi-megabyte image. You can use the test image that appears in the Test Image tab, below.
  • reference_id: ID of the identity verification request. Must be unique for each request. Defined by the client. Maximum length: 36 characters.

In sandbox, to simulate success or failure, the string must contain one of the following values: success, failure. For example: 12345678success

Create A Rapyd Wallet (Backend)

Rapyd doc

To create a Rapyd Wallet, you'll use Create Wallet with the following parameters:

  • contact: Describes details about the wallet contacts. Array of objects. See Wallet Contact Object.
  • email: Email address of the wallet owner.
  • ewallet_reference_id: Rapyd Wallet ID defined by the customer or end user. Must be unique.
  • first_name: First name of the Rapyd Wallet owner.
  • last_name: Family name of the Rapyd Wallet owner.
  • metadata: A JSON object defined by the client.
  • phone_number: Phone number of the wallet owner in E.164 format.
  • type: Type of wallet: company or person. Default is person.

Create List of Accounts page (BE)

Return Balance and list of accounts for the wallet to display on home page.

The accounts in our DB need to be mapped with accounts with funds on Rapyd side.
Our DB might have an account with a specific currency and Rapyd have 0 funds in that currency. This means that we still display this account with Balance=0, even if Rapyd doesn't have this type of currency account.

Usefull links:
Retrieve Rapyd Wallet balances:
https://docs.rapyd.net/build-with-rapyd/reference/wallet-transaction#retrieve-wallet-balances

image

image

Create Grants (BE)

Grants from Open Payments
(Grant access or revoke access from someone to take money on a regular basis (ex. monthly subscription)

We will have a list of Grants displayed and posibility to Revoke Grant.

Use the Developer Keys from Settings in Open Payments

Use actual JWkeys from Settings/Developers menu in Open Payments, to use in Payments API.
image

  1. User generates EdDSA-Ed25519 key on their machine, or user can generate it using generateKey api on backend.
  2. User Goes to the testnet developer key page, selects payment pointer
  3. Uploads public key for the selected payment pointer
  4. testnet takes key and generates JWK from it, to then call createPaymentPointerKey mutation to Rafiki

Change KYC forms to fit Rapyd requests (FE)

Rapyd requires more fields in KYC Personal details - Create a new Rapyd Wallet for step 1, and for step 2 Verify Identity.
Add new fields in KYC forms to fit Rapyd requirements.

Create Fund Account functionality (BE)

Fund selected account with play money

For now we are using play money, not real money from bank account.
The frontend sends amount and account to be funded.

Step 1 - When user completes Create a new account with Success then we need to Issue a Virtual Account Number to the Rapyd wallet in that currency: https://docs.rapyd.net/build-with-rapyd/reference/virtual-account#issue-virtual-account-number-to-wallet

Step 2 - When the user Funds wallet we need to Simulate a Bank Transfer to the Rapyd Wallet. Endpoint will be /fund. Sending the Account Name, Asset, Value(Amount) https://docs.rapyd.net/build-with-rapyd/reference/virtual-account#simulate-a-bank-transfer-to-a-wallet

image

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency prettier to ^3.3.2
  • chore(deps): update dependency vite to ^5.3.1
  • chore(deps): update typescript-eslint monorepo to ^7.13.1 (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • fix(deps): update dependency @hookform/resolvers to ^3.6.0
  • fix(deps): update dependency @radix-ui/react-label to ^2.1.0
  • fix(deps): update dependency @radix-ui/react-slot to ^1.1.0
  • fix(deps): update dependency @radix-ui/react-tabs to ^1.1.0
  • fix(deps): update dependency @tanstack/react-query to ^5.45.1
  • fix(deps): update dependency express-rate-limit to ^7.3.1
  • fix(deps): update dependency framer-motion to ^11.2.11
  • fix(deps): update dependency ky to ^1.3.0
  • fix(deps): update dependency pg to ^8.12.0
  • fix(deps): update dependency react-hook-form to ^7.52.0
  • fix(deps): update dependency react-router-dom to ^6.23.1
  • chore(deps): update docker/build-push-action action to v6
  • chore(deps): update stefanzweifel/git-auto-commit-action action to v5
  • fix(deps): update dependency @headlessui/react to v2
  • fix(deps): update dependency graphql-request to v7
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Pending Status Checks

These updates await pending status checks. To force their creation now, click the checkbox below.

  • chore(deps): update dependency tsc-alias to ^1.8.10
  • fix(deps): update dependency graphql to ^16.8.2
  • chore(deps): update dependency testcontainers to ^10.9.0
  • chore(deps): update dependency typescript to ^5.5.2
  • chore(deps): update react monorepo (@types/react, @types/react-dom, eslint-plugin-react-hooks, react, react-dom)
  • fix(deps): update dependency @radix-ui/react-dialog to ^1.1.1
  • fix(deps): update dependency @radix-ui/react-dropdown-menu to ^2.1.1
  • fix(deps): update dependency @radix-ui/react-popover to ^1.1.1
  • fix(deps): update dependency @radix-ui/react-toast to ^1.2.1
  • chore(deps): update dependency eslint to v9
  • fix(deps): update dependency uuid to v10 (uuid, @types/uuid)

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

docker-compose
docker/dev/docker-compose.yml
  • postgres 15
  • ghcr.io/interledger/rafiki-auth v1.0.0-alpha.10
  • ghcr.io/interledger/rafiki-backend v1.0.0-alpha.10
  • ghcr.io/interledger/rafiki-frontend v1.0.0-alpha.10
  • ghcr.io/tigerbeetle/tigerbeetle 0.15.3
  • redis 7
docker/prod/docker-compose.yml
  • postgres 15
  • ghcr.io/interledger/rafiki-auth v1.0.0-alpha.10
  • ghcr.io/interledger/rafiki-backend v1.0.0-alpha.10
  • ghcr.io/interledger/rafiki-frontend v1.0.0-alpha.10
  • ghcr.io/tigerbeetle/tigerbeetle 0.15.3
  • redis 7
dockerfile
packages/boutique/backend/Dockerfile.dev
  • node iron-slim
packages/boutique/backend/Dockerfile.prod
  • node 20-alpine
  • node 20-alpine
packages/boutique/frontend/Dockerfile.prod
  • node 20-alpine
packages/wallet/backend/Dockerfile.dev
  • node iron-slim
packages/wallet/backend/Dockerfile.prod
  • node 20-alpine
  • node 20-alpine
packages/wallet/frontend/Dockerfile.dev
  • node iron-slim
packages/wallet/frontend/Dockerfile.prod
  • node 20-alpine
  • node 20-alpine
github-actions
.github/workflows/build-publish.yaml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/checkout v4
  • docker/setup-qemu-action v3
  • docker/setup-buildx-action v3
  • docker/login-action v3
  • docker/build-push-action v5
  • actions/checkout v4
  • requarks/changelog-action v1
  • ncipollo/release-action v1.14.0
  • stefanzweifel/git-auto-commit-action v4
.github/workflows/ci.yml
  • actions/checkout v4
  • actions/checkout v4
  • actions/checkout v4
  • actions/checkout v4
  • actions/checkout v4
  • actions/checkout v4
  • actions/checkout v4
.github/workflows/deploy.yml
  • actions/checkout v4
  • mikepenz/release-changelog-builder-action v4.2.2
  • softprops/action-gh-release v2
.github/workflows/pr_labeler.yml
  • actions/labeler v4
.github/workflows/pr_title_check.yml
  • amannn/action-semantic-pull-request v5
.github/workflows/setup/action.yml
  • actions/setup-node v4
  • actions/cache v4
npm
package.json
  • @typescript-eslint/eslint-plugin ^7.7.0
  • @typescript-eslint/parser ^7.7.0
  • concurrently ^8.2.2
  • eslint ^8.57.0
  • eslint-config-prettier ^9.1.0
  • eslint-plugin-react ^7.34.3
  • eslint-plugin-react-hooks ^4.6.0
  • only-allow ^1.2.1
  • prettier ^3.2.5
  • prettier-plugin-tailwindcss ^0.6.5
  • typescript ^5.4.5
  • pnpm ^9.1.4
  • node ^20.12.1
  • pnpm 9.1.4
packages/boutique/backend/package.json
  • @google-cloud/logging-winston ^6.0.0
  • @interledger/open-payments ^6.9.0
  • awilix ^10.0.2
  • axios ^1.7.2
  • cors ^2.8.5
  • express ^4.19.2
  • helmet ^7.1.0
  • knex ^3.1.0
  • objection ^3.1.4
  • pg ^8.11.5
  • winston ^3.13.0
  • zod ^3.23.8
  • @types/cors ^2.8.17
  • @types/express ^4.17.21
  • @types/jest ^29.5.12
  • @types/node ^20.12.11
  • jest ^29.7.0
  • node-mocks-http ^1.14.1
  • ts-jest ^29.1.5
  • tsc-alias ^1.8.8
  • typescript ^5.4.5
packages/boutique/frontend/package.json
  • @hookform/resolvers ^3.3.4
  • @radix-ui/react-dialog ^1.0.5
  • @radix-ui/react-dropdown-menu ^2.0.6
  • @radix-ui/react-label ^2.0.2
  • @radix-ui/react-popover ^1.0.7
  • @radix-ui/react-slot ^1.0.2
  • @radix-ui/react-tabs ^1.0.4
  • @radix-ui/react-toast ^1.1.5
  • @tanstack/react-query ^5.29.0
  • class-variance-authority ^0.7.0
  • framer-motion ^11.0.25
  • react ^18.2.0
  • react-dom ^18.2.0
  • react-hook-form ^7.51.5
  • react-router-dom ^6.22.3
  • remix-params-helper ^0.5.1
  • tailwind-merge ^2.3.0
  • tailwindcss-animate ^1.0.7
  • valtio ^1.13.2
  • zod ^3.23.8
  • @tailwindcss/forms ^0.5.7
  • @tailwindcss/typography ^0.5.13
  • @types/react 18.2.79
  • @types/react-dom 18.2.25
  • @vitejs/plugin-react-swc ^3.6.0
  • autoprefixer ^10.4.19
  • postcss ^8.4.38
  • tailwindcss ^3.4.4
  • typescript ^5.4.5
  • vite ^5.2.13
packages/boutique/shared/package.json
  • zod ^3.23.8
  • @types/node ^20.12.7
packages/shared/backend/package.json
  • @google-cloud/logging-winston ^6.0.0
  • awilix ^10.0.2
  • express ^4.19.2
  • objection ^3.1.4
  • knex ^3.1.0
  • winston ^3.13.0
  • axios ^1.7.2
  • @types/node ^20.12.11
  • tsc-alias ^1.8.8
  • typescript ^5.4.5
  • @types/express ^4.17.21
  • ioredis ^5.4.1
packages/wallet/backend/package.json
  • @google-cloud/logging-winston ^6.0.0
  • @sendgrid/mail ^8.1.3
  • awilix ^10.0.2
  • axios ^1.7.2
  • cors ^2.8.5
  • crypto-js ^4.2.0
  • date-fns ^3.6.0
  • disposable-email-domains ^1.0.62
  • express ^4.19.2
  • express-rate-limit ^7.2.0
  • graphql ^16.8.1
  • graphql-request ^6.1.0
  • hash-wasm ^4.11.0
  • helmet ^7.1.0
  • ioredis ^5.4.1
  • iron-session ^6.3.1
  • knex ^3.1.0
  • moment ^2.30.1
  • node-cache ^5.1.2
  • objection ^3.1.4
  • pg ^8.11.5
  • randexp ^0.5.3
  • socket.io ^4.7.5
  • uuid ^9.0.1
  • winston ^3.13.0
  • zod ^3.23.8
  • @faker-js/faker ^8.4.1
  • @graphql-codegen/cli ^5.0.2
  • @graphql-codegen/typescript ^4.0.6
  • @graphql-codegen/typescript-operations ^4.2.0
  • @types/cors ^2.8.17
  • @types/crypto-js ^4.2.2
  • @types/express ^4.17.21
  • @types/jest ^29.5.12
  • @types/node ^20.12.11
  • @types/uuid ^9.0.8
  • jest ^29.7.0
  • node-mocks-http ^1.14.1
  • testcontainers ^10.8.2
  • ts-jest ^29.1.5
  • tsc-alias ^1.8.8
  • typescript ^5.4.5
packages/wallet/frontend/package.json
  • @headlessui/react ^1.7.19
  • @hookform/resolvers ^3.3.4
  • @radix-ui/react-toast ^1.1.5
  • class-variance-authority ^0.7.0
  • ky ^1.2.3
  • next 13.4.12
  • nprogress ^0.2.0
  • react 18.2.0
  • react-dom 18.2.0
  • react-hook-form ^7.51.5
  • react-joyride ^2.5.4
  • react-select ^5.8.0
  • sharp ^0.33.4
  • socket.io-client ^4.7.5
  • tailwind-merge ^2.3.0
  • tailwindcss-animate ^1.0.7
  • valtio ^1.13.2
  • zod ^3.23.8
  • @next/bundle-analyzer ^13.4.12
  • @next/eslint-plugin-next ^13.4.12
  • @tailwindcss/forms ^0.5.7
  • @types/node ^20.12.11
  • @types/nprogress ^0.2.3
  • @types/react 18.2.79
  • @types/react-dom 18.2.25
  • autoprefixer ^10.4.19
  • postcss ^8.4.38
  • tailwindcss ^3.4.4
  • typescript ^5.4.5
packages/wallet/shared/package.json
  • zod ^3.23.8
  • @types/node ^20.12.7
nvm
.nvmrc

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.