npm.io
10.1.4 • Published 9 months ago

@near-wallet-selector/wallet-utils

Licence
(MIT OR Apache-2.0)
Version
10.1.4
Deps
8
Size
295 kB
Vulns
0
Weekly
0
Stars
180

@near-wallet-selector/wallet-utils

This is the Wallet Utils package for NEAR Wallet Selector.

Installation and Usage

The easiest way to use this package is to install it from the NPM registry

# Using pnpm
pnpm add -w @near-wallet-selector/wallet-utils

# Using NPM.
npm install @near-wallet-selector/wallet-utils

Then use it in your custom wallet integration:

import { createAction, signTransactions } from "@near-wallet-selector/wallet-utils";

const action = createAction({
  type: "Transfer",
  params: {
    deposit: "10000000000000000000000",
  },
});

const signedTransactions = await signTransactions(
  [{ signerId, receiverId, actions }],
  signer,
  options.network
);

License

This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

Keywords