open-index/open-npm huggingface dataset:
npm package: @setl/rlnsdk
Description: An SDK for the RLN
Author: SETL
Latest version: 1.0.5

# RLN SDK

> SDK for triggering actions on the RLN 

## Prerequisites

This project requires NodeJS (developed on v18) and NPM.
[Node](http://nodejs.org/) and [NPM](https://npmjs.org/) are really easy to install.
To make sure you have them available on your machine,
try running the following command.

```sh
$ npm -v && node -v
6.4.1
v8.16.0
```

## Table of contents

- [Project Name](#project-name)
  - [Prerequisites](#prerequisites)
  - [Getting Started](#getting-started)
  - [Usage](#usage)
  - [License](#license)

## Getting Started

Set up a new nodejs project in your development environment and install the library as follows

```sh
$ npm install @setl/rlnsdk
```

## Usage

```js
const RLN = require ('@setl/rlnsdk')
const rln = new RLN("rln-api.setlconnect.com", "USERNAME", "PASSWORD");

async function testrln(){

    // Create an new transaction on the RLN

    console.log('[create]')
    
    res = await rln.create({
        "id": "optional-id-for-whole-group-of-pac008s",
        "from": "Test-participant-1",
        "groups": [
            {
            "id": "optional-id-for-this-pac008-max35",
            "transactions": [
                {
                "id": "optional-id-for-txn-max35",
                "amount": 18.5,
                "currency": "USD",
                "creditor": {
                    "account": "Use a valid IBAN unless isAddress is true",
                    "agent": "Use a valid BIC",
                    "isAddress": false
                },
                "debtor": {
                    "account": "Use a valid IBAN unless isAddress is true",
                    "agent": "Use a valid BIC",
                    "isAddress": false
                }
                }
            ]
            }
        ]
    })
    console.log(res)

    // Query balances on the RLN

    console.log('[Balance]')

    res = await rln.balance({
        walletId:1
    }) 
    console.log(res);

    // Query transactions on the RLN

    console.log('[Transactions]')

    res = await rln.transactions({
        incompleteOnly:true, 
        limit:10, 
        offset:0
    })
    console.log(res);

    // Query the RLN for any transactions waiting for approval

    console.log('[Approval List]')

    res = await rln.approvalList()
    console.log(res);

    // Change the status of an transaction to APPROVE or REJECT

    console.log('[Approval Status]')

    res = await rln.approvalStatus({
        "id": 2,
        "status": "APPROVE"
    })
    console.log(res);

    // Query the list of instruments that are being auto approved

    console.log('[Autoapprove List]')

    res = await rln.autoapproveList({})
    console.log(res);

    // Set up an instrument for autoapprove (set to 0 to turn it off)

    console.log('[autoapprove]')

    res = await rln.autoapprove({
        username:"USERNAME", 
        assetCode:"USD", 
        maxAutoApprove:2000
    })
    console.log(res);
}

testrln()
```



## License

[MIT License](https://andreasonny.mit-license.org/2019)
npm package: @setlife/single-page-app
Description: A more interactive educational guide for Create React App
Author: setlife-network
Latest version: 1.0.2

# `single-page-app`

This tool will get you set up with a single-page web application running React. We'll use `create-react-app` to configure the foundation and then add some other layers in case you'd like a bit more structure to get started.

## Requirements

Node v6.1.0+

## Usage

1. In your terminal, move into a new directory and run `npx @setlife/single-page-app` to start setting up.

2. After the installation completes, you can run `npm start` and then go to `localhost:3000` in your browser to see the standard Create React App splash page and follow Facebook's guidance by clicking "Learn React" to start building your app.

We will be adding some more structure and guidance on exploring the directory structure of your new single page React application

## Potential Issues

1. `The program 'npm' is currently not installed.`

You need to install NodeJS and NPM on your machine. Do a Google search and use the Tools setting to change "Any time" to "Past Year" for the most up-to-date method of installing Node for your operating system.

<img src="https://user-images.githubusercontent.com/4914611/56742455-1143c780-6775-11e9-95ad-ebc9f5f6323a.png" style="width: 100%"/>