Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Lantstool examples to the Linkdrop page #2446

Merged
merged 4 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 36 additions & 2 deletions docs/2.build/5.primitives/linkdrop.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ hide_table_of_contents: false
import {FeatureList, Column, Feature} from "@site/src/components/featurelist"
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

import { Github } from "@site/src/components/codetabs"
import { LantstoolLabel } from '@site/src/components/LantstoolLabel/LantstoolLabel';

Linkdrops allow users to distribute assets and onboard people to Web3 apps through a simple web link.

Expand Down Expand Up @@ -132,7 +133,6 @@ Key pair with ed25519:33Vn9VtNEtWQPPd1f4jf5HzJ5weLcvGHU8oz7o5UnPqy public key fo
</TabItem>

<TabItem value="Keypom API" label="Keypom API">

```bash
export NUMBER_OF_DROPS=2

Expand All @@ -142,7 +142,11 @@ curl https://keypom.sctuts.com/keypair/$NUMBER_OF_DROPS/rootEntrophy
</TabItem>

</Tabs>
</TabItem>

<TabItem value="Lantstool" label={<LantstoolLabel/>}>
<p>Generate a new key on [Lantstool](https://app.lantstool.dev/)</p>
![lantstool](/docs/assets/lantstool/lantstool-near_protocol-utils-key_generator.png)
</TabItem>
</Tabs>

Expand Down Expand Up @@ -208,6 +212,11 @@ near call v2.keypom.near create_drop '{"public_keys": <PUBLIC_KEYS>, "deposit_pe
```

</TabItem>

<TabItem value="Lantstool" label={<LantstoolLabel/>}>
<p>Try it out on [Lantstool](https://app.lantstool.dev/import/gh/lantstool/examples.near-protocol/main/docs/2.build/5.primitives/linkdrop/create-near-drop.json)</p>
<Github language="json" url="https://github.com/lantstool/examples.near-protocol/blob/main/docs/2.build/5.primitives/linkdrop/create-near-drop.json" />
</TabItem>
</Tabs>

:::info
Expand Down Expand Up @@ -296,6 +305,11 @@ near call v2.keypom.near create_drop '{"public_keys": <PUBLIC_KEYS>, "deposit_pe
```

</TabItem>

<TabItem value="Lantstool" label={<LantstoolLabel/>}>
<p>Try it out on [Lantstool](https://app.lantstool.dev/import/gh/lantstool/examples.near-protocol/main/docs/2.build/5.primitives/linkdrop/create-nft-drop.json)</p>
<Github language="json" url="https://github.com/lantstool/examples.near-protocol/blob/main/docs/2.build/5.primitives/linkdrop/create-nft-drop.json" />
</TabItem>
</Tabs>

#### 2. Transferring the NFT
Expand Down Expand Up @@ -357,6 +371,11 @@ near call nft.primitives.near nft_transfer_call '{"receiver_id": "v2.keypom.near
```

</TabItem>

<TabItem value="Lantstool" label={<LantstoolLabel/>}>
<p>Try it out on [Lantstool](https://app.lantstool.dev/import/gh/lantstool/examples.near-protocol/main/docs/2.build/5.primitives/linkdrop/transfer-nft-to-v2keypomnear.json)</p>
<Github language="json" url="https://github.com/lantstool/examples.near-protocol/blob/main/docs/2.build/5.primitives/linkdrop/transfer-nft-to-v2keypomnear.json" />
</TabItem>
</Tabs>

:::tip
Expand Down Expand Up @@ -447,6 +466,11 @@ near call v2.keypom.near create_drop '{"public_keys": <PUBLIC_KEYS>, "deposit_pe
```

</TabItem>

<TabItem value="Lantstool" label={<LantstoolLabel/>}>
<p>Try it out on [Lantstool](https://app.lantstool.dev/import/gh/lantstool/examples.near-protocol/main/docs/2.build/5.primitives/linkdrop/create-ft-drop.json)</p>
<Github language="json" url="https://github.com/lantstool/examples.near-protocol/blob/main/docs/2.build/5.primitives/linkdrop/create-ft-drop.json" />
</TabItem>
</Tabs>

#### 2. Transferring FT
Expand Down Expand Up @@ -508,6 +532,11 @@ near call ft.primitives.near ft_transfer '{"receiver_id": "v2.keypom.near", "amo
```

</TabItem>

<TabItem value="Lantstool" label={<LantstoolLabel/>}>
<p>Try it out on [Lantstool](https://app.lantstool.dev/import/gh/lantstool/examples.near-protocol/main/docs/2.build/5.primitives/linkdrop/transfer-ft-to-v2keypomnear.json)</p>
<Github language="json" url="https://github.com/lantstool/examples.near-protocol/blob/main/docs/2.build/5.primitives/linkdrop/transfer-ft-to-v2keypomnear.json" />
</TabItem>
</Tabs>

---
Expand Down Expand Up @@ -624,6 +653,11 @@ near call v2.keypom.near create_drop '{"public_keys": <PUBLIC_KEYS>, "deposit_pe
```

</TabItem>

<TabItem value="Lantstool" label={<LantstoolLabel/>}>
<p>Try it out on [Lantstool](https://app.lantstool.dev/import/gh/lantstool/examples.near-protocol/main/docs/2.build/5.primitives/linkdrop/create-function-call-drop.json)</p>
<Github language="json" url="https://github.com/lantstool/examples.near-protocol/blob/main/docs/2.build/5.primitives/linkdrop/create-function-call-drop.json" />
</TabItem>
</Tabs>

---
Expand Down
2 changes: 1 addition & 1 deletion docs/2.build/5.primitives/what-is.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ DAOs are ideal to create **decentralized governance**, **funding**, and **decisi

:::tip
LinkDrops are ideal to do **drops**, and **onboard new users** into Web3 apps.
:::
:::
9 changes: 9 additions & 0 deletions website/src/components/LantstoolLabel/LantstoolLabel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import LantstoolLogo from "@site/static/docs/assets/lantstool/lantstool-logo-circle.svg";
import cn from './LantstoolLabel.module.scss'

export const LantstoolLabel = () => (
<div className={cn.container}>
<LantstoolLogo className={cn.logo}/>
Lantstool
</div>
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.container {
display: flex;
gap: 4px;
align-items: center;
}

.logo {
height: 16px;
width: 16px;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading