-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #260 from MeshJS/v1.6.5
V1.6.5
- Loading branch information
Showing
77 changed files
with
2,032 additions
and
2,042 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** @type {import("eslint").Linter.Config} */ | ||
module.exports = { | ||
root: true, | ||
extends: ["@meshsdk/configs/eslint/next.js"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: true, | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,16 @@ | ||
{ | ||
"extends": "@meshsdk/configs/typescript/nextjs.json", | ||
"compilerOptions": { | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"noEmit": true, | ||
"esModuleInterop": true, | ||
"module": "esnext", | ||
"moduleResolution": "bundler", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"jsx": "preserve", | ||
"incremental": true, | ||
"plugins": [ | ||
{ | ||
"name": "next" | ||
} | ||
], | ||
"paths": { | ||
"@/*": ["./src/*"] | ||
}, | ||
"noImplicitAny": false, | ||
"strictNullChecks": false, | ||
} | ||
}, | ||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], | ||
"include": [ | ||
"next-env.d.ts", | ||
"next.config.js", | ||
"**/*.ts", | ||
"**/*.tsx", | ||
".next/types/**/*.ts" | ||
], | ||
"exclude": ["node_modules"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
apps/playground/src/pages/apis/txbuilder/basics/coin-selection.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import Link from "~/components/link"; | ||
import TwoColumnsScroll from "~/components/sections/two-columns-scroll"; | ||
import Codeblock from "~/components/text/codeblock"; | ||
|
||
export default function TxbuilderCoinSelection() { | ||
return ( | ||
<TwoColumnsScroll | ||
sidebarTo="coinSelection" | ||
title="Coin selection" | ||
leftSection={Left()} | ||
/> | ||
); | ||
} | ||
|
||
function Left() { | ||
let code1 = ``; | ||
code1 += `txBuilder\n`; | ||
code1 += ` .txOut(address, [{ unit: "lovelace", quantity: amount }])\n`; | ||
code1 += ` .changeAddress(changeAddress)\n`; | ||
code1 += ` .selectUtxosFrom(utxos)\n`; | ||
code1 += ` .complete();\n`; | ||
|
||
let codeSignature = ``; | ||
codeSignature += `selectUtxosFrom(\n`; | ||
codeSignature += ` extraInputs: UTxO[]\n`; | ||
codeSignature += ` strategy?: UtxoSelectionStrategy\n`; | ||
codeSignature += ` threshold?: string\n`; | ||
codeSignature += ` includeTxFees?: boolean\n`; | ||
codeSignature += `)\n`; | ||
|
||
return ( | ||
<> | ||
<p> | ||
You can select UTxOs from a list of UTxOs using the{" "} | ||
<code>selectUtxosFrom</code> method. This method allows you to specify | ||
the conditions for selecting UTxOs. The method signature is as follows: | ||
</p> | ||
<Codeblock data={codeSignature} /> | ||
<p> | ||
The second parameter of <code>selectUtxosFrom</code> is the strategy to | ||
be used for selecting UTxOs. There are 4 strategies ( | ||
<code>UtxoSelectionStrategy</code>) available for selecting UTxOs: | ||
</p> | ||
<ul> | ||
<li>experimental</li> | ||
<li>keepRelevant</li> | ||
<li>largestFirst</li> | ||
<li>largestFirstMultiAsset</li> | ||
</ul> | ||
<p> | ||
We may introduce more strategies in the future. Check the{" "} | ||
<Link href="https://docs.meshjs.dev/">Mesh Docs</Link> for more details. | ||
</p> | ||
<p> | ||
The <code>threshold</code> parameter is used to specify the minimum | ||
amount of lovelace to be selected. You may specify a larger amount to if | ||
the transactions requires it. | ||
</p> | ||
<p> | ||
The last parameter is <code>includeTxFees</code> which is a boolean | ||
value to include transaction fees in the selection. | ||
</p> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
apps/playground/src/pages/apis/txbuilder/basics/send-values.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.