Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Commit

Permalink
feat: Split into more granular packages
Browse files Browse the repository at this point in the history
  • Loading branch information
obany committed Oct 11, 2021
1 parent 9099f3a commit 6c8cc6c
Show file tree
Hide file tree
Showing 878 changed files with 162,992 additions and 238,220 deletions.
1,434 changes: 0 additions & 1,434 deletions .eslintrc.js

This file was deleted.

12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Discord
url: https://discord.iota.org/
about: Please ask and answer questions here.
- name: Security vulnerabilities
url: [email protected]
about: Please report security vulnerabilities here.
- name: Discord
url: https://discord.iota.org/
about: Please ask and answer questions here.
- name: Security vulnerabilities
url: [email protected]
about: Please report security vulnerabilities here.
4 changes: 2 additions & 2 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "CodeQL Config"

queries:
- uses: security-and-quality
- uses: security-and-quality
paths:
- src
- src
22 changes: 11 additions & 11 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
day: wednesday
time: '06:00'
timezone: Europe/Berlin
labels:
- L - Awaiting reviews
- dependencies
versioning-strategy: increase
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
day: wednesday
time: "06:00"
timezone: Europe/Berlin
labels:
- L - Awaiting reviews
- dependencies
versioning-strategy: increase
43 changes: 18 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
name: Library Build Main/Dev

on:
push:
branches: [main, dev]
paths:
- "src/**"
- ".github/workflows/build.yml"
pull_request:
branches: [dev]
paths:
- "src/**"
- ".github/workflows/build.yml"

push:
branches: [main, dev]
pull_request:
branches: [dev]

jobs:
build:
runs-on: ubuntu-latest
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: "14"
- name: npm 7
run: npm install -g npm@7
- name: Client Build
run: |
npm install
npm run dist
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: "14"
- name: npm 7
run: npm install -g npm@7
- name: Build
run: |
npm install
npm run dist --workspaces
62 changes: 31 additions & 31 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
name: "CodeQL"

on:
push:
branches:
- main
- dev
paths:
- 'src/**'
- '.github/codeql/**'
- '.github/workflows/codeql-analysis.yml'
pull_request:
paths:
- 'src/**'
- '.github/codeql/**'
- '.github/workflows/codeql-analysis.yml'
schedule:
- cron: '0 0 * * *'
push:
branches:
- main
- dev
paths:
- "src/**"
- ".github/codeql/**"
- ".github/workflows/codeql-analysis.yml"
pull_request:
paths:
- "src/**"
- ".github/codeql/**"
- ".github/workflows/codeql-analysis.yml"
schedule:
- cron: "0 0 * * *"

jobs:
CodeQL-Build:
runs-on: ubuntu-latest
CodeQL-Build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 2
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 2

- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: javascript
config-file: ./.github/codeql/codeql-config.yml
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: javascript
config-file: ./.github/codeql/codeql-config.yml

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
13 changes: 13 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.git
.vscode
coverage
dist
build
target
docs
es
node_modules
typings
*.md
*.html
package-lock.json
17 changes: 17 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"semi": true,
"trailingComma": "none",
"singleQuote": false,
"printWidth": 120,
"tabWidth": 4,
"useTabs": false,
"arrowParens": "avoid",
"overrides": [
{
"files": "*.yaml",
"options": {
"tabWidth": 2
}
}
]
}
81 changes: 0 additions & 81 deletions README-POW.md

This file was deleted.

72 changes: 11 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,19 @@
<a href="#about">About</a> ◈
<a href="#prerequisites">Prerequisites</a> ◈
<a href="#example">Example</a> ◈
<a href="#api-endpoints">Api Endpoints</a> ◈
<a href="#high-level-operations">High Level Operations</a> ◈
<a href="#mqtt">MQTT</a> ◈
<a href="#models">Models</a> ◈
<a href="#packages">Packages</a> ◈
<a href="#proof-of-work">Proof Of Work</a> ◈
<a href="#additional-examples">Additional Examples</a> ◈
<a href="#examples">Examples</a> ◈
<a href="#supporting-the-project">Supporting the project</a> ◈
<a href="#joining-the-discussion">Joining the discussion</a>
</p>

# About

> This library is functionally complete, but it is recommended to use [iota.rs](https://github.com/iotaledger/iota.rs). The rust library will be more heavily maintained and is much more performant.
> This library is functionally complete, but it is recommended to use [iota.rs](https://github.com/iotaledger/iota.rs). The rust library will be more heavily maintained and is more performant.
Client library for IOTA chrysalis network, implemeted in TypeScript to strongly type the objects sent and received from the API.

Also includes High Level operations and MQTT support via a package.

Runs in both NodeJS and Browser environments.

## Prerequisites
Expand Down Expand Up @@ -62,64 +57,19 @@ run()
.catch((err) => console.error(err));
```

## API Endpoints

These methods are implemented on the API client.

* health() - Is the node healthy.
* info() - Get the information about a node.
* tips() - The tips for the tangle.
* message(messageId) - Get a message.
* messageMetadata(messageId) - Get the metadata for a message.
* messageRaw(messageId) - Get the raw message bytes.
* messageSubmit(message) - Submit a new message to the tangle.
* messageSubmitRaw(message) - Submit a new message to the tangle as bytes.
* messageChildren(messageId) - Find the children of a message.
* messagesFind(index) - Find messages by indexation key.
* output(outputId) - Get an output by id.
* address(address) - Get an address details using bech32 address.
* addressOutputs(address) - Get address outputs using bech32 address.
* addressEd25519(address) - Get address details using ed25519 address.
* addressEd25519Outputs(address) - Get address outputs using ed25519 address.
* milestone(index) - Get the milestone details.
* peers() - Get a list of peers.
* peerAdd() - Add a peer.
* peerDelete() - Delete a peer.
* peer() - Get the details of a peer.

## High level operations

There are also high level operations which make use of the API level methods:

* getBalance - Given a seed and account index calculate the total balance available on it's addresses.
* getUnspentAddress - Given a seed, account index, and start index find the next unspent address.
* getUnspentAddresses - Given a seed, account index, and start index find all the unspent addresses.
* promote - Promote a message by attaching an empty message to it.
* reattach - Reattach a message using the message id.
* retry - Looks at the metadata for a message and promotes or retries depending on it's state.
* retrieveData - Given a message id return the index and data from it.
* send - Given a seed, path, destination address in bech32 format and amount, make a single transfer.
* sendEd25519 - Given a seed, path, destination address in ed25519 format and amount, make a single transfer.
* sendMultiple - Given a seed, path, destination addresses in bech32 format and amounts, make multiple transfers.
* sendMultipleEd25519 - Given a seed, path, destination addresses in ed25519 format and amounts, make multiple transfers.
* sendAdvanced - Given a set of inputs with keypairs seed, path, list of destinations make multiple transfers, can also include index data.
* sendData - Given index and data create a new data message.

## MQTT

MQTT has moved to a separate package, see [README.md](./packages/mqtt/README.md)

## Models
## Packages

You can see the model definitions for all the objects in the [typings](./typings/models) folder.
For more details on the main package see [@iota/iota.js](./packages/iota/README.md)

## Proof of Work
Other packages within the framework are.

See [./README-POW.md](./README-POW.md)
* [@iota/util.js](./packages/util/README.md) - Utility classes and methods.
* [@iota/crypto.js](./packages/crypto/README.md) - Cryptographic implementations.
* [@iota/mqtt.js](./packages/mqtt/README.md) - MQTT Client.

## Additional Examples
## Examples

Please find other examples in the [./examples](./examples) folder.
Please find other examples in the [./packages/iota/examples](./packages/iota/examples) folder.

* Simple - Performs basic API operations.
* Address - Demonstrates address generation from a Bip39 mnemonic seed using raw and Bip32 path methods.
Expand Down
Loading

0 comments on commit 6c8cc6c

Please sign in to comment.