RIF Wallet Libraries

RIF Wallet Libraries contain a set of packages that is used by the RIF Wallet. You can install the RIF Wallet Libraries directly from inside the app. For more information, visit the RIF Wallet Lib Repo.

Packages

RIF Wallet Core

The RIF Wallet Core is the wallet library that connects the UI with the RIF Relay SDK. This class accepts an Ethers Signer that handles the majority of crypto methods, such as creating a Wallet, sign tx or message, estimate gas, send transactions and deploy the smart wallets.

The onRequest function is where the UX handles the transaction or interaction. A transaction is sent to the RIFWallet then passed to the onRequest method. At this point, the UX can prompt the user to click 'accept' or 'deny'. This means that the wallet can be injected into WalletConnect, and injectedBrowser or used via the UX and when a transaction comes in, it will always prompt the user to accept or deny the action.

See the README for more information.

RIF Wallet Types

The RIF Wallet Types common types package.

See how to run for development and tests in the README.

RIF Wallet ABI Enhancer

The ABI Enhancer package attempts to decode a transaction into a human readable format. There are different strategies for decoding:

  • rBTC Transaction - where the data is 0x and the transaction is sending gas from one account to another.
  • ERC20 (and variants) Transaction - sending a token from one user to another. In this case the recipient and amount is located in the data field.
  • Other Transaction - A contract call interaction. In this case, it queries the publicly available list of known method types and attempts to decode it. In this case, the transaction details are not transformed.

See more information in the README.

Key Management System

The RIF Wallet Key Management System library.

Bitcoin Library

The RIF Wallet Bitcoin Library is a library to handle receiving and sending bitcoin in React Native. See Basic Setup and How to Use in the RIF Wallet Bitcoin README.

RIF Relay Client SDK

This rif-relay-light-sdk is a light implementation of the client RIF Relay SDK built using ethers and used in the RIF Wallet.

See Basic setup, how to deploy the smart wallet, and how to estimate and relay a transaction in the README.

RIF Wallet Token

The RIF Wallet Token package contains simple classes for ERC20, ERC677, and rBTC assets/tokens. It includes the ABI for ERC20 and ERC677.

RIF Wallet EIP681

The RIF Wallet EIP681 is a basic and incomplete implementation of EIP681, URL Format for Transaction Requests.

See the README for more information.

RIF Wallet Services

This RIF Wallet Services library is responsible for mapping all the endpoints available and making the socket connection in rif-wallet-services (backend).

Receive updates

Get the latest updates from the Rootstock ecosystem

Loading...