@orb-labs/orbykit
TypeScript icon, indicating that this package has built-in type declarations

0.0.12 • Public • Published

@orb-labs/orbykit

A react library with components and hooks for interacting with Orby.

Orby is an RPC-proxy that wraps around standard RPCs and extends their functionality to enable gas abstraction, gas sponsorship, and chain abstraction for any account (including EOAs) with just a few lines of code. Additionally, it allows wallets to monetize on any transaction from their users.

Example Usage for Wallets and Apps

// add imports
import {
  OrbyKitProvider,
  useTransaction,
  useOrbyKit,
  OrbyKitConfig,
} from "@orb-labs/orbykit";

// set the configs
const orbyKitConfig: OrbyKitConfig = {
  instancePrivateAPIKey: "instance private api key",
  instancePublicAPIKey: "instance public api key",
  appName: "Example",
  environment: BlockchainEnvironment.TESTNET
};

<OrbyKitProvider config={orbyKitConfig}>

// your components here

</OrbyKitProvider>

Development

Run yarn run dev

Publishing to npm

  1. Bump the package.json version
// package.json
version: "0.0.8-alpha" // change to "0.0.9-alpha"
  1. Run yarn at the root of orby folder
yarn
  1. Build
yarn workspace @orb-labs/orbykit build
  1. Login to npm
yarn npm login
  1. Publish @orb-labs/orbykit to npm
yarn workspace @orb-labs/orbykit npm publish --access public

Readme

Keywords

none

Package Sidebar

Install

npm i @orb-labs/orbykit

Weekly Downloads

23

Version

0.0.12

License

none

Unpacked Size

1.1 MB

Total Files

175

Last publish

Collaborators

  • felimadu
  • tdubb_orblabs