Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

brainblocks

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

brainblocks

Javascript module template.

  • 1.0.17
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 30 Oct 2018

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc