@dotare/cardano-delegation
TypeScript icon, indicating that this package has built-in type declarations

0.2.7 • Public • Published

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: &

Package Sidebar

Install

npm i @dotare/cardano-delegation

Weekly Downloads

14

Version

0.2.7

License

ISC

Unpacked Size

2.35 MB

Total Files

11

Last publish

Collaborators

  • cgerckert
  • double-thirty