GithubHelp home page GithubHelp logo

brolloks / cardano-delegation-button Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dotareio/cardano-delegation

0.0 0.0 0.0 538 KB

A delegation function that uses cip30 to improve the quality of life for developers and delegators.

JavaScript 11.77% TypeScript 88.23%

cardano-delegation-button's Introduction

A delegation method that uses cip30 to improve the quality of life for developers and delegators.

npm

install
npm i @dotare/cardano-delegation
add method
New changes you will now be able to select network id in parameters (Preview: 0, Mainnet: 1, Pre-Prod: 2)
default will be mainnet: 1
                                Pool ID Hash, WalletName, NetworkId: (Preview: 0, Mainnet: 1, Pre-Prod: 2)
delegationTx('5653f2a1aea5318f43a63e0148076348a475d3c89283a8c1eb498fb7', 'nami', 0)
react example
import React from 'react';
import { delegationTx } from '@dotare/cardano-delegation';
function App() {
    return (                                                                                                 //Browser console to find names
        <div>                                                 //Pool ID hash                            // window.cardano.*browser wallet name*
            <button onClick={() => { delegationTx('5653f2a1aea5318f43a63e0148076348a475d3c89283a8c1eb498fb7', 'nami', 0) }}>nami</button>
            <button onClick={() => { delegationTx('5653f2a1aea5318f43a63e0148076348a475d3c89283a8c1eb498fb7', 'eternl', 0) }}>eternl</button>
            <button onClick={() => { delegationTx('5653f2a1aea5318f43a63e0148076348a475d3c89283a8c1eb498fb7', 'yoroi', 0) }}>yoroi</button>
            <button onClick={() => { delegationTx('5653f2a1aea5318f43a63e0148076348a475d3c89283a8c1eb498fb7', 'typhoncip30', 0) }}>typhon</button>
            <button onClick={() => { delegationTx('5653f2a1aea5318f43a63e0148076348a475d3c89283a8c1eb498fb7', 'gerowallet', 0) }}>gerowallet</button>
            <button onClick={() => { delegationTx('5653f2a1aea5318f43a63e0148076348a475d3c89283a8c1eb498fb7', 'flint', 0) }}>flint</button>
        </div>
    );
}
export default App;
Webpack.config.js
experiments: {
    asyncWebAssembly: true,
},

If you don't have access to webpack.config due to framework library:

How to load wasm into create-react-app: https://stackoverflow.com/a/61722010

How to load wasm into Laravel with mix: https://laravel-mix.com/docs/6.0/quick-webpack-configuration


Ways to support:

Delegate: https://www.dotare.io/stake-pool/ (proof this package works on wordpress.)

Royal Pool CCCC Pool Teddy FISO Pool Earn more than just ADA

Post Issues: https://github.com/dotareio/cardano-delegation/issues/new/choose

Templates: Question, Bug, Feature Request, Security Vuln


References:

As seen on Dapp Central: YouTube Channel

Powered By: &

cardano-delegation-button's People

Contributors

dorienp 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.