Skip to content

Commit

Permalink
Merge pull request #387 from Anastasia-Labs/docs-update
Browse files Browse the repository at this point in the history
updated content, showcase, readme
  • Loading branch information
solidsnakedev authored Nov 6, 2024
2 parents 3e854db + ba34792 commit e88f247
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 29 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ There are a growing number of projects that are built on top of `lucid-evolution
<br />
<a style="text-decoration:none;" href="https://preview.betttingada.com" target="_blank">BetttingADA</a>
</td>
<td align="center">
<img src="https://cardexscan.s3.us-east-1.amazonaws.com/cds_logo_vector_dark.png" height="50px;" alt="Summon" />
<br />
<a style="text-decoration:none;" href="https://cardexscan.com/home" target="_blank">Cardexscan</a>
</td>
</tr><tr>
</tr>
</table>
<br/>
Expand Down
7 changes: 1 addition & 6 deletions docs/pages/documentation/core-concepts/choose-wallet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ Use different methods to select a wallet and query balances, UTxOs
```typescript
lucid.selectWallet.fromPrivateKey(privateKey);
```

<Callout type="info">
Evolution Note: Syntax changed from `selectWalletFromPrivateKey` to `selectWallet.fromPrivateKey`
</Callout>
</Tabs.Tab>
<Tabs.Tab>
This method is useful when you have the address and UTXOs of a wallet but not necessarily the private key.
Expand Down Expand Up @@ -94,5 +90,4 @@ Selecting a wallet is necessary for building and submitting transactions. Make s
const delegation = await lucid.wallet().getDelegation();
```
</Tabs.Tab>
</Tabs>

</Tabs>
5 changes: 1 addition & 4 deletions docs/pages/documentation/core-concepts/first-transaction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ const tx = await lucid
need to end with `.complete()`
</Callout>

<Callout type="info" emoji="ℹ️">
__Evolution-Notes:__ `payToAddress` -> `pay.ToAddress`
</Callout>
### Sign

```typescript
Expand Down Expand Up @@ -73,4 +70,4 @@ const tx = await lucid
const signedTx = await tx.sign.withWallet().complete();
const txHash = await signedTx.submit();
console.log(txHash);
```
```
33 changes: 26 additions & 7 deletions docs/pages/documentation/core-concepts/instantiate-evolution.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ We support the `Mainnet`, `Preprod`, and `Preview` networks

There are multiple builtin providers you can choose from in Lucid Evolution

<Tabs items={['Blockfrost', 'Kupmios', 'Maestro', 'Koios']}>
<Tabs items={['Blockfrost', 'Kupmios', 'Maestro', 'Koios', 'Yaci', 'UTxORPC']}>
<Tabs.Tab>
```typescript
import { Lucid, Blockfrost } from "@lucid-evolution/lucid";
Expand Down Expand Up @@ -59,13 +59,32 @@ const lucid = await Lucid(
);
```
</Tabs.Tab>
</Tabs>
<Tabs.Tab>
YACI DevKit provides a local development environment with configurable block times and network parameters. For detailed setup instructions, visit the [YACI DevKit documentation](https://devkit.yaci.xyz/tutorials/lucid-evolution/overview).
```typescript
// Configure custom network slot settings for YACI DevKit
SLOT_CONFIG_NETWORK['Custom'] = {
zeroTime: 1664060800000, // Unix timestamp in milliseconds
zeroSlot: 0,
slotLength: 1000,
};

const lucid = await Lucid(
new Kupmios(
"http://localhost:1442",
"http://localhost:1337"
),
"Custom" // Use custom network type for DevKit
);
```
</Tabs.Tab>
<Tabs.Tab>
```typescript
//TODO: https://github.com/utxorpc/lucid-evolution-provider
```
</Tabs.Tab>
</Tabs>

<Callout type="info" emoji="ℹ️">
__Evolution-Notes:__ `Lucid.new()` has been replaced with `Lucid()`, as it's
now a factory function instead of a class
</Callout>

---

Expand Down Expand Up @@ -124,4 +143,4 @@ The `provider` in `lucid.provider` is the provider instance you passed to `Lucid

<Callout type="info">
Remember that you can switch providers using the `switchProvider` method if needed.
</Callout>
</Callout>
15 changes: 7 additions & 8 deletions docs/pages/documentation/deep-dives/mint-assets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,18 @@ const txHash = await signed.submit();
```

<Callout type="info" emoji="ℹ️">
__Evolution-Notes:__ `attach.MintingPolicy` -> `attachMintingPolicy`

- When working with complex script parameters (involving nested structures or custom data types), you need to use the `applyDoubleCborEncoding` function before applying the parameters to the script
When working with script parameters (involving nested structures or custom data types):

```typescript
const scriptWithParams = applyParamsToScript(
applyDoubleCborEncoding(yourScript),
yourCompiledScript,
[param1, param2, ...]
);
```
- Minting tokens creates them, but it doesn't automatically assign them to any address. After minting, the tokens are technically owned by the transaction itself.
- Minting tokens creates them, but it doesn't automatically assign them to any address. After minting, the tokens are technically "owned" by the transaction itself.
- Purpose of `pay.ToAddress()` is to send the newly minted tokens to a specific address
</Callout>

</Steps>

---
Expand All @@ -91,7 +90,7 @@ const txHash = await signed.submit();
<Callout>
- All assets minted in a single `mintAssets` call should be of the same policy id. You can chain multiple `mintAssets` calls if you need to mint assets with different policy ids
- The minting policy must be attached to the transaction using `attach.MintingPolicy`
- Lucid Evolution supports `Native`, `PlutusV1`, and `PlutusV2` minting policies. The appropriate script type will be used based on the policy you attach.
- When using Plutus scripts (V1 or V2), make sure to provide an appropriate redeemer.
- Lucid Evolution supports `Native`, `PlutusV1 / V2 / V3` minting policies. The appropriate script type will be used based on the policy you attach.
- When using Plutus scripts (V1 / V2 / V3), make sure to provide an appropriate redeemer.
- The `validTo` field is important for time-locked minting policies to ensure the transaction is submitted within the valid time range
</Callout>
</Callout>
7 changes: 3 additions & 4 deletions docs/pages/showcase.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,12 @@ import { Cards } from 'nextra/components'
<ShowcaseCard title="BetttingADA" href="https://preview.betttingada.com" style={{ width: '200px', height: '270px' }}>
<>![BetttingADA](https://preview.betttingada.com/assets/images/logo/logo-bead.png)</>
</ShowcaseCard>
<ShowcaseCard title="Cardexscan" href="https://cardexscan.com/home" style={{ width: '200px', height: '270px' }}>
<>![Cardexscan](https://cardexscan.s3.us-east-1.amazonaws.com/cds_logo_vector_dark.png)</>
</ShowcaseCard>
<ShowcaseCard title="Your Project Title" href="https://yourprojectspage.com" style={{ width: '200px', height: '270px' }}>
<>![Your Project Logo](https://yourprojectlogo.com/logo.png)</>
</ShowcaseCard>




</Cards>

<div style={{ marginBottom: "8rem" }}></div>
Expand Down

0 comments on commit e88f247

Please sign in to comment.