# @ultraos/ultra-signer-lib

> Wharfkit provides a lot of the functionality that Ultra needs but we want to simplify our transactions where possible.

Latest version **1.7.5** (published 2026-07-23) · 0 weekly downloads

## Install

```sh
npm install @ultraos/ultra-signer-lib
pnpm add @ultraos/ultra-signer-lib
yarn add @ultraos/ultra-signer-lib
bun add @ultraos/ultra-signer-lib
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.7.5 |
| Published | 2026-07-23 |
| First published | 2023-10-05 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 112.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | devops-ultraio |

## Links

- npm: https://www.npmjs.com/package/@ultraos/ultra-signer-lib
- Repository: https://github.com/ultraio/ultra-signer-lib
- Homepage: https://github.com/ultraio/ultra-signer-lib#readme
- Issues: https://github.com/ultraio/ultra-signer-lib/issues
- npm.io page: https://npm.io/package/@ultraos/ultra-signer-lib

## Dependencies (5)

- [fast-crc32c](https://npm.io/package/fast-crc32c.md) ^2.0.0
- [key-encoder](https://npm.io/package/key-encoder.md) ^2.0.3
- [@google-cloud/kms](https://npm.io/package/@google-cloud/kms.md) ^5.4.0
- [@wharfkit/antelope](https://npm.io/package/@wharfkit/antelope.md) ^1.1.1
- [google-auth-library](https://npm.io/package/google-auth-library.md) ^9.0.0

## Recent versions

- 1.7.5 (latest) — 2026-07-23
- 1.7.4 — 2026-04-10
- 1.7.3 — 2026-03-31
- 1.7.2 — 2026-03-03
- 1.7.1 — 2025-02-25
- 1.7.0 — 2025-02-18
- 1.6.4 — 2024-01-18
- 1.6.3 — 2024-01-10
- 1.6.2 — 2023-12-05
- 1.6.1 — 2023-11-27
- 1.6.0 — 2023-11-15
- 1.5.1 — 2023-10-10
- 1.5.0 — 2023-10-06
- 1.4.0 — 2023-10-06
- 1.2.0 — 2023-10-05

## README

# ultra-signer-lib

Wharfkit provides a lot of the functionality that Ultra needs but we want to simplify our transactions where possible.

This library aims to provide similar functionality to `eosjs` without the added complexity of using `@wharfkit/antelope` directly.

**Features**

-   Sign Messages
-   Sign Transactions with Multiple Private Keys
-   Use Google KMS Signing
-   Sign Messages with KMS
-   Sign Transactions with KMS
-   Sign Transactions with Keosd

## Contents

-   [ultra-signer-lib](#ultra-signer-lib)
    -   [Contents](#contents)
    -   [Installation](#installation)
    -   [Usage](#usage)
        -   [Transact](#transact)
        -   [Sign \& Verify Message](#sign--verify-message)
        -   [Keosd - Transact](#keosd---sign-transaction)
        -   [KMS Setup](#kms-setup)
        -   [KMS - Transact](#kms---transact)
        -   [KMS - Sign \& Verify Message](#kms---sign--verify-message)
        -   [Additional Documentation](#additional-documentation)
    -   [Development](#development)
        -   [Install Library](#install-library)
        -   [Test](#test)
        -   [Build Library](#build-library)

## Installation

```
npm i @ultraos/ultra-signer-lib
```

## Usage

### Transact

```ts
import { API } from '@ultraos/ultra-signer-lib';

// Compromised key, do not use for production.
const publicKey = 'EOS8NcQNcaR1eRyLPnCBoq6KRUGYHW5CDBVTWgLBii3Vas4dXTgMf';
const privateKey = '5JNcnnozrvvgmqP7oigzD9UuNn9JLCtmL69qPTmvz7cMAtBTRZZ';

const api = new API(TEST_ENDPOINT, { signingMode: 'PRIVATE_KEY', privateKeys: [privateKey] });

// This is asynchronous, wrap it in an async function, or use then
const result = await api.transact([
    {
        account: 'eosio.token',
        name: 'transfer',
        authorization: [{ actor: from, permission: 'active' }],
        data: {
            from: 'alice',
            to: 'bob',
            quantity: '0.00000000 UOS',
            memo: 'hi',
        },
    },
]);

if (result.status) {
    console.log(`Transaction Successful!`);
    console.log(result.data);
} else {
    console.log(`Transaction Failed!`);
    console.log(result.data);
}
```

### Sign & Verify Message

```ts
import { Signer } from '@ultraos/ultra-signer-lib';

// Note that these keys are exposed and should not be used at all or in production
const publicKey = 'EOS8NcQNcaR1eRyLPnCBoq6KRUGYHW5CDBVTWgLBii3Vas4dXTgMf';
const privateKey = '5JNcnnozrvvgmqP7oigzD9UuNn9JLCtmL69qPTmvz7cMAtBTRZZ';

const originalMessage = 'hello world!';
const signature = Signer.sign(originalMessage, privateKey);

console.log(Signer.verify(signature, originalMessage, publicKey));
```

### Keosd - Sign Transaction

```ts
import { API } from '@ultraos/ultra-signer-lib';

const api = new API(TEST_ENDPOINT, { signingMode: 'KEOSD', keosdEndpoint: KEOSD_ENDPOINT });
const result = await api.transact([
    {
        account: 'eosio.token',
        name: 'transfer',
        authorization: [{ actor: from, permission: 'active' }],
        data: { from, to, quantity, memo },
    },
]);
```

### KMS Setup

KMS can be used to create a shared private key that signs transactions through Google APIs.

Creating a key should be -> `HSM`, `Asymmetric Sign`, `Elliptic Curve secp256k1 with SHA256 Digest`

```ts
import { API, SignerKMS } from '@ultraos/ultra-signer-lib';

const credentials = {
    project_id: 'some google project identifier',
    private_key: 'the private key you get from the .json file when you create a kms key',
    client_email: 'service account email',
    client_id: 'service account client id',
};

const keypath = {
    project: 'some google project identifier',
    location: 'global',
    keyRing: 'key ring name',
    cryptoKey: 'key name',
    cryptoKeyVersion: '1',
};

const kmsService = new SignerKMS(credentials, keypath);
const api = new API(TEST_ENDPOINT, { signingMode: 'KMS', KMS: kmsService });
```

### KMS - Transact

```ts
import { API, SignerKMS } from '@ultraos/ultra-signer-lib';

const api = new API(TEST_ENDPOINT, { signingMode: 'KMS', KMS: kmsService });
const result = await api.transact([
    {
        account: 'eosio.token',
        name: 'transfer',
        authorization: [{ actor: from, permission: 'active' }],
        data: { from, to, quantity, memo },
    },
]);
```

### KMS - Sign & Verify Message

```ts
import { Signer, SignerKMS } from '@ultraos/ultra-signer-lib';

const originalMessage = 'hello world!';
const signature = Signer.sign(originalMessage, kmsService);
console.log(Signer.verify(signature, originalMessage, kmsService));
```

### Additional Documentation

Any additional documentation for individual functions and utilities can be found here:

-   [https://ultraio.github.io/ultra-signer-lib/](https://ultraio.github.io/ultra-signer-lib/)

## Development

-   Install Node 18+

### Install Library

To install dependencies:

```bash
npm i
```

### Test

```bash
npm run test
```

### Build Library

```bash
npm run build
```

---
_Source: https://npm.io/package/@ultraos/ultra-signer-lib · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
