https://github.com/wharfkit/wallet-plugin-privatekey
WalletPlugin for the Wharf Session Kit. Automatically sign transactions using a given private key. Used primarily for server side applications and user interface testing.
https://github.com/wharfkit/wallet-plugin-privatekey
sign-transaction wallet-plugin
Last synced: 4 months ago
JSON representation
WalletPlugin for the Wharf Session Kit. Automatically sign transactions using a given private key. Used primarily for server side applications and user interface testing.
- Host: GitHub
- URL: https://github.com/wharfkit/wallet-plugin-privatekey
- Owner: wharfkit
- License: other
- Created: 2023-02-02T20:03:08.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-11-10T01:02:48.000Z (over 2 years ago)
- Last Synced: 2025-10-20T23:03:56.514Z (8 months ago)
- Topics: sign-transaction, wallet-plugin
- Language: TypeScript
- Homepage: https://wharfkit.com/
- Size: 561 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# @wharfkit/wallet-plugin-privatekey
A @wharfkit/session WalletPlugin implementation that takes a private key and blindly signs transactions.
Primarily designed to be used in controlled environments (such as server side applications) or for testing purposes.
## Usage
```ts
import {Session} from '@wharfkit/session'
import {WalletPluginPrivateKey} from '@wharfkit/wallet-plugin-privatekey'
// Establish a session and include the wallet plugin
const session = new Session({
// ... other options
walletPlugin: new WalletPluginPrivateKey({
privateKey: '5Jtoxgny5tT7NiNFp1MLogviuPJ9NniWjnU4wKzaX4t7pL4kJ8s',
}),
})
// Calling transact will use this plugin to automatically sign with the provided key
const result = session.transact({
actions: [
// your actions
],
})
```
## Developing
You need [Make](https://www.gnu.org/software/make/), [node.js](https://nodejs.org/en/) and [yarn](https://classic.yarnpkg.com/en/docs/install) installed.
Clone the repository and run `make` to checkout all dependencies and build the project. See the [Makefile](./Makefile) for other useful targets. Before submitting a pull request make sure to run `make lint`.
---
Made with ☕️ & ❤️ by [Greymass](https://greymass.com), if you find this useful please consider [supporting us](https://greymass.com/support-us).