Skip to content

Commit

Permalink
demos: add tapd RPC calls to the Kitchen Sink demo
Browse files Browse the repository at this point in the history
  • Loading branch information
jamaljsr committed Jun 22, 2023
1 parent e1bd716 commit 2a79d42
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions demos/kitchen-sink/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import LNC from '@lightninglabs/lnc-web';

function App() {
const lnc = new LNC({
pairingPhrase: 'domain panther column trade crater health evil report ill service',
password: 'Dm9lfaWmo92Q#m9f'
pairingPhrase: 'sort oven pipe pet bacon brick brick mammal hazard collect',
password: 'Dm9lfaWmo92Q#m9f',
serverHost: 'localhost:11110',
});

// Main
Expand All @@ -20,6 +21,7 @@ function App() {
const { swapClient } = lnc.loop;
const { trader } = lnc.pool;
const { faradayServer } = lnc.faraday;
const { taprootAssets, mint, universe, assetWallet } = lnc.tapd;

// LND

Expand Down Expand Up @@ -79,6 +81,28 @@ function App() {
console.log(insights);
};

// Taproot Assets

const listAssets = async() => {
const assets = await taprootAssets.listAssets();
console.log(assets);
};

const listBatches = async() => {
const assets = await mint.listBatches();
console.log(assets);
};

const listFederationServers = async() => {
const assets = await universe.listFederationServers();
console.log(assets);
};

const nextScriptKey = async() => {
const assets = await assetWallet.nextScriptKey({ keyFamily: 1 })
console.log(assets);
};

return (
<div className="App">
<header className="App-header">
Expand All @@ -103,6 +127,11 @@ function App() {
<button onClick={() => auctionFee()}>auctionFee</button>
<h1>Faraday</h1>
<button onClick={() => channelInsights()}>channelInsights</button>
<h1>Taproot Assets</h1>
<button onClick={() => listAssets()}>listAssets</button>
<button onClick={() => listBatches()}>listBatches</button>
<button onClick={() => listFederationServers()}>listFederationServers</button>
<button onClick={() => nextScriptKey()}>nextScriptKey</button>
</header>
</div>
);
Expand Down

0 comments on commit 2a79d42

Please sign in to comment.