2.1.1 • Published 10 months ago

@othent/kms v2.1.1

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

Othent KMS JS SDK

Othent JS SDK to manage Arweave wallets backend by Auth0 and Google Key Management Service.

Try our demo at kms-demo.othent.io!

Othent KMS JS SDK NPM page

Othent KMS JS SDK NPM demo

Learn how to set it up at https://docs.othent.io or looking at our demo's code at https://github.com/Othent/KMS-test-repo.

Installation

npm install --save @othent/kms
yarn install --save @othent/kms
pnpm add --save @othent/kms

Usage

import { Othent, AppInfo } from "@othent/kms";

const appInfo: AppInfo = {
  name: "My Awesome App",
  version: "1.0.0",
  env: "production",
};

const othent = new Othent({ appInfo, throwErrors: false, ... });

othent.addEventLister("error", (err) => {
  console.error(err);
});

await othent.connect();

const mySecret = await othent.encrypt("My secret");

const transaction = await arweave.createTransaction({
  data: imySecret,
});

const result = await othent.dispatch(transaction);
const transactionURL = `https://viewblock.io/arweave/tx/${result.id}`;

console.log(transactionURL);

You can find more information and examples at https://docs.othent.io or looking at our demo's code at https://github.com/Othent/KMS-test-repo.

Publishing A New Release:

Manually:

  1. Use pnpm version to bump the version, which will also make sure the next commit has the right tags.

    Stable release:

    npm version patch
    npm version minor
    npm version major

    Pre-release:

    npm version prerelease --preid=beta
    npm version prepatch --preid=beta
    npm version preminor --preid=beta
    npm version premajor --preid=beta

    The preversion, version and postversion scripts defined in package.json will test, format, build, tag and push all the changes automatically. See https://docs.npmjs.com/cli/v10/commands/npm-version.

  2. To publish a stable release, simply run pnpm publish.

    The latest tag will also point to this new version.

    If you are publishing a pre-release version and don't want the latest tag to be updated, run this instead:

    pnpm publish --tag beta

Troubleshooting

If you accidentally updated the latest tag, you can point it to another version with the following command:

npm dist-tag add @othent/kms@<version> latest

You can see the package distribution (not version) tags like this:

npm view . dist-tags

If you added / pushed an incorrect tag, you can delete it from the server with:

git push origin :refs/tags/v0.1.0

And locally with:

git tag -d v0.1.0
2.1.1

10 months ago

2.1.0

10 months ago

2.0.0-beta.9

11 months ago

2.0.0-beta.8

11 months ago

2.0.0-beta.7

11 months ago

2.0.0-beta.2

12 months ago

2.0.0-beta.1

12 months ago

2.0.0-beta.0

12 months ago

2.0.0-beta.6

11 months ago

2.0.0-beta.5

12 months ago

2.0.0-beta.4

12 months ago

2.0.0

11 months ago

2.0.0-beta.3

12 months ago

2.0.0-beta.11

11 months ago

2.0.0-beta.10

11 months ago

2.0.0-beta.13

11 months ago

2.0.0-beta.12

11 months ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago