1.0.116 • Published 6 days ago

@plutonication/plutonication v1.0.116

Weekly downloads
-
License
ISC
Repository
-
Last release
6 days ago

Plutonication

Plutonication is a TypeScript library to create a communication between dapps and wallets across platforms

Requirements

  • Node.js and npm installed on your system.

The package uses node v18

Instalation

NPM package: https://www.npmjs.com/package/@plutonication/plutonication

npm i @plutonication/plutonication

Other versions

Usage

The overall structure of Plutonication is designed to be as little intrusive as possible.

A comprehensive guide for adding Plutonication to your dApp / Wallet can be found here: https://plutonication-acnha.ondigitalocean.app/docs/javascript.

React dApp example

In the example_dapp folder, you can find a typescript React application that implements Plutonication.

React dApp docs

A detailed description of the Plutonication implementation can be found:

1) https://plutonication-acnha.ondigitalocean.app/docs/react-example 2) in the src/app.ts file.

Docker

The following docker file runs the sample React dApp, which can be used for testing all plutonication dApp functionalities.

cd example_dapp

docker build -t plutonication-react-dapp-example . 

docker run -p 3000:3000 plutonication-react-dapp-example

Run locally

cd example_dapp

# Install the dApp dependencies
npm i

npm start

How Plutonication works

The private key is always saved in your wallet on your phone and is never sent anywhere.

You need to pair the dApp with the wallet. To do so, the wallet needs to receive a special link with information needed to establish the connection. The wallet can receive this link, for example, by scanning a QR code. Once the link is received, the dApp and the wallet will get paired via websockets to establish a stable connection between different platforms. After the connection is established, the wallet is ready to receive any Extrinsics, which it can then sign and send back to the dApp.

To get a more in-depth details of the underlying backend, read this guide: https://plutonication-acnha.ondigitalocean.app/docs/flask-server.

Build the package locally

# Install all dependencies
npm i

npm run build

Testing

Unit tests

The provided tests showcase how Plutonication can be implemented for both dApps and Wallets.

cd tests

# Install all testing dependencies
npm i

npx playwright test

E2E testing with Pluto wallet

Firstly, you will need to run the sample React dApp that can be used for testing.

cd example_dapp

# Install the dApp dependencies
npm i

npm start

Then, you will need to get Pluto wallet on your phone. There are multiple ways to get it: 1) Download it from Google Play (for Android phones): https://play.google.com/store/apps/details?id=com.rostislavlitovkin.plutowallet 2) Build and deploy it locally from this repo (for all platforms): https://github.com/rostislavLitovkin/plutowallet

After installation completes, click on the QR code scanner icon on the top-right corner of the screen to open the universal QR code scanner. Then scan the Plutonication QR modal and accept the connection. PlutoWallet and the dApp will successfully pair. PlutoWallet is now ready to receive any transaction requests.

If you are not sure about any of these steps, you can also follow this video guide, that showcases the whole process of connecting your PlutoWallet to the dApp and signing a transaction request: https://youtu.be/lVVcgNs7KRk?si=X_SohjoVUprai1r1

Limitations

  • both devices need to support internet connection

dApps utilising Plutonication

Feel free to add your own project by making a PR.

Wallets utilising Plutonication

Feel free to add your own project by making a PR.

Inspiration

Contributions

Contributions are welcome. If you wish to contribute to the project, follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature: git checkout -b feature/new-feature.
  3. Make your changes and commit them: git commit -m 'Add new feature'.
  4. Push your changes to your fork: git push origin feature/new-feature.
  5. Open a Pull Request in the original repository.

License

This project is licensed under the MIT License.

1.0.112

6 days ago

1.0.114

6 days ago

1.0.113

6 days ago

1.0.116

6 days ago

1.0.107

7 days ago

1.0.106

7 days ago

1.0.109

7 days ago

1.0.103

8 days ago

1.0.105

7 days ago

1.0.104

8 days ago

1.0.110

7 days ago

1.0.101

13 days ago

1.0.100

13 days ago

1.0.98

15 days ago

1.0.97

15 days ago

1.0.96

15 days ago

1.0.95

15 days ago

1.0.94

15 days ago

1.0.93

15 days ago

1.0.92

15 days ago

1.0.91

4 months ago

1.0.90

4 months ago

1.0.89

4 months ago

1.0.88

4 months ago

1.0.87

4 months ago

1.0.86

4 months ago

1.0.84

4 months ago

1.0.83

4 months ago

1.0.82

4 months ago

1.0.81

4 months ago

1.0.80

4 months ago

1.0.79

4 months ago

1.0.78

4 months ago

1.0.77

4 months ago

1.0.76

4 months ago

1.0.75

4 months ago

1.0.74

4 months ago

1.0.73

4 months ago

1.0.72

4 months ago

1.0.71

4 months ago

1.0.70

4 months ago

1.0.69

4 months ago

1.0.68

4 months ago

1.0.67

4 months ago

1.0.66

4 months ago

1.0.65

4 months ago

1.0.64

4 months ago

1.0.63

4 months ago

1.0.62

4 months ago

1.0.61

4 months ago

1.0.60

4 months ago

1.0.59

4 months ago

1.0.58

4 months ago

1.0.57

4 months ago

1.0.56

4 months ago

1.0.55

4 months ago

1.0.54

4 months ago

1.0.53

5 months ago

1.0.52

5 months ago

1.0.51

5 months ago

1.0.50

5 months ago

1.0.49

5 months ago

1.0.48

5 months ago

1.0.47

5 months ago

1.0.46

5 months ago

1.0.45

5 months ago

1.0.44

5 months ago

1.0.43

5 months ago

1.0.42

5 months ago

1.0.41

5 months ago

1.0.40

5 months ago

1.0.39

5 months ago

1.0.38

5 months ago

1.0.37

5 months ago

1.0.36

5 months ago

1.0.35

5 months ago

1.0.34

5 months ago

1.0.33

5 months ago

1.0.32

5 months ago

1.0.31

5 months ago

1.0.30

5 months ago

1.0.29

5 months ago

1.0.28

5 months ago

1.0.27

5 months ago

1.0.26

5 months ago

1.0.25

5 months ago

1.0.24

5 months ago

1.0.23

5 months ago

1.0.22

5 months ago

1.0.21

5 months ago

1.0.20

5 months ago

1.0.19

6 months ago

1.0.18

6 months ago

1.0.17

6 months ago

1.0.16

6 months ago

1.0.15

6 months ago

1.0.14

6 months ago

1.0.13

6 months ago

1.0.12

6 months ago

1.0.11

6 months ago

1.0.10

6 months ago

1.0.9

6 months ago

1.0.8

6 months ago

1.0.6

6 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago