Skip to content
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
36 changes: 24 additions & 12 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linter checks
name: 💅 Linting suite

env:
HUSKY: 0
Expand All @@ -15,9 +15,11 @@ concurrency:
permissions:
contents: read
pull-requests: write
issues: write

jobs:
linter:
format-check:
name: "Formatting"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down Expand Up @@ -45,26 +47,36 @@ jobs:
**.mdx

- name: Check formatting of MDX and Markdown files
id: check-fmt
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
echo
echo -e 'Checking formatting on the following MDX and Markdown files affected by this PR:\n'
for file in ${ALL_CHANGED_FILES}; do
echo "- $file"
done
if [ -z $(echo -e "${ALL_CHANGED_FILES[@]}" | tr -d '[:space:]') ]; then
echo -e "\nNo such files affected!"
echo -e '\nNo such files affected!'
exit 0
fi
echo -e '\nChecking formatting on the following MDX and Markdown files affected by this PR:\n'
for file in ${ALL_CHANGED_FILES}; do
echo "- $file"
done
echo
npx remark --no-stdout --quiet --frail --silently-ignore $(echo -e "${ALL_CHANGED_FILES[@]}" | tr '\n' ' ')

- name: How to fix the formatting? See these suggestions!
- name: ${{ steps.check-fmt.conclusion == 'failure' && '👀' }} How to fix the formatting? See these suggestions!
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
if: failure()
run: |
echo
echo -e "Install necessary dependencies: \033[31mnpm ci\033[0m"
echo -e "Then, run this to fix formatting: \033[31mnpx remark -o --quiet --silently-ignore $(echo -e "${ALL_CHANGED_FILES[@]}" | tr '\n' ' ')\033[0m"
# Preparations
FILES="$(echo -e "${ALL_CHANGED_FILES[@]}" | tr '\n' ' ')"
BODY="{\"body\":\"To fix the formatting issues:\n\n1. Install necessary dependencies: \`npm ci\`\n2. Then, run this command:\n\`\`\`shell\nnpx remark -o --quiet --silently-ignore ${FILES}\n\`\`\`\"}"
# Comment on the PR
curl -s -o /dev/null -L -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-d "$BODY" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.number }}/comments
# Comment right in the actions output
echo -e "\nInstall necessary dependencies: \033[31mnpm ci\033[0m"
echo -e "Then, run this to fix formatting: \033[31mnpx remark -o --quiet --silently-ignore ${FILES}\033[0m"
15 changes: 8 additions & 7 deletions .remarkignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# Ignore folders
node_modules/
pending/
/pending/

# Ignore some whitepapers
language/fift/whitepaper.mdx
ton/tbl.mdx
ton/ton.mdx
ton/tvm.mdx
/language/fift/whitepaper.mdx
/ton/tbl.mdx
/ton/tblkch.mdx
/ton/ton.mdx
/ton/tvm.mdx

# Ignore root index.mdx file
index.mdx
/index.mdx

# Ignore generated files
tvm/instructions.mdx
/tvm/instructions.mdx
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,26 @@ The dictionaries (_vocabularies_) for custom words is placed under `.vale/config

See more info on dictionaries here: [Vale vocabularies docs](https://vale.sh/docs/keys/vocab).

### Format checks

To check formatting of **all** files, run:

```shell
npm run check:fmt
```

To fix formatting of **all** files, run:

```shell
npm run fmt
```

To check and fix formatting of some **selected** files, run:

```shell
npm run fmt:some <FILES...>
```

## Publishing changes

[Mintlify's GitHub app](https://dashboard.mintlify.com/settings/organization/github-app) is connected to this repository. Thus, changes are deployed to production automatically after pushing to the default branch (`main`).
Expand Down
10 changes: 5 additions & 5 deletions contribute/snippets/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ title: "Using components and snippets"
sidebarTitle: "Overview"
---

_Snippets_ allow to conveniently keep the same content in sync, while _components_ let you easily reuse a piece of UI or styling consistently. Examples might include a [link card](https://www.mintlify.com/docs/components/cards) or a [YouTube embed](https://www.mintlify.com/docs/image-embeds#youtube-embeds).
_Snippets_ allow to conveniently keep the same content in sync, while _components_ let you easily reuse a piece of UI or styling consistently. Examples might include a [link card](https://www.mintlify.com/docs/components/cards) or a [YouTube embed](https://www.mintlify.com/docs/create/image-embeds#youtube-embeds).

Mintlify supports the use of MDX snippets and JSX (React) components in MDX files and provides some [built-in components](#built-in-components) for you to use. In addition to those, this documentation provides a number of [custom components](#custom-components) in the `snippets/` folder.

## Using a snippet

One of the core principles of software development is [DRY (Don’t Repeat Yourself)](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself), which applies to documentation as well. If you find yourself repeating the same content in multiple places, consider creating a custom snippet to keep your content in sync.

All snippets are placed in the root `snippets/` folder. For more info on their creation and usage, refer to the [reusable snippets page in the Mintlify documentation](https://www.mintlify.com/docs/reusable-snippets).
All snippets are placed in the root `snippets/` folder. For more info on their creation and usage, refer to the [reusable snippets page in the Mintlify documentation](https://www.mintlify.com/docs/create/reusable-snippets).

## Using a component

Expand All @@ -35,12 +35,12 @@ And now, some text and usage!

Learn more in the Mintlify documentation:

- [JSX snippets](https://www.mintlify.com/docs/reusable-snippets#jsx-snippets)
- [React components](https://www.mintlify.com/docs/react-components)
- [JSX snippets](https://www.mintlify.com/docs/create/reusable-snippets#jsx-snippets)
- [React components](https://www.mintlify.com/docs/customize/react-components)

## Built-in components

Mintlify provides built-in components for common documentation use cases. These components are available globally without needing to import anything. See items on the left navigation panel near [that page](https://www.mintlify.com/docs/reusable-snippets#jsx-snippets), such as: [Accordion](https://www.mintlify.com/docs/components/accordions), [Cards](https://www.mintlify.com/docs/components/cards), [Columns](https://www.mintlify.com/docs/components/columns), [Code groups](https://www.mintlify.com/docs/components/code-groups), etc.
Mintlify provides built-in components for common documentation use cases. These components are available globally without needing to import anything. See items on the left navigation panel near [that page](https://www.mintlify.com/docs/create/reusable-snippets#jsx-snippets), such as: [Accordion](https://www.mintlify.com/docs/components/accordions), [Cards](https://www.mintlify.com/docs/components/cards), [Columns](https://www.mintlify.com/docs/components/columns), [Code groups](https://www.mintlify.com/docs/components/code-groups), etc.

## Custom components

Expand Down
36 changes: 28 additions & 8 deletions ecosystem/ton-connect/walletkit/native-web.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,43 +17,50 @@ TON Connect is the standard wallet connection protocol for The Open Network (TON
>
overview of the protocol and its role in the TON ecosystem
</Card>

<Card
title="Wallet manifest"
arrow="true"
href="/ecosystem/ton-connect/manifest#wallet-manifest"
>
what is the manifest and how to prepare it
</Card>

<Card
title="Bridge"
href="#ton-connect-bridge"
>
what is the bridge service and how to set it up
</Card>

<Card
title="Protocol"
href="#ton-connect-protocol"
>
what is the protocol and how to implement it
</Card>

<Card
title="Signing"
href="#ton-connect-signing"
>
signing processes and reference implementations
</Card>

<Card
title="Support"
href="#support-and-assistance"
>
how to get help and schedule technical consultations
</Card>

<Card
title="FAQ"
href="#faq"
>
frequently asked questions about TON Connect implementation
</Card>

<Card
title="See also"
href="#see-also"
Expand All @@ -72,9 +79,10 @@ The TON Connect bridge serves as a transport mechanism for delivering messages b

Custodians can run the TON Connect Bridge themselves. This approach provides full control over the infrastructure and data.

For this option, you can deploy the [official TON Connect Bridge implementation][bridge].
For this option, you can deploy the [official TON Connect Bridge implementation][bridge-repo].

You will need to:

1. Set up a dedicated bridge instance following the repository documentation
1. Create a DNS entry pointing to your bridge
1. Configure your infrastructure (load balancers, SSL certificates, etc.)
Expand All @@ -85,6 +93,7 @@ You will need to:
TON Foundation can provide a Software-as-a-Service (SaaS) solution for custodians who prefer not to maintain on-premise infrastructure.

To request access to the SaaS solution, contact the TON Foundation business development team. This managed service includes:

1. Hosted bridge infrastructure
1. Maintenance and updates
1. Technical support
Expand Down Expand Up @@ -115,6 +124,7 @@ To read more about the bridge protocol, please refer to the [TON Connect Bridge
## TON Connect protocol

TON Connect enables communication between wallets and dApps. For custodian wallets, the integration has these core components:

1. Establishing secure sessions with dApps
1. Handling universal links in the browser
1. Managing wallet connections
Expand Down Expand Up @@ -712,25 +722,31 @@ The signing process is a critical component when integrating TON Connect with cu
### Transaction signing

For transaction signing implementation, you can refer to the [`@ton/ton` library](https://github.com/ton-org/ton) where wallet integrations are implemented. Please note that this serves as a reference implementation to understand how to achieve transaction signing:
- `@ton/crypto`: https://github.com/ton-org/ton-crypto
- `@ton/core`: https://github.com/ton-org/ton-core
- `@ton/ton`: https://github.com/ton-org/ton

- [`@ton/crypto`](https://github.com/ton-org/ton-crypto)
- [`@ton/core`](https://github.com/ton-org/ton-core)
- [`@ton/ton`](https://github.com/ton-org/ton)

This library provides examples and utilities for TON blockchain operations, but custodians will need to adapt these patterns to work with their specific signing infrastructure and APIs.

### TON Proof implementation

For implementing the necessary functionality, two key resources are available:

1. [TON Proof specification](https://github.com/ton-blockchain/ton-connect/blob/main/requests-responses.md#address-proof-signature-ton_proof)
- This document provides the complete specification for address proof signatures
- Describes the required format and cryptographic requirements

- This document provides the complete specification for address proof signatures
- Describes the required format and cryptographic requirements

2. [TON Proof verification example](https://github.com/ton-connect/demo-dapp-with-react-ui/blob/248379d2545f663931151ec9f49e465b748cfc68/src/server/services/ton-proof-service.ts#L25-L116)
- This example demonstrates verification of `ton_proof` (not signing)
- Useful for understanding the proof structure and validation logic

- This example demonstrates verification of `ton_proof` (not signing)
- Useful for understanding the proof structure and validation logic

### Reference implementations

For practical examples of TON Connect signing implementations, you can review these wallet integrations:

- [Tonkeeper](https://github.com/tonkeeper/wallet)
- [TonDevWallet](https://github.com/TonDevWallet/TonDevWallet)

Expand All @@ -739,15 +755,18 @@ These implementations demonstrate how different wallets handle TON Connect signi
## Support and assistance

For questions or clarifications during your integration process:

- Add comments directly in this document for specific technical clarifications
- Engage with the TON Foundation team through our technical chat channels
- Contact the TON Foundation business development team to provide access to technical team for consultations

To schedule a consultation call with our technical team:

- Request a meeting through our technical chat channels
- Contact the TON Foundation business development team to arrange technical discussions

The TON Foundation is fully committed to supporting custodians throughout this integration process. This support includes:

- Providing technical documentation and specifications
- Sharing reference implementations and code examples
- Offering consulting and troubleshooting assistance
Expand All @@ -760,6 +779,7 @@ The TON Foundation is committed to supporting custodians throughout their TON Co
### What are the correct network chain IDs for TON Connect?

The TON blockchain uses specific network chain identifiers in the TON Connect protocol:

- **Mainnet:** `CHAIN.MAINNET` (`-239`)
- **Testnet:** `CHAIN.TESTNET` (`-3`)

Expand Down
2 changes: 1 addition & 1 deletion guidebook/more.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
title: "More tutorials"
---

Stub
Stub
Loading