Code Monkey home page Code Monkey logo

window.banano-docs's Introduction

window.banano docs

request_payment

User gets a popup window where they can authorize a payment. Site should not assume payment happened and check for a payment themselves. Therefore, returns nothing.

Parameters

  • to_address: string
  • amount: number

request_rep_change

User gets a popup window where they can change their representative to the requested address. Site should not assume rep change happened and confirm themselves. Therefore, returns nothing.

Parameters

  • to_address: string

request_address

User gets a popup window where they can agree to sign a message, and share their address with the site. Returns nothing, but see banano_link event below.

Parameters

None

banano_link event

Event.

Format:

{
  address,
  signed_message,
  hashed_message,
  original_message
}

Code example:

window.addEventListener("message", function(e) {
  if (e.data.type === "banano_link") {
    document.getElementById("link-info").innerText = "Address received: "+e.data.content.address;
  document.getElementById("sig-info").innerText = "Signature information (not verified by this site, but can be for proof of ownership of address): "+e.data.content.signed_message+" (hashed message: "+e.data.content.hashed_message+", original message: "+e.data.content.original_message+")";
  }
});

window.banano-docs's People

Contributors

stjet avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.