Skip to content

Commit

Permalink
Rebranded from eosio to antelope
Browse files Browse the repository at this point in the history
  • Loading branch information
pur3miish committed May 25, 2023
1 parent 477208d commit f4f80be
Show file tree
Hide file tree
Showing 14 changed files with 116 additions and 185 deletions.
8 changes: 1 addition & 7 deletions changelog.md
@@ -1,10 +1,4 @@
# EOSIO ECC Changelog

# 1.0.1

### Patch

- Dependency updates.
# Antelope ECC Changelog

# 1.0.0

Expand Down
4 changes: 2 additions & 2 deletions legacy_to_public_key.mjs
Expand Up @@ -3,12 +3,12 @@ import binary_to_base58 from "base58-js/binary_to_base58.mjs";
import ripemd160 from "ripemd160-js/ripemd160.mjs";

/**
* Converts an EOSIO/Antelope legacy key to PUB_K1 format.
* Converts an Antelope legacy key to PUB_K1 format.
* @param {String} legacy legacy public key
* @returns {Promise<String>} public key PUB_K1 format
* @example <caption>Usage `legacy_to_public_key`.</caption>
* ```js
* import legacy_to_public_key from 'eosio-ecc/legacy_to_public_key.mjs'
* import legacy_to_public_key from 'antelope-ecc/legacy_to_public_key.mjs'
* legacy_to_public_key("EOS53jowyaGC1WrYJefSHTTmGvZcySUFkEpmCDmEd8txunDChput7").then(console.log)
* ```
* The logged output was PUB_K1_53jowyaGC1WrYJefSHTTmGvZcySUFkEpmCDmEd8txunDCqCCVR.
Expand Down
2 changes: 1 addition & 1 deletion new_eos_keys.mjs
Expand Up @@ -21,7 +21,7 @@ import random_bytes from "./random_bytes.mjs";
* @returns {Promise<KeyPair>} Key pair.
* @example <caption>Usage `new_eos_keys`.</caption>
* ```js
* import new_eos_keys from 'eosio-ecc/new_eos_keys.mjs')
* import new_eos_keys from 'antelope-ecc/new_eos_keys.mjs')
*
* new_eos_keys().then(console.log)
* ```
Expand Down
2 changes: 1 addition & 1 deletion new_keys.mjs
Expand Up @@ -20,7 +20,7 @@ import random_bytes from "./random_bytes.mjs";
* @returns {Promise<KeyPair>} Key pair.
* @example <caption>Usage `new_eos_keys`.</caption>
* ```js
* import new_keys from 'eosio-ecc/new_keys.mjs'
* import new_keys from 'antelope-ecc/new_keys.mjs'
* new_keys().then(console.log)
* ```
* The logged output will be an object containing PUB_K1 and PVT_K1 wif keys.
Expand Down
12 changes: 6 additions & 6 deletions package.json
@@ -1,12 +1,12 @@
{
"name": "eosio-ecc",
"version": "1.0.1",
"description": "A universal JavaScript (Node.js, Deno.js and client) EOSIO (and Antelope) based digital signature package with key utilities.",
"name": "antelope-ecc",
"version": "1.0.0-rc.1",
"description": "A universal JavaScript ECC digital signature and key utility package for Antelope based blockchains.",
"author": "pur3miish",
"license": "MIT",
"repository": "github:pur3miish/eosio_ecc",
"homepage": "https://github.com/pur3miish/eosio_ecc#readme",
"bugs": "https://github.com/pur3miish/eosio_ecc/issues",
"repository": "github:pur3miish/Antelope-ECC",
"homepage": "https://github.com/pur3miish/Antelope-ECC#readme",
"bugs": "https://github.com/pur3miish/Antelope-ECC/issues",
"keywords": [
"blockchain",
"digital",
Expand Down
4 changes: 2 additions & 2 deletions public_key_from_private.mjs
Expand Up @@ -6,14 +6,14 @@ import public_key_to_wif from "./public_key_to_wif.mjs";
import wif_to_private_key from "./wif_to_private_key.mjs";

/**
* Convert an EOSIO/Antelope private key to a public key.
* Convert an Antelope private key to a public key.
* @kind function
* @name public_key_from_private
* @param {String} wif_private_key Wallet import format key.
* @returns {Promise<String>} Wallet import format public key.
* @example <caption>Usage `public_key_from_private`.</caption>
* ```js
* import public_key_from_private from 'eosio-ecc/public_key_from_private.mjs'
* import public_key_from_private from 'antelope-ecc/public_key_from_private.mjs'
*
* public_key_from_private(
* '5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3' // or PVT_K1_…
Expand Down
24 changes: 12 additions & 12 deletions readme.md
@@ -1,20 +1,20 @@
![eos ecc logo](static/eosio-ecc.svg)
![antelope ecc logo](static/antelope-ecc.svg)

# EOSIO ECC
# Antelope ECC

[![NPM Package](https://img.shields.io/npm/v/eosio-ecc.svg)](https://www.npmjs.org/package/eosio-ecc) [![CI status](https://github.com/pur3miish/eosio_ecc/workflows/CI/badge.svg)](https://github.com/pur3miish/eosio_ecc/actions) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/pur3miish/eosio_ecc/blob/main/LICENSE)
[![NPM Package](https://img.shields.io/npm/v/antelope-ecc.svg)](https://www.npmjs.org/package/antelope-ecc) [![CI status](https://github.com/pur3miish/antelope-ecc/workflows/CI/badge.svg)](https://github.com/pur3miish/antelope-ecc/actions) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/pur3miish/antelope-ecc/blob/main/LICENSE)

A lightweight (\~6 KB) [universal](https://en.wikipedia.org/wiki/Isomorphic_JavaScript) JavaScript Antelope and EOSIO digital signature and cryptokey utilty package.
A lightweight (\~6 KB) [universal](https://en.wikipedia.org/wiki/Isomorphic_JavaScript) JavaScript digital signature and cryptokey utilty package for Antelope based blockchains.

## Installation

For [Node.js](https://nodejs.org), to install [`eosio-ecc`](https://npm.im/isomorphic-secp256k1-js) run:
For [Node.js](https://nodejs.org), to install [`antelope-ecc`](https://npm.im/antelope-ecc) run:

```sh
npm i eosio-ecc
npm i antelope-ecc
```

For [Deno.js](https://deno.land), to use [eosio_ecc](https://deno.land/x/eosio_ecc) Add these import paths to your `deno.json` file:
For [Deno.js](https://deno.land), to use [antelope_ecc](https://deno.land/x/antelope_ecc) Add these import paths to your `deno.json` file:

```json
{
Expand All @@ -34,7 +34,7 @@ For [Deno.js](https://deno.land), to use [eosio_ecc](https://deno.land/x/eosio_e
Signing a packed transaction.

```js
import sign_packed_txn from "eosio-ecc/sign_packed_txn.mjs";
import sign_packed_txn from "antelope-ecc/sign_packed_txn.mjs";

sign_packed_txn({
chain_id: "2a02a0053…",
Expand All @@ -49,7 +49,7 @@ sign_packed_txn({
An example of how to create a pair keys.

```js
import new_keys from "eosio-ecc/new_keys.mjs";
import new_keys from "antelope-ecc/new_keys.mjs";

new_keys().then(console.log);
```
Expand All @@ -59,7 +59,7 @@ new_keys().then(console.log);
Recover public key from signature.

```js
import recover_public_key from "eosio-ecc/recover_public_key.mjs";
import recover_public_key from "antelope-ecc/recover_public_key.mjs";

recover_public_key({
signature: "SIG_K1_…", // Signature
Expand All @@ -77,7 +77,7 @@ Ways to require in CJS
```js
(async function () {
const { default: new_keys } = await import("eosio-ecc/new_keys.mjs");
const { default: new_keys } = await import("antelope-ecc/new_keys.mjs");
const key_pair = await new_keys();
console.log(key_pair);
})();
Expand All @@ -95,7 +95,7 @@ Supported runtime environments:

## Exports

The [npm](https://npmjs.com) package [`eosio-ecc`](https://npm.im/eosio-ecc) features [optimal JavaScript module design](https://jaydenseric.com/blog/optimal-javascript-module-design). It doesn’t have a main index module, so use deep imports from the ECMAScript modules that are exported via the [`package.json`](./package.json) field [`exports`](https://nodejs.org/api/packages.html#exports):
The [npm](https://npmjs.com) package [`antelope-ecc`](https://npm.im/antelope-ecc) features [optimal JavaScript module design](https://jaydenseric.com/blog/optimal-javascript-module-design). It doesn’t have a main index module, so use deep imports from the ECMAScript modules that are exported via the [`package.json`](./package.json) field [`exports`](https://nodejs.org/api/packages.html#exports):

- [`legacy_to_private_key.mjs`](./legacy_to_private_key.mjs)
- [`legacy_to_public_key.mjs`](./legacy_to_public_key.mjs)
Expand Down
2 changes: 1 addition & 1 deletion recover_public_key_from_signature.mjs
Expand Up @@ -16,7 +16,7 @@ import public_key_to_wif from "./public_key_to_wif.mjs";
* @returns {Promise<String>} WIF Public key.
* @example <caption>Usage `public_key_from_private`.</caption>
* ```js
* import recover_public_key from 'eosio-ecc/recover_public_key.mjs'
* import recover_public_key from 'antelope-ecc/recover_public_key.mjs'
*
* recover_public_key({
* signature: 'SIG_K1_…',
Expand Down
2 changes: 1 addition & 1 deletion sign_packed_txn.mjs
Expand Up @@ -14,7 +14,7 @@ import sign_tnx from "./sign_txn.mjs";
* @returns {Promise<String>} Signature
* @example <caption>Usage `sign_packed_txn`.</caption>
* ```js
* import sign_packed_txn from 'eosio-ecc/sign_packed_txn.mjs'
* import sign_packed_txn from 'antelope-ecc/sign_packed_txn.mjs'
*
* sign_packed_txn(
* {
Expand Down
17 changes: 17 additions & 0 deletions static/antelope-ecc.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 0 additions & 12 deletions static/eosio-ecc.svg

This file was deleted.

0 comments on commit f4f80be

Please sign in to comment.