Socket
Socket
Sign inDemoInstall

brainblocks

Package Overview
Dependencies
7
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    brainblocks

Javascript module template.


Version published
Maintainers
1
Install size
3.93 MB
Created

Readme

Source

logo

<div id="nano-button"></div>

<script src="https://brainblocks.io/brainblocks.js"></script>

<script>
    // Render the Nano button

    brainblocks.Button.render({

        // Pass in payment options

        payment: {
            destination: 'nano_164xaa1ojy6qmq9e8t94mz8izr4mkf1sojb6xrmstru5jsif48g5kegcqg7y',
            currency:    'rai',
            amount:      1000
        },

        // Handle successful payments

        onPayment: function(data) {
            console.log('Payment successful!', data.token);
        }

    }, '#nano-button');
</script>
> curl https://brainblocks.io/api/session/<token>/verify

{
    "token": "ZXlKaGJHY...",
    "destination": "nano_164xa...",
    "currency": "rai",
    "amount": "1000",
    "amount_rai": 1000,
    "received_rai": 1000,
    "fulfilled": true,
    "send_block": "0B36663...",
    "sender": "nano_1jnat..."
}

Installation

Node module

# npm
npm install --save brainblocks

# yarn
yarn add brainblocks
import * as brainblocks from 'brainblocks'

Browser

<!-- From Brainblocks -->
<script src="https://brainblocks.io/brainblocks.js"></script>

<!-- From CDN -->
<script src="https://unpkg.com/brainblocks"></script>

<!-- Local file -->
<script src="brainblocks/dist/brainblocks.js"></script>

Keywords

FAQs

Last updated on 30 Oct 2018

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc