Integrations
Developers can integrate Bitte Wallet either with wallet Selector or directly with callbacks
This is the Bitte Wallet package for NEAR Wallet Selector.
The easiest way to use this package is to install it from the NPM registry, this package requires near-api-js
v1.0.0 or above:
Then use it in your dApp:
Options
networkId
: (string?
): 'mainnet' or 'testnet' . Defaults tomainnet
.deprecated
: (boolean?
): Deprecated is optional. Default isfalse
.callbackUrl
: (string?
): Valid url to send your user after txn.walletUrl
: (string?
): wallet url: https://wallet.bitte.ai for mainnet and https://testnet.wallet.bitte.ai for testnet.
License
This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
Bitte Wallet Integration via URL Schemes
This guide explains how to interact with the Mintbase Wallet using URL schemes to perform operations like connecting or creating an account and signing transactions. Depending on your development environment, you can choose between the testnet and mainnet URLs.
Base URLs
Connect or Create an Account
To connect or create an account, use the following endpoint. This action will redirect users to authenticate or create a new wallet account
Endpoint:
/connect
URL:
https://wallet.bitte.ai/connect
Parameters
success_url
:The URL to which the wallet redirects after a successful login. It should be able to handle the incoming parameters.
Example: your_schema://`
Callback URL
The callback URL is defined in the success_url
parameter. After successful authentication, the user will be redirected to this URL.
Parameters
account_id
: The authenticated user's account ID.public_key
: The currently connected public key of the user's account.
Sign Transactions
To sign a transaction, direct the user to the sign transaction endpoint.
Endpoint:
/sign-transaction
URL:
https://wallet.bitte.ai/sign-transaction
Parameters
transactions_data: The encoded data for the transaction that needs to be signed. See this to learn how to format the transaction object. The transaction object should be URL encoded (`encodeURI(JSON.strinfigy(tx_data))`)
callback_url: The URL to redirect after the transaction signing process.
Callback URL
After signing the transaction, the wallet will redirect to the provided callback_url
with additional transaction details.
Parameters:
transactionHashes
: The hashes of the signed transactions.
Examples
1. Connect Account on Mainnet
2. Sign Transaction on Mainnet
Last updated