1.1.0 • Published 8 months ago

@roninnetwork/wallet-sdk v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Ronin Wallet SDK

A fast and convenient way to integrate Ronin into your Javascript-based apps. Currently support Ronin Extension Wallet and Ronin Mobile Wallet.

Getting started

1. Install the SDK

npm install @roninnetwork/wallet-sdk @walletconnect/modal

or

yarn add @roninnetwork/wallet-sdk @walletconnect/modal

2. Import and initialize

import { WalletSDK } from '@roninnetwork/wallet-sdk'
const sdk = new WalletSDK()

3. Connect and request

const onClickConnect = async () => {
  // Auto detect environment.
  await sdk.connect()
  
  // Or connect only through WalletConnect or Injected Provider
  await sdk.connectInjected()
  await sdk.connectMobile()
  
  // Check if session exists and wallet is unlocked
  let accounts = await sdk.getAccounts()
  if(!accounts.length) {
    // Request unlock wallet & session approval
    accounts = await sdk.requestAccounts()
  }
}

// Example of a sign request
const onClickSignMessage = async () => {
  const signature = await sdk.request({ 
    method: 'personal_sign',
    params: ['Hello World', currentAccount.address]
  })
}

Full documentation

Please read the full documentation at: https://docs.skymavis.com/ronin/wallet/reference/js-sdk-reference

Contributing

See the contributing guide for detailed instructions on how to get started with our project.

1.1.0

8 months ago

1.0.7

8 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago