GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - HelixNetwork/pendulum-sdk: The official Pendulum SDK.

This repository was archived by the owner on Apr 26, 2024. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

476 Commits
476 Commits

Folders and files

NameName
Last commit message
Last commit date
examples
examples
 
 
packages
packages
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
AUTHORS.md
AUTHORS.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
api_reference.md
api_reference.md
 
 
cleanup.sh
cleanup.sh
 
 
jsdoc2md.json
jsdoc2md.json
 
 
lerna.json
lerna.json
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 
tslint.json
tslint.json
 
 

Repository files navigation

license discord Build Status

Pendulum SDK

Pendulum is a distributed globally available messaging protocol that enables tamper proof timestamps. The pendulum SDK provides the necessary tools to create applications running on the distributed pendulum network. The SDK is built on iota.js.


Contributing

Thanks for everyone involved in the process of developing the Pendulum SDK. Hat tip to all of the IOTA developers! Please see the AUTHORS.md

Clone and bootstrap

  1. Fork the repo with Fork button at top right corner.
  2. Clone your fork locally and cd pendulum-sdk.
  3. Bootstrap your environment with:
npm run init

This will install all dependencies, build and link the packages together. The pendulum-sdk uses Lerna to manage multiple packages. You can re-bootstrap your setup at any point with lerna bootstrap command.

Run the tests

Make your changes on a single or across multiple packages and test the system in integration. Run from the root directory:

npm run test

To run tests of specific package just cd to the package directory and run npm test from there.

You may also want to configure your editor to build the source upon save and watch the tests running. Once building on save is setup, you can start watching tests with npm test --watch from each package directory.

Generate docs

Please update the documentation when needed by editing JSDoc annotations and running npm run docs from the root directory.

Using the API

Installation

Install using npm:

npm i @helixnetwork/core

Example

import { composeAPI } from '@helixnetwork/core'

const helix = composeAPI({
    provider: 'http://localhost:14700'
})

helix.getNodeInfo()
    .then(info => console.log(info))
    .catch(err => {})

Composing custom client methods with network provider:

  1. Install an Helix.Protocol http client:
npm install @helixnetwork/http-client
  1. Create an api method with custom provider:
import { createHttpClient } from '@helixnetwork/http-client'
import { createGetNodeInfo } from '@helixnetwork/core'

const client = createHttpClient({
    provider: 'http://localhost:14265'
})

const getNodeInfo = createGetNodeInfo(client)

Creating & broadcasting transactions

Publish transfers by calling prepareTransfers and piping the prepared txs to sendTxHex command.

// must be truly random
const seed = ' your seed here '

// Array of transfers which defines transfer recipients and value transferred in HLX.
const transfers = [{
    address: ' recipient address here ',
    value: 1000, // 1Kh
    tag: '', // optional tag in hexString
    message: '' // optional message in hexString
}]

// Depth or how far to go for tip selection entry point
const depth = 3

// Difficulty of Proof-of-Work required to attach transaction to tangle.
// Minimum value on testnet is currently 2.
const minWeightMagnitude = 2

helix.prepareTransfers(seed, transfers)
    .then(txs => helix.sendTxHex(txs, depth, minWeightMagnitude))
    .then(bundle => {
        console.log(`Published transaction with tail hash: ${bundle[0].hash}`)
        console.log(`Bundle: ${bundle}`)
    })
    .catch(err => {
        // catch any errors
    })

Documentation

For details on all available API methods please see the reference page.

Documentation of Pendulum core and the HTTP API can be found in the Pendulum Documentation in the near future.

About

The official Pendulum SDK.

hlx.ai

Topics

clientdistributed-systemsdltlibrarysdktamper-proof-timestamps

Resources

Readme
MIT license

Contributing

Contributing
Activity
Custom properties

Stars

5 stars

Watchers

4 watching

Forks

8 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.