New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pipeline-ui-2/pipeline

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pipeline-ui-2/pipeline

Class to send transactions to Algorand network with MyAlgo Connect

1.9.0
latest
npm
Version published
Maintainers
1
Created
Source

Pipeline Algorand Connector

A work-in-progress JavaScript class to streamline the process of using MyAlgo Connect, WalletConnect and AlgoSigner to sign and send transactions to the Algorand network.

Usage

Running the included example

cd example
npm install
npm run start

Use as

<button onclick="connect()">TEST</button>

<script src="https://unpkg.com/@pipeline-ui-2/pipeline@1.3.4/dist/index.js"></script>

<script>
    const Pipeline = window.pipeline
    const wallet = Pipeline.init()
    function connect(){
        Pipeline.connect(wallet).then(data => {
            console.log(data)
        })
    }
</script>

Install via npm:

npm install @pipeline-ui-2/pipeline

Import the class into your project:

import Pipeline from "@pipeline-ui-2/pipeline/index";

Initialize Pipeline:

const myAlgoWallet = Pipeline.init();

Connect to MyAlgo (returns first address in wallet):

Pipeline.connect(myAlgoWallet)
    .then(data => {
        console.log(data);
    });

Connect to AlgoSigner (returns first address in wallet):

Pipeline.pipeConnector = "AlgoSigner";
Pipeline.connect()
    .then(data => {
        console.log(data);
    });

Send a transaction (returns transaction id):

send(address, amt, myNote, sendingAddress, wallet, index = 0)
    .then(data => {
        console.log(data);
    });
Pipeline.send Arguments
  • address (string)
  • amt (amount in microalgos, integer)
  • myNote (note, string)
  • sendingAddress (string)
  • wallet (instance of Pipeline.init)
  • index (0 = Algorand, otherwise asset index number, integer)

Keywords

Algorand

FAQs

Package last updated on 05 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts