npm i @dotare/cardano-delegation
New changes you will now be able to select network id in parameters (Preview: 0, Mainnet: 1, Pre-Prod: 2)
Pool ID Hash, WalletName, NetworkId: (Preview: 0, Mainnet: 1, Pre-Prod: 2)
delegationTx('5653f2a1aea5318f43a63e0148076348a475d3c89283a8c1eb498fb7', 'nami', 0)
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;
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.)
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